[COMMON] Make namespace configurable 31/126131/1
authorxuegao <xue.gao@intl.att.com>
Wed, 8 Dec 2021 08:26:42 +0000 (09:26 +0100)
committerS�bastien Determe <sebastien.determe@intl.att.com>
Tue, 14 Dec 2021 08:28:21 +0000 (08:28 +0000)
Make the namespace parameter configurable for
CertInitializer and ReadinessCheck Chart

Issue-ID: OOM-2888
Signed-off-by: xuegao <xue.gao@intl.att.com>
Change-Id: I5bb4e86be935921af1d852d6d7666fb5c8eaf725

kubernetes/common/certInitializer/templates/_certInitializer.yaml
kubernetes/common/readinessCheck/templates/_readinessCheck.tpl

index 32bba45..d5fc5a0 100644 (file)
   env:
     - name: APP_FQI
       value: "{{ $initRoot.fqi }}"
+  {{- if $initRoot.aaf_namespace }}
     - name: aaf_locate_url
-      value: "https://aaf-locate.{{ $dot.Release.Namespace}}:8095"
-    - name: aaf_locator_container
-      value: "oom"
+      value: "https://aaf-locate.{{ $initRoot.aaf_namespace }}:8095"
+    - name: aaf_locator_container_ns
+      value: "{{ $initRoot.aaf_namespace }}"
+  {{- else }}
+    - name: aaf_locate_url
+      value: "https://aaf-locate.{{ $dot.Release.Namespace }}:8095"
     - name: aaf_locator_container_ns
       value: "{{ $dot.Release.Namespace }}"
+  {{- end }}
+    - name: aaf_locator_container
+      value: "oom"
     - name: aaf_locator_fqdn
       value: "{{ $initRoot.fqdn }}"
     - name: aaf_locator_app_ns
index 71201a1..90c278e 100644 (file)
   {{- end }}
   env:
   - name: NAMESPACE
+  {{- if $subchartDot.Values.namespace }}
+    value: {{ $subchartDot.Values.namespace }}
+  {{- else }}
     valueFrom:
       fieldRef:
         apiVersion: v1
         fieldPath: metadata.namespace
+  {{- end }}
   resources:
     limits:
       cpu: {{ $subchartDot.Values.limits.cpu }}