From 07540c29da6b98143da62fce30ee3931a2c2295f Mon Sep 17 00:00:00 2001 From: aknochow Date: Mon, 17 Mar 2025 09:19:02 -0400 Subject: [PATCH] fixing quotes on namespace to support namespace names with only numbers (#2030) --- roles/backup/templates/event.yml.j2 | 4 ++-- .../templates/configmaps/redirect-page.configmap.html.j2 | 2 +- roles/installer/templates/storage/metrics-utility.yaml.j2 | 2 +- roles/mesh_ingress/templates/deployment.yml.j2 | 2 +- roles/mesh_ingress/templates/ingress.yml.j2 | 6 +++--- roles/mesh_ingress/templates/receptor_conf.configmap.yml.j2 | 2 +- roles/restore/templates/event.yml.j2 | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/roles/backup/templates/event.yml.j2 b/roles/backup/templates/event.yml.j2 index 5c6fd599..87660e62 100644 --- a/roles/backup/templates/event.yml.j2 +++ b/roles/backup/templates/event.yml.j2 @@ -3,12 +3,12 @@ apiVersion: v1 kind: Event metadata: name: backup-error.{{ now }} - namespace: {{ ansible_operator_meta.namespace }} + namespace: "{{ ansible_operator_meta.namespace }}" involvedObject: apiVersion: awx.ansible.com/v1beta1 kind: {{ kind }} name: {{ ansible_operator_meta.name }} - namespace: {{ ansible_operator_meta.namespace }} + namespace: "{{ ansible_operator_meta.namespace }}" message: {{ error_msg }} reason: BackupFailed type: Warning diff --git a/roles/installer/templates/configmaps/redirect-page.configmap.html.j2 b/roles/installer/templates/configmaps/redirect-page.configmap.html.j2 index 9e87cf82..88cc2eb8 100644 --- a/roles/installer/templates/configmaps/redirect-page.configmap.html.j2 +++ b/roles/installer/templates/configmaps/redirect-page.configmap.html.j2 @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ ansible_operator_meta.name }}-redirect-page - namespace: {{ ansible_operator_meta.namespace }} + namespace: "{{ ansible_operator_meta.namespace }}" data: redirect-page.html: | diff --git a/roles/installer/templates/storage/metrics-utility.yaml.j2 b/roles/installer/templates/storage/metrics-utility.yaml.j2 index eec1a0c9..d58850b7 100644 --- a/roles/installer/templates/storage/metrics-utility.yaml.j2 +++ b/roles/installer/templates/storage/metrics-utility.yaml.j2 @@ -3,7 +3,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: {{ _metrics_utility_pvc_claim }} - namespace: {{ ansible_operator_meta.namespace }} + namespace: "{{ ansible_operator_meta.namespace }}" ownerReferences: null labels: {{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }} diff --git a/roles/mesh_ingress/templates/deployment.yml.j2 b/roles/mesh_ingress/templates/deployment.yml.j2 index 3d33ca37..ac7142e5 100644 --- a/roles/mesh_ingress/templates/deployment.yml.j2 +++ b/roles/mesh_ingress/templates/deployment.yml.j2 @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ ansible_operator_meta.name }} - namespace: {{ ansible_operator_meta.namespace }} + namespace: "{{ ansible_operator_meta.namespace }}" spec: selector: matchLabels: diff --git a/roles/mesh_ingress/templates/ingress.yml.j2 b/roles/mesh_ingress/templates/ingress.yml.j2 index a8ea5724..aa6081ab 100644 --- a/roles/mesh_ingress/templates/ingress.yml.j2 +++ b/roles/mesh_ingress/templates/ingress.yml.j2 @@ -6,7 +6,7 @@ apiVersion: '{{ ingress_api_version }}' kind: Ingress metadata: name: {{ ansible_operator_meta.name }} - namespace: {{ ansible_operator_meta.namespace }} + namespace: "{{ ansible_operator_meta.namespace }}" annotations: {% if ingress_annotations %} {{ ingress_annotations | indent(width=4) }} @@ -41,7 +41,7 @@ apiVersion: '{{ ingress_api_version }}' kind: IngressRouteTCP metadata: name: {{ ansible_operator_meta.name }} - namespace: {{ ansible_operator_meta.namespace }} + namespace: "{{ ansible_operator_meta.namespace }}" annotations: {% if ingress_annotations %} {{ ingress_annotations | indent(width=4) }} @@ -68,7 +68,7 @@ metadata: annotations: openshift.io/host.generated: "true" name: {{ ansible_operator_meta.name }} - namespace: {{ ansible_operator_meta.namespace }} + namespace: "{{ ansible_operator_meta.namespace }}" spec: {% if external_hostname is defined %} host: {{ external_hostname }} diff --git a/roles/mesh_ingress/templates/receptor_conf.configmap.yml.j2 b/roles/mesh_ingress/templates/receptor_conf.configmap.yml.j2 index c528922a..662fb4fe 100644 --- a/roles/mesh_ingress/templates/receptor_conf.configmap.yml.j2 +++ b/roles/mesh_ingress/templates/receptor_conf.configmap.yml.j2 @@ -3,7 +3,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ ansible_operator_meta.name }}-receptor-config - namespace: {{ ansible_operator_meta.namespace }} + namespace: "{{ ansible_operator_meta.namespace }}" data: receptor_conf: | --- diff --git a/roles/restore/templates/event.yml.j2 b/roles/restore/templates/event.yml.j2 index 8e4f9649..8347f825 100644 --- a/roles/restore/templates/event.yml.j2 +++ b/roles/restore/templates/event.yml.j2 @@ -3,12 +3,12 @@ apiVersion: v1 kind: Event metadata: name: restore-error.{{ now }} - namespace: {{ ansible_operator_meta.namespace }} + namespace: "{{ ansible_operator_meta.namespace }}" involvedObject: apiVersion: awx.ansible.com/v1beta1 kind: {{ kind }} name: {{ ansible_operator_meta.name }} - namespace: {{ ansible_operator_meta.namespace }} + namespace: "{{ ansible_operator_meta.namespace }}" message: {{ error_msg }} reason: RestoreFailed type: Warning