Skip to content

Commit 134ae43

Browse files
cbandyJonathan S. Katz
authored andcommitted
Allow Ansible installs without any target namespace
When installed in Kubernetes clusters v1.12 or later, target namespaces can be configured at any time. Touching only one namespace during install is a requirement of the GCP Marketplace Kubernetes application installer. Issue: [ch6131]
1 parent 3470a35 commit 134ae43

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

ansible/roles/pgo-operator/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ pgo_tls_no_verify: "false"
2929
pgo_disable_eventing: "false"
3030
pgo_apiserver_port: 8443
3131

32+
namespace: ""
33+
3234
delete_operator_namespace: "false"
3335
delete_watched_namespaces: "false"
3436
delete_metrics_namespace: "false"

ansible/roles/pgo-operator/tasks/namespace.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
operator_namespace: !unsafe "{{.OperatorNamespace}}"
77
target_ns_script: "{{ lookup('template', 'add-targeted-namespace.sh.j2') }}"
88
with_items: "{{ namespace.split(',') }}"
9+
when: namespace != ''
910
tags:
1011
- install
1112
- update

ansible/roles/pgo-preflight/tasks/check_inventory.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
vars:
99
mandatory_inventory_vars:
1010
- pgo_operator_namespace
11-
- namespace
1211
- pgo_installation_name
1312
- pgo_admin_username
1413
- pgo_admin_password

hugo/content/Installation/install-with-ansible/prerequisites.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ sets of variables cannot be used at the same time.
131131
* `exporterport`
132132
* `kubernetes_context` (Comment out if deploying to am OpenShift environment)
133133
* `metrics`
134-
* `namespace`
135134
* `openshift_host` (Comment out if deploying to a Kubernetes environment)
136135
* `openshift_password` (Comment out if deploying to a Kubernetes environment)
137136
* `openshift_skip_tls_verify` (Comment out if deploying to a Kubernetes environment)
@@ -194,7 +193,7 @@ sets of variables cannot be used at the same time.
194193
| `log_statement` | none | | Set to `none`, `ddl`, `mod`, or `all` to configure the statements that will be logged in PostgreSQL's logs on all newly created clusters. |
195194
| `metrics` | false | **Required** | Set to true enable performance metrics on all newly created clusters. This can be disabled by the client. |
196195
| `metrics_namespace` | metrics | | Configures the target namespace when deploying Grafana and/or Prometheus |
197-
| `namespace` | | **Required** | Set to a comma delimited string of all the namespaces Operator will manage. |
196+
| `namespace` | | | Set to a comma delimited string of all the namespaces Operator will manage. |
198197
| `openshift_host` | | **Required**, if deploying to OpenShift | When deploying to OpenShift, set to configure the hostname of the OpenShift cluster to connect to. |
199198
| `openshift_password` | | **Required**, if deploying to OpenShift | When deploying to OpenShift, set to configure the password used for login. |
200199
| `openshift_skip_tls_verify` | | **Required**, if deploying to OpenShift | When deploying to Openshift, set to ignore the integrity of TLS certificates for the OpenShift cluster. |

0 commit comments

Comments
 (0)