Ambassador can watch multiple namespaces (#7516)

* Ambassador can watch multiple namespaces

* update variable name per PR review
pull/7538/head
Ian Martin 2021-04-22 01:22:31 -06:00 committed by GitHub
parent 384d30b675
commit 38d9d2ea0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 1 deletions

View File

@ -115,6 +115,7 @@ ingress_publish_status_address: ""
ingress_ambassador_enabled: false ingress_ambassador_enabled: false
# ingress_ambassador_namespace: "ambassador" # ingress_ambassador_namespace: "ambassador"
# ingress_ambassador_version: "*" # ingress_ambassador_version: "*"
# ingress_ambassador_multi_namespaces: false
# ALB ingress controller deployment # ALB ingress controller deployment
ingress_alb_enabled: false ingress_alb_enabled: false

View File

@ -29,6 +29,10 @@ versions of Ambassador as they become available.
for specifying when the Operator should try to update the Ambassador API Gateway. for specifying when the Operator should try to update the Ambassador API Gateway.
- `ingress_ambassador_version` (defaulkt: `*`): SemVer rule for versions allowed for - `ingress_ambassador_version` (defaulkt: `*`): SemVer rule for versions allowed for
installation/updates. installation/updates.
- `ingress_ambassador_multi_namespaces` (default `false`): By default, Ambassador will only
watch the `ingress_ambassador_namespace` namespace for `AmbassadorInstallation` CRD resources.
When set to `true`, this value will tell the Ambassador Operator to watch **all** namespaces
for CRDs. If you want to run multiple Ambassador ingress instances, set this to `true`.
## Ingress annotations ## Ingress annotations

View File

@ -7,3 +7,4 @@ ingress_ambassador_insecure_port: 80
ingress_ambassador_secure_port: 443 ingress_ambassador_secure_port: 443
ingress_ambassador_extra_args: [] ingress_ambassador_extra_args: []
ingress_ambassador_host_network: false ingress_ambassador_host_network: false
ingress_ambassador_multi_namespaces: false

View File

@ -32,9 +32,13 @@ spec:
imagePullPolicy: {{ k8s_image_pull_policy }} imagePullPolicy: {{ k8s_image_pull_policy }}
env: env:
- name: WATCH_NAMESPACE - name: WATCH_NAMESPACE
{%- if ingress_ambassador_multi_namespaces %}
value: ''
{%- else %}
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: metadata.namespace fieldPath: metadata.namespace
{%- end %}
- name: POD_NAME - name: POD_NAME
valueFrom: valueFrom:
fieldRef: fieldRef: