[COMMON] Make imagePullSecrets configurable 37/137537/3
authorAndreas Geissler <andreas-geissler@telekom.de>
Wed, 20 Mar 2024 08:51:32 +0000 (09:51 +0100)
committerAndreas Geissler <andreas-geissler@telekom.de>
Wed, 20 Mar 2024 14:51:27 +0000 (15:51 +0100)
Currently in ONAP the imagePullSecrets is hardcoded to
'onap-docker-registry-key' which is created by the
repository-wrapper component.
With this change the secrets can be configured via setting
global.imagePullSecrets and optionally per image if it is
configured as map (image.pullSecrets)

Issue-ID: OOM-3284

Change-Id: I8644f9b46043b6014219c42928e057b149df43a4
Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
147 files changed:
kubernetes/a1policymanagement/templates/statefulset.yaml
kubernetes/aai/components/aai-babel/templates/deployment.yaml
kubernetes/aai/components/aai-graphadmin/templates/deployment.yaml
kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml
kubernetes/aai/components/aai-graphadmin/templates/job-create-db.yaml
kubernetes/aai/components/aai-graphadmin/templates/job-migration.yaml
kubernetes/aai/components/aai-modelloader/templates/deployment.yaml
kubernetes/aai/components/aai-resources/templates/deployment.yaml
kubernetes/aai/components/aai-schema-service/templates/deployment.yaml
kubernetes/aai/components/aai-sparky-be/templates/deployment.yaml
kubernetes/aai/components/aai-traversal/templates/deployment.yaml
kubernetes/aai/components/aai-traversal/templates/job.yaml
kubernetes/aai/templates/deployment.yaml
kubernetes/cds/components/cds-blueprints-processor/templates/deployment.yaml
kubernetes/cds/components/cds-command-executor/templates/deployment.yaml
kubernetes/cds/components/cds-py-executor/templates/deployment.yaml
kubernetes/cds/components/cds-sdc-listener/templates/deployment.yaml
kubernetes/cds/components/cds-ui/templates/deployment.yaml
kubernetes/cli/templates/deployment.yaml
kubernetes/common/cassandra/templates/statefulset.yaml
kubernetes/common/common/Chart.yaml
kubernetes/common/common/templates/_images.tpl [new file with mode: 0644]
kubernetes/common/common/templates/_mariadb.tpl
kubernetes/common/common/templates/_postgres.tpl
kubernetes/common/common/templates/_tplvalues.tpl [new file with mode: 0644]
kubernetes/common/dgbuilder/templates/deployment.yaml
kubernetes/common/elasticsearch/components/data/templates/statefulset.yaml
kubernetes/common/elasticsearch/components/master/templates/statefulset.yaml
kubernetes/common/elasticsearch/templates/coordinating-deploy.yaml
kubernetes/common/etcd-init/templates/job.yaml
kubernetes/common/etcd/templates/statefulset.yaml
kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml
kubernetes/common/mariadb-galera/templates/statefulset.yaml
kubernetes/common/mariadb-init/templates/job.yaml
kubernetes/common/network-name-gen/templates/deployment.yaml
kubernetes/common/postgres-init/templates/job.yaml
kubernetes/common/postgres/templates/_deployment.tpl
kubernetes/cps/components/cps-core/templates/deployment.yaml
kubernetes/cps/components/cps-temporal/templates/deployment.yaml
kubernetes/cps/components/ncmp-dmi-plugin/templates/deployment.yaml
kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl
kubernetes/dcaegen2-services/components/dcae-ms-healthcheck/templates/deployment.yaml
kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/deployment.yaml
kubernetes/dmaap/components/dmaap-dr-node/templates/statefulset.yaml
kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml
kubernetes/dmaap/components/message-router/templates/statefulset.yaml
kubernetes/helm/starters/onap-app/templates/deployment.yaml
kubernetes/holmes/components/holmes-engine-mgmt/templates/deployment.yaml
kubernetes/holmes/components/holmes-rule-mgmt/templates/deployment.yaml
kubernetes/modeling/components/modeling-etsicatalog/templates/deployment.yaml
kubernetes/msb/components/kube2msb/templates/deployment.yaml
kubernetes/msb/components/msb-consul/templates/deployment.yaml
kubernetes/msb/components/msb-discovery/templates/deployment.yaml
kubernetes/msb/components/msb-eag/templates/deployment.yaml
kubernetes/msb/components/msb-iag/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-fcaps/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-k8s/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-pike/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-prometheus/components/prometheus-alertmanager/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-prometheus/components/prometheus-grafana/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-prometheus/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-starlingx/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-vio/templates/deployment.yaml
kubernetes/multicloud/components/multicloud-windriver/templates/deployment.yaml
kubernetes/multicloud/templates/deployment.yaml
kubernetes/nbi/templates/deployment.yaml
kubernetes/onap/Chart.yaml
kubernetes/onap/values.yaml
kubernetes/oof/components/oof-has/components/oof-has-api/templates/deployment.yaml
kubernetes/oof/components/oof-has/components/oof-has-controller/templates/deployment.yaml
kubernetes/oof/components/oof-has/components/oof-has-data/templates/deployment.yaml
kubernetes/oof/components/oof-has/components/oof-has-reservation/templates/deployment.yaml
kubernetes/oof/components/oof-has/components/oof-has-solver/templates/deployment.yaml
kubernetes/oof/templates/deployment.yaml
kubernetes/platform/components/chartmuseum/templates/deployment.yaml
kubernetes/platform/components/cmpv2-cert-provider/templates/deployment.yaml
kubernetes/platform/components/oom-cert-service/templates/deployment.yaml
kubernetes/policy/components/policy-apex-pdp/templates/deployment.yaml
kubernetes/policy/components/policy-api/templates/deployment.yaml
kubernetes/policy/components/policy-clamp-ac-a1pms-ppnt/templates/deployment.yaml
kubernetes/policy/components/policy-clamp-ac-http-ppnt/templates/deployment.yaml
kubernetes/policy/components/policy-clamp-ac-k8s-ppnt/templates/deployment.yaml
kubernetes/policy/components/policy-clamp-ac-kserve-ppnt/templates/deployment.yaml
kubernetes/policy/components/policy-clamp-ac-pf-ppnt/templates/deployment.yaml
kubernetes/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml
kubernetes/policy/components/policy-distribution/templates/deployment.yaml
kubernetes/policy/components/policy-drools-pdp/templates/statefulset.yaml
kubernetes/policy/components/policy-gui/templates/deployment.yaml
kubernetes/policy/components/policy-nexus/templates/deployment.yaml
kubernetes/policy/components/policy-pap/templates/deployment.yaml
kubernetes/policy/components/policy-xacml-pdp/templates/deployment.yaml
kubernetes/policy/templates/job.yaml
kubernetes/portal-ng/components/portal-ng-bff/templates/deployment.yaml
kubernetes/portal-ng/components/portal-ng-ui/templates/deployment.yaml
kubernetes/robot/templates/deployment.yaml
kubernetes/sdc/components/sdc-be/templates/deployment.yaml
kubernetes/sdc/components/sdc-be/templates/job.yaml
kubernetes/sdc/components/sdc-cs/templates/job.yaml
kubernetes/sdc/components/sdc-fe/templates/deployment.yaml
kubernetes/sdc/components/sdc-helm-validator/templates/deployment.yaml
kubernetes/sdc/components/sdc-onboarding-be/templates/deployment.yaml
kubernetes/sdc/components/sdc-onboarding-be/templates/job.yaml
kubernetes/sdc/components/sdc-wfd-be/templates/deployment.yaml
kubernetes/sdc/components/sdc-wfd-be/templates/job.yaml
kubernetes/sdc/components/sdc-wfd-fe/templates/deployment.yaml
kubernetes/sdnc/components/dmaap-listener/templates/deployment.yaml
kubernetes/sdnc/components/sdnc-ansible-server/templates/deployment.yaml
kubernetes/sdnc/components/sdnc-prom/templates/deployment.yaml
kubernetes/sdnc/components/sdnc-web/templates/deployment.yaml
kubernetes/sdnc/components/ueb-listener/templates/deployment.yaml
kubernetes/sdnc/templates/job.yaml
kubernetes/sdnc/templates/sdnrdb-init-job.yaml
kubernetes/sdnc/templates/statefulset.yaml
kubernetes/so/components/so-admin-cockpit/templates/deployment.yaml
kubernetes/so/components/so-bpmn-infra/templates/deployment.yaml
kubernetes/so/components/so-catalog-db-adapter/templates/deployment.yaml
kubernetes/so/components/so-cnf-adapter/templates/deployment.yaml
kubernetes/so/components/so-cnfm-lcm/templates/deployment.yaml
kubernetes/so/components/so-etsi-nfvo-ns-lcm/templates/deployment.yaml
kubernetes/so/components/so-etsi-sol003-adapter/templates/deployment.yaml
kubernetes/so/components/so-etsi-sol005-adapter/templates/deployment.yaml
kubernetes/so/components/so-mariadb/templates/job.yaml
kubernetes/so/components/so-nssmf-adapter/templates/deployment.yaml
kubernetes/so/components/so-oof-adapter/templates/deployment.yaml
kubernetes/so/components/so-openstack-adapter/templates/deployment.yaml
kubernetes/so/components/so-request-db-adapter/templates/deployment.yaml
kubernetes/so/components/so-sdc-controller/templates/deployment.yaml
kubernetes/so/components/so-sdnc-adapter/templates/deployment.yaml
kubernetes/so/templates/deployment.yaml
kubernetes/strimzi/components/strimzi-kafka-bridge/templates/strimzi-kb.yaml
kubernetes/strimzi/templates/strimzi-kafka.yaml
kubernetes/uui/components/uui-intent-analysis/templates/deployment.yaml
kubernetes/uui/components/uui-intent-analysis/templates/job.yaml
kubernetes/uui/components/uui-nlp/templates/deployment.yaml
kubernetes/uui/components/uui-server/templates/deployment.yaml
kubernetes/uui/components/uui-server/templates/job.yaml
kubernetes/uui/templates/deployment.yaml
kubernetes/vfc/components/vfc-generic-vnfm-driver/templates/deployment.yaml
kubernetes/vfc/components/vfc-huawei-vnfm-driver/templates/deployment.yaml
kubernetes/vfc/components/vfc-nslcm/templates/deployment.yaml
kubernetes/vfc/components/vfc-redis/templates/deployment.yaml
kubernetes/vfc/components/vfc-vnflcm/templates/deployment.yaml
kubernetes/vfc/components/vfc-vnfmgr/templates/deployment.yaml
kubernetes/vfc/components/vfc-vnfres/templates/deployment.yaml
kubernetes/vfc/components/vfc-zte-vnfm-driver/templates/deployment.yaml
kubernetes/vnfsdk/templates/deployment.yaml
kubernetes/vnfsdk/templates/job.yaml

index b1d0407..4458744 100644 (file)
@@ -28,8 +28,7 @@ spec:
     metadata:
       labels: {{- include "common.labels" . | nindent 8 }}
     spec:
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       initContainers:
       - name: {{ include "common.name" . }}-bootstrap-config
         image: {{ include "repositoryGenerator.image.envsubst" . }}
index 397e8fd..c62587e 100644 (file)
@@ -107,5 +107,4 @@ spec:
           emptyDir: {}
         {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 8 }}
 
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 1f666dd..022e142 100644 (file)
@@ -209,5 +209,4 @@ spec:
         configMap:
           name: {{ include "common.fullname" . }}-properties
       restartPolicy: {{ .Values.restartPolicy }}
-      imagePullSecrets:
-      - name: {{ include "common.namespace" . }}-docker-registry-key
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 7d73876..6e6d537 100644 (file)
@@ -153,6 +153,5 @@ spec:
         persistentVolumeClaim:
           claimName: {{ include "common.fullname" . }}-migration
       restartPolicy: Never
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
 {{ end }}
index ac40f09..edc98b7 100644 (file)
@@ -146,6 +146,5 @@ spec:
         configMap:
           name: {{ include "common.fullname" . }}-properties
       restartPolicy: Never
-      imagePullSecrets:
-      - name: {{ include "common.namespace" . }}-docker-registry-key
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
 {{ end }}
index 6b7f89f..9bce98d 100644 (file)
@@ -194,8 +194,7 @@ spec:
         configMap:
           name: {{ include "common.fullname" . }}-properties
       restartPolicy: Never
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
 ---
 apiVersion: batch/v1
 kind: Job
@@ -317,6 +316,5 @@ spec:
         persistentVolumeClaim:
           claimName: {{ include "common.fullname" . }}-migration
       restartPolicy: Never
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
 {{ end }}
index b3fd237..705bd10 100644 (file)
@@ -106,5 +106,4 @@ spec:
         configMap:
           name: {{ include "common.fullname" . }}-log
       restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 1e2880d..5d6e612 100644 (file)
@@ -275,5 +275,4 @@ spec:
         configMap:
           name: {{ include "common.fullname" . }}
       restartPolicy: {{ .Values.restartPolicy }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index d0b8149..0483def 100644 (file)
@@ -148,5 +148,4 @@ spec:
         configMap:
           name: {{ include "common.fullname" . }}-realm
       restartPolicy: {{ .Values.restartPolicy }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 1685bc5..54f93bc 100644 (file)
@@ -140,5 +140,4 @@ spec:
       - name: modeldir
         emptyDir: {}
       restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index d6e49ac..55176bc 100644 (file)
@@ -304,5 +304,4 @@ spec:
         configMap:
           name: {{ include "common.fullname" . }}
       restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index ae8bd85..687dcbf 100644 (file)
@@ -127,6 +127,5 @@ spec:
         configMap:
           name: {{ include "common.fullname" . }}
       restartPolicy: OnFailure
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
 {{ end }}
index 153947e..5a7f38c 100644 (file)
@@ -155,5 +155,4 @@ spec:
         - name: haproxy-cfg
           configMap:
             name: aai-deployment-configmap
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 761b031..9631267 100755 (executable)
@@ -200,5 +200,4 @@ spec:
         - name: processed-config
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index fb728a3..9218a6e 100755 (executable)
@@ -97,5 +97,4 @@ spec:
         {{- else }}
           emptyDir: {}
         {{- end }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 754e0d0..18aefb3 100755 (executable)
@@ -89,5 +89,4 @@ spec:
         - name: {{ include "common.fullname" . }}-blueprints
           persistentVolumeClaim:
             claimName: {{ include "common.release" . }}-cds-blueprints
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index d9d63e3..a106235 100644 (file)
@@ -100,5 +100,4 @@ spec:
               path: application.yaml
             - key: logback.xml
               path: logback.xml
-      imagePullSecrets:
-      - name: {{ include "common.namespace" . }}-docker-registry-key
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 225ee4c..ed5876b 100644 (file)
@@ -82,5 +82,4 @@ spec:
         - name: localtime
           hostPath:
             path: /etc/localtime
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index e28fb45..9f8d71c 100644 (file)
@@ -64,5 +64,4 @@ spec:
       - name: lighttpd
         configMap:
           name: {{ include "common.fullname" . }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 4815d14..bb7027c 100644 (file)
@@ -29,8 +29,7 @@ spec:
     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
       hostNetwork: {{ .Values.hostNetwork }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       containers:
       - name: {{ include "common.name" . }}
         image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
index 1294546..bb9e8a2 100644 (file)
@@ -16,4 +16,4 @@
 apiVersion: v2
 description: Common templates for inclusion in other charts
 name: common
-version: 13.0.3
+version: 13.1.0
diff --git a/kubernetes/common/common/templates/_images.tpl b/kubernetes/common/common/templates/_images.tpl
new file mode 100644 (file)
index 0000000..3bbaabc
--- /dev/null
@@ -0,0 +1,121 @@
+{{/*
+# Copyright Â© Original (https://github.com/bitnami/charts) VMware, Inc.
+# Copyright Â© 2024 Deutsche Telekom
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Return the proper Docker Image Registry Secret Names
+Original, if common way of image definition:
+{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.image .Values.metrics.image .Values.volumePermissions.image .Values.tls.image) "context" $) -}}
+*/}}
+{{- define "common.imagePullSecrets" -}}
+{{- $images := list }}
+{{- if .Values.image }}
+  {{- if kindIs "map" .Values.image -}}
+    {{- $images = append $images ".Values.image" -}}
+  {{- end -}}
+{{- end -}}
+{{- if .Values.metrics }}
+  {{- if .Values.metrics.image }}
+    {{- if kindIs "map" .Values.metrics.image -}}
+      {{- $images = append $images ".Values.metrics.image" -}}
+    {{- end -}}
+  {{- end -}}
+{{- end -}}
+{{- include "common.images._renderPullSecrets" (dict "images" $images "context" $) -}}
+{{- end -}}
+
+{{/*
+Return the proper image name
+{{ include "common.images.image" ( dict "imageRoot" .Values.path.to.the.image "global" .Values.global ) }}
+*/}}
+{{- define "common.images.image" -}}
+{{- $registryName := .imageRoot.registry -}}
+{{- $repositoryName := .imageRoot.repository -}}
+{{- $separator := ":" -}}
+{{- $termination := .imageRoot.tag | toString -}}
+{{- if .global }}
+    {{- if .global.imageRegistry }}
+     {{- $registryName = .global.imageRegistry -}}
+    {{- end -}}
+{{- end -}}
+{{- if .imageRoot.digest }}
+    {{- $separator = "@" -}}
+    {{- $termination = .imageRoot.digest | toString -}}
+{{- end -}}
+{{- if $registryName }}
+    {{- printf "%s/%s%s%s" $registryName $repositoryName $separator $termination -}}
+{{- else -}}
+    {{- printf "%s%s%s"  $repositoryName $separator $termination -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the proper Docker Image Registry Secret Names evaluating values as templates
+{{ include "common.images.renderPullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "context" $) }}
+*/}}
+{{- define "common.images._renderPullSecrets" -}}
+  {{- $pullSecrets := list }}
+  {{- $context := .context }}
+  {{- $images := .images }}
+
+  {{- if $context.Values.global }}
+    {{- range $context.Values.global.imagePullSecrets -}}
+      {{- if kindIs "map" . -}}
+        {{- $pullSecrets = append $pullSecrets (include "common.tplvalues._render" (dict "value" .name "context" $context)) -}}
+      {{- else -}}
+        {{- $pullSecrets = append $pullSecrets (include "common.tplvalues._render" (dict "value" . "context" $context)) -}}
+      {{- end -}}
+    {{- end -}}
+  {{- end -}}
+
+  {{- range $image := $images -}}
+    {{- if contains "pullSecret" $image -}}
+      {{- range $pullSecret := $image.pullSecrets -}}
+        {{- if kindIs "map" $pullSecret -}}
+          {{- $pullSecrets = append $pullSecrets $pullSecret.name -}}
+        {{- else -}}
+          {{- $pullSecrets = append $pullSecrets $pullSecret -}}
+        {{- end -}}
+      {{- end -}}
+    {{- end -}}
+  {{- end -}}
+
+  {{- if (not (empty $pullSecrets)) }}
+imagePullSecrets:
+    {{- range $pullSecrets | uniq }}
+  - name: {{ . }}
+    {{- end }}
+  {{- else -}}
+imagePullSecrets: []
+  {{- end }}
+{{- end -}}
+
+{{/*
+Return the proper image version (ingores image revision/prerelease info & fallbacks to chart appVersion)
+{{ include "common.images.version" ( dict "imageRoot" .Values.path.to.the.image "chart" .Chart ) }}
+*/}}
+{{- define "common.images._version" -}}
+{{- $imageTag := .imageRoot.tag | toString -}}
+{{/* regexp from https://github.com/Masterminds/semver/blob/23f51de38a0866c5ef0bfc42b3f735c73107b700/version.go#L41-L44 */}}
+{{- if regexMatch `^([0-9]+)(\.[0-9]+)?(\.[0-9]+)?(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?$` $imageTag -}}
+    {{- $version := semver $imageTag -}}
+    {{- printf "%d.%d.%d" $version.Major $version.Minor $version.Patch -}}
+{{- else -}}
+    {{- print .chart.AppVersion -}}
+{{- end -}}
+{{- end -}}
index e21f0f6..caf2fd1 100644 (file)
@@ -265,8 +265,7 @@ spec:
     key: password
   image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.mariadbOperator.image }}:{{ $dot.Values.mariadbOperator.appVersion }}
   imagePullPolicy: IfNotPresent
-  imagePullSecrets:
-    - name: {{ include "common.namespace" . }}-docker-registry-key
+  {{- include "common.imagePullSecrets" . | nindent 2 }}
   port: 3306
   replicas: {{ $dot.Values.replicaCount }}
   {{- if $dot.Values.mariadbOperator.galera.enabled }}
index d21d8c7..dcd17c0 100644 (file)
@@ -87,8 +87,7 @@ spec:
   {{- if .Values.postgresOperator.imagePostgres }}
   image: {{ .Values.postgresOperator.imagePostgres | quote }}
   {{- end }}
-  imagePullSecrets:
-    - name: {{ include "common.namespace" . }}-docker-registry-key
+  {{- include "common.imagePullSecrets" . | nindent 2 }}
   postgresVersion: {{ $dot.Values.postgresOperator.postgresVersion }}
   instances:
     - name: {{ default "instance1" .Values.postgresOperator.instanceName | quote }}
diff --git a/kubernetes/common/common/templates/_tplvalues.tpl b/kubernetes/common/common/templates/_tplvalues.tpl
new file mode 100644 (file)
index 0000000..0c6dbec
--- /dev/null
@@ -0,0 +1,49 @@
+{{/*
+# Copyright Â© Original (https://github.com/bitnami/charts) VMware, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Renders a value that contains template perhaps with scope if the scope is present.
+Usage:
+{{ include "common.tplvalues._render" ( dict "value" .Values.path.to.the.Value "context" $ ) }}
+{{ include "common.tplvalues._render" ( dict "value" .Values.path.to.the.Value "context" $ "scope" $app ) }}
+*/}}
+{{- define "common.tplvalues._render" -}}
+{{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }}
+{{- if contains "{{" (toJson .value) }}
+  {{- if .scope }}
+      {{- tpl (cat "{{- with $.RelativeScope -}}" $value "{{- end }}") (merge (dict "RelativeScope" .scope) .context) }}
+  {{- else }}
+    {{- tpl $value .context }}
+  {{- end }}
+{{- else }}
+    {{- $value }}
+{{- end }}
+{{- end -}}
+
+{{/*
+Merge a list of values that contains template after rendering them.
+Merge precedence is consistent with http://masterminds.github.io/sprig/dicts.html#merge-mustmerge
+Usage:
+{{ include "common.tplvalues._merge" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }}
+*/}}
+{{- define "common.tplvalues._merge" -}}
+{{- $dst := dict -}}
+{{- range .values -}}
+{{- $dst = include "common.tplvalues._render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | merge $dst -}}
+{{- end -}}
+{{ $dst | toYaml }}
+{{- end -}}
index 5d3038b..18963f9 100644 (file)
@@ -130,5 +130,4 @@ spec:
         - name: config
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index a7278ba..e6c5a87 100644 (file)
@@ -34,8 +34,7 @@ spec:
   template:
     metadata: {{- include "common.templateMetadata" (dict "labels" $labels "dot" .) | nindent 6 }}
     spec:
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       {{- if .Values.affinity }}
       affinity: {{- include "common.tplValue" (dict "value" .Values.affinity "context" $) | nindent 8 }}
       {{- end }}
index 85ea2bb..8ee0fc5 100644 (file)
@@ -32,8 +32,7 @@ spec:
   template:
     metadata: {{- include "common.templateMetadata" (dict "labels" $labels "dot" .) | nindent 6 }}
     spec:
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       {{- if .Values.affinity }}
       affinity: {{- include "common.tplValue" (dict "value" .Values.affinity "context" $) | nindent 8 }}
       {{- end }}
index 43eb92d..0bc6de2 100644 (file)
@@ -30,8 +30,7 @@ spec:
   template:
     metadata: {{- include "common.templateMetadata" (dict "labels" $labels "dot" .) | nindent 6 }}
     spec:
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       {{- if .Values.affinity }}
       affinity: {{- include "common.tplValue" (dict "value" .Values.affinity "context" $) | nindent 8 }}
       {{- end }}
index f1f1b0e..8919dc7 100644 (file)
@@ -111,5 +111,4 @@ spec:
         hostPath:
           path: /etc/localtime
       restartPolicy: Never
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 829e17b..722a27d 100644 (file)
@@ -35,8 +35,7 @@ spec:
       tolerations:
 {{ toYaml .Values.tolerations | indent 8 }}
 {{- end }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       containers:
       - name: {{ include "common.name" .  }}
         image: {{ include "repositoryGenerator.googleK8sRepository" . }}/{{ .Values.image }}
index 4548626..9f0a786 100644 (file)
@@ -162,8 +162,7 @@ spec:
                   readOnly: true
                 - name: backup-dir
                   mountPath: /backup
-          imagePullSecrets:
-            - name: {{ include "common.namespace" . }}-docker-registry-key
+          {{- include "common.imagePullSecrets" . | nindent 10 }}
           volumes:
             - name: localtime
               hostPath:
index 2f5b33f..70cc0c3 100644 (file)
@@ -221,8 +221,7 @@ spec:
           {{ include "common.containerSecurityContext" . | indent 10 | trim }}
           resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
         {{- end }}
-      imagePullSecrets:
-        - name: {{ include "common.namespace" . }}-docker-registry-key
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       {{- if .Values.schedulerName }}
       schedulerName: {{ .Values.schedulerName | quote }}
       {{- end }}
index 0180fec..88ff0e0 100644 (file)
@@ -120,5 +120,4 @@ spec:
           name: {{ include "mariadbInit.configMap" . }}
           defaultMode: 0755
       restartPolicy: Never
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 4d05ae3..6bba995 100644 (file)
@@ -117,5 +117,4 @@ spec:
       - name: certs
         secret:
             secretName: {{ include "common.release" . }}-aai-keystore
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 7fa2e9f..6736559 100644 (file)
@@ -100,5 +100,4 @@ spec:
         emptyDir:
           medium: Memory
       restartPolicy: Never
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index fa25a42..aae5da9 100644 (file)
@@ -57,8 +57,7 @@ spec:
         release: {{ include "common.release" $dot }}
         name: "{{ index $dot.Values "container" "name" $pgMode }}"
     spec:
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" $dot }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" $dot | nindent 6 }}
       initContainers:
       - command:
         - sh
index 8079e88..daf6fd3 100644 (file)
@@ -142,5 +142,4 @@ spec:
             medium: Memory
         - name: init-temp
           emptyDir: {}
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 5990040..143740d 100644 (file)
@@ -114,6 +114,4 @@ spec:
             medium: Memory
         - name: init-temp
           emptyDir: {}
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
-
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 2d653a1..351f883 100644 (file)
@@ -119,5 +119,4 @@ spec:
             medium: Memory
         - name: init-temp
           emptyDir: {}
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index b0c76a9..c841d6d 100644 (file)
@@ -403,8 +403,7 @@ spec:
       {{- end }}
       {{- include "common.dmaap.provisioning._volumes" . | nindent 6 -}}
       {{- include "dcaegen2-services-common._externalVolumes" . | nindent 6 }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
 {{ end -}}
 
 {{/*
index 7963b76..f6d1794 100644 (file)
@@ -64,5 +64,4 @@ spec:
         - name: {{ include "common.fullname" . }}-expected-components
           configMap:
             name: {{ include "common.release" . }}-dcae-expected-microservices
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 368c9d3..64d8811 100644 (file)
@@ -74,5 +74,4 @@ spec:
             name: {{ include "common.fullname" . }}-application-config-configmap
             defaultMode: 420
             optional: true
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 994e7cb..2659e96 100644 (file)
@@ -74,8 +74,7 @@ spec:
         {{- if .Values.affinity }}
         affinity: {{ toYaml .Values.affinity | nindent 10 }}
         {{- end }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
         - name: localtime
index b8c32b3..076fab3 100644 (file)
@@ -80,5 +80,4 @@ spec:
       - name: {{ include "common.fullname" . }}-log-conf
         configMap:
           name: {{ include "common.fullname" . }}-log
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index dbe3ffd..399e54f 100644 (file)
@@ -143,8 +143,7 @@ spec:
           secret:
             defaultMode: 288
             secretName: {{ include "common.release" . }}-strimzi-cluster-ca-cert
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
 ---
 apiVersion: networking.k8s.io/v1
 kind: NetworkPolicy
index 2fe95c0..2e47ba6 100644 (file)
@@ -99,5 +99,4 @@ spec:
 #            items:
 #            - key: application.properties
 #              path: application.properties
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index fdbca09..641f032 100644 (file)
@@ -142,5 +142,4 @@ spec:
       - name: {{ include "common.fullname" . }}-env-config
         emptyDir:
           medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index f24d8ea..e71187c 100644 (file)
@@ -137,5 +137,4 @@ spec:
       - name: {{ include "common.fullname" . }}-env-config
         emptyDir:
           medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index c2b810f..a23d257 100644 (file)
@@ -172,5 +172,4 @@ spec:
             name : {{ include "common.fullname" . }}-logging-configmap
 
         {{ include "common.log.volumes" . | nindent 8 }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 5fc0975..2501d59 100644 (file)
@@ -85,5 +85,4 @@ spec:
         - name: localtime
           hostPath:
             path: /etc/localtime
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 5209bb5..89a2b66 100644 (file)
@@ -92,5 +92,4 @@ spec:
           configMap:
             name: {{ include "common.fullname" . }}-entrypoint
             defaultMode: 0777
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 81458aa..94a328c 100644 (file)
@@ -110,5 +110,4 @@ spec:
         - name: localtime
           hostPath:
             path: /etc/localtime
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 42fa395..02864b9 100644 (file)
@@ -99,5 +99,4 @@ spec:
         - name: localtime
           hostPath:
             path: /etc/localtime
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 42fa395..02864b9 100644 (file)
@@ -99,5 +99,4 @@ spec:
         - name: localtime
           hostPath:
             path: /etc/localtime
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 3445489..7c850a4 100644 (file)
@@ -84,6 +84,5 @@ spec:
       - name: fcaps-logconfig
         configMap:
           name: {{ include "common.fullname" . }}-log-configmap
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       restartPolicy: Always
index 325dbb0..6513ee2 100644 (file)
@@ -88,5 +88,4 @@ spec:
           name: {{ include "common.fullname" . }}
       - name: artifact-data
         emptyDir: {}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 0a16cc5..1822695 100644 (file)
@@ -83,6 +83,5 @@ spec:
       - name: pike-logconfig
         configMap:
           name: {{ include "common.fullname" . }}-log-configmap
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       restartPolicy: Always
index ca56b67..185aa1e 100644 (file)
@@ -93,8 +93,6 @@ spec:
         {{- else }}
           emptyDir: {}
         {{- end }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       restartPolicy: Always
-
 {{- end -}}
index 2dea842..e578feb 100644 (file)
@@ -132,8 +132,6 @@ spec:
             name: {{ include "common.fullname" $ }}-dashboards-{{ . }}
           {{- end }}
         {{- end }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       restartPolicy: Always
-
 {{- end -}}
index 1de9a8b..a75ac28 100644 (file)
@@ -103,6 +103,5 @@ spec:
         {{- else }}
           emptyDir: {}
         {{- end }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       restartPolicy: Always
index 240ef11..96942dd 100644 (file)
@@ -98,6 +98,5 @@ spec:
           name: {{ include "common.fullname" . }}-log-configmap
       - name: artifact-data
         emptyDir: {}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       restartPolicy: Always
index e80476c..9e26cc3 100644 (file)
@@ -77,6 +77,5 @@ spec:
       - name: vio-logconfig
         configMap:
           name: {{ include "common.fullname" . }}-log-configmap
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       restartPolicy: Always
index 7225154..434c0d1 100644 (file)
@@ -112,6 +112,5 @@ spec:
       {{- else }}
         emptyDir: {}
       {{- end }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       restartPolicy: Always
index 3b4e0b3..80a09c7 100644 (file)
@@ -88,6 +88,5 @@ spec:
       - name: framework-logconfig
         configMap:
           name: {{ include "common.fullname" . }}-log-configmap
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       restartPolicy: Always
index ada87e2..3e3475c 100644 (file)
@@ -117,5 +117,4 @@ spec:
         - name: localtime
           hostPath:
             path: /etc/localtime
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 715da4a..45d8da1 100644 (file)
@@ -15,8 +15,8 @@
 
 apiVersion: v2
 name: onap
-version: 13.0.0
-appVersion: Montreal
+version: 14.0.0
+appVersion: NewDelhi
 description: Open Network Automation Platform (ONAP)
 home: https://www.onap.org/
 sources:
index 7f55837..a4bf64b 100755 (executable)
@@ -58,6 +58,20 @@ global:
   #   user: myuser
   #   password: mypassord
 
+  # Default definition of the secret containing the docker image repository
+  # credentials. In the default ONAP deployment the secret is created by the
+  # repository-wrapper component, which uses the secrets defined above.
+  # If this is not wanted or other secrets are created, alternative secret
+  # names can be used
+  # Overrides for specific images can be done, if the "image" entry is used as
+  # a map and the "pullSecrets" is used, e.g.
+  # image:
+  #   ...
+  #   pullSecrets:
+  #     - myRegistryKeySecretName
+  #
+  imagePullSecrets:
+    - '{{ include "common.namespace" . }}-docker-registry-key'
 
   # common global images
   # Busybox for simple shell manipulation
index 9c695b8..dfcb797 100755 (executable)
@@ -116,5 +116,4 @@ spec:
               path: conductor.conf
             - key: log.conf
               path: log.conf
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index a7be1ba..c5efd70 100755 (executable)
@@ -91,5 +91,4 @@ spec:
               path: log.conf
             - key: healthy.sh
               path: healthy.sh
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index e5d448e..082a9af 100755 (executable)
@@ -91,5 +91,4 @@ spec:
               path: log.conf
             - key: healthy.sh
               path: healthy.sh
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 334936c..380351f 100755 (executable)
@@ -91,5 +91,4 @@ spec:
               path: log.conf
             - key: healthy.sh
               path: healthy.sh
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 7f3945b..f7251ac 100755 (executable)
@@ -91,5 +91,4 @@ spec:
               path: log.conf
             - key: healthy.sh
               path: healthy.sh
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index e67bdc1..9110450 100644 (file)
@@ -97,5 +97,4 @@ spec:
               path: log.yml
             - key: slicing_config.yaml
               path: slicing_config.yaml
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index cc07f27..3956255 100644 (file)
@@ -79,5 +79,4 @@ spec:
           emptyDir: {}
         {{- end }}
 
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index ce5e410..3513c21 100644 (file)
@@ -43,8 +43,7 @@ spec:
       {{- end }}
       {{- end }}
     spec:
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       initContainers:
       {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
       containers:
index 657606b..06fdaf9 100644 (file)
@@ -33,8 +33,7 @@ spec:
       {{- end }}
       {{- end }}
     spec:
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       volumes:
 {{- if .Values.global.addTestingComponents }}
         - name: cmp-servers-template-volume
index e68c9fd..daed724 100755 (executable)
@@ -134,5 +134,4 @@ spec:
         - name: apexconfig
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 0456c86..ccb1e19 100755 (executable)
@@ -111,5 +111,4 @@ spec:
         - name: apiconfig-processed
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 1c3c100..4ed282a 100755 (executable)
@@ -104,5 +104,4 @@ spec:
         - name: ac-a1pms-ppnt-config-processed
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index dddae1d..8d0d229 100644 (file)
@@ -104,5 +104,4 @@ spec:
         - name: ac-http-ppnt-config-processed
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index df45448..d69a858 100644 (file)
@@ -104,5 +104,4 @@ spec:
         - name: ac-k8s-ppnt-config-processed
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 1067a7e..f5ecd27 100755 (executable)
@@ -104,5 +104,4 @@ spec:
         - name: ac-kserve-ppnt-config-processed
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index a13b9f7..5786fcf 100644 (file)
@@ -112,5 +112,4 @@ spec:
         - name: ac-pf-ppnt-config-processed
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 67a7022..be8c35a 100644 (file)
@@ -129,5 +129,4 @@ spec:
         - name: ac-runtime-config-processed
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index f11fe83..f4b8ff7 100755 (executable)
@@ -112,5 +112,4 @@ spec:
         - name: distributionconfig
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index ed09551..013732e 100755 (executable)
@@ -144,5 +144,4 @@ spec:
               path: {{ base $path }}
               mode: 0644
             {{- end }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index ba90086..ff1ae94 100644 (file)
@@ -124,5 +124,4 @@ spec:
         - name: policy-gui-config-processed
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index ec579d8..c56ed8d 100755 (executable)
@@ -82,5 +82,4 @@ spec:
         {{- else }}
           emptyDir: {}
         {{- end }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 7346b99..67a2270 100755 (executable)
@@ -152,5 +152,4 @@ spec:
         - name: papconfig-processed
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index e89dd7c..b475d2c 100755 (executable)
@@ -123,5 +123,4 @@ spec:
         - name: pdpxconfig-processed
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 7129392..697c25a 100755 (executable)
@@ -33,8 +33,7 @@ spec:
         release: {{ include "common.release" . }}
       name: {{ include "common.name" . }}-galera-init
     spec:
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       initContainers:
       {{- if .Values.global.mariadbGalera.localCluster }}
       {{-   if .Values.global.mariadbGalera.useOperator }}
@@ -121,8 +120,7 @@ spec:
         release: {{ include "common.release" . }}
       name: {{ include "common.name" . }}-pg-init
     spec:
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       initContainers: {{ if .Values.global.postgres.localCluster }}{{ include "common.readinessCheck.waitFor" . | nindent 6 }}{{ end }}
       containers:
       - name: {{ include "common.name" . }}-pg-config
@@ -198,8 +196,7 @@ spec:
         release: {{ include "common.release" . }}
       name: {{ include "common.name" . }}-galera-config
     spec:
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       initContainers:
       - name: {{ include "common.name" . }}-init-readiness
         image: {{ include "repositoryGenerator.image.readiness" . }}
@@ -297,8 +294,7 @@ spec:
         release: {{ include "common.release" . }}
       name: {{ include "common.name" . }}-pg-config
     spec:
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       initContainers:
       - name: {{ include "common.name" . }}-init-readiness
         image: {{ include "repositoryGenerator.image.readiness" . }}
index 15ff2be..ef54110 100644 (file)
@@ -8,8 +8,7 @@ spec:
   template:
     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       containers:
         - name: {{ .Chart.Name }}
           image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image.imageName }}:{{ .Values.image.tag | default .Chart.AppVersion }}
index ab3170b..96f21f8 100644 (file)
@@ -24,8 +24,7 @@ spec:
   template:
     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       containers:
         - name: {{ .Chart.Name }}
           image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image.imageName }}:{{ .Values.image.tag | default .Chart.AppVersion }}
index 0db47f9..60316ed 100644 (file)
@@ -112,5 +112,4 @@ spec:
         configMap:
           name: {{ include "common.fullname" . }}-lighttpd-ssl-configmap
           defaultMode: 0600
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 92bad92..7adc9e8 100644 (file)
@@ -158,5 +158,4 @@ spec:
           defaultMode: 0755
       - name: logs
         emptyDir: {}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 4a0f830..e961443 100644 (file)
@@ -85,5 +85,4 @@ spec:
             defaultMode: 0755
         - name: sdc-logs
           emptyDir: {}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 8650fff..29596bc 100644 (file)
@@ -103,5 +103,4 @@ spec:
       - name: {{ include "common.fullname" . }}-cqlshrc
         configMap:
           name: {{ include "common.release" . }}-sdc-cqlshrc
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index befb609..4227b40 100644 (file)
@@ -133,5 +133,4 @@ spec:
             defaultMode: 0755
         - name: logs
           emptyDir: {}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index f736a17..f3572ca 100644 (file)
@@ -50,5 +50,4 @@ spec:
             periodSeconds: {{ .Values.startup.periodSeconds }}
             successThreshold: {{ .Values.startup.successThreshold }}
             failureThreshold: {{ .Values.startup.failureThreshold }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 0bba380..15180dc 100644 (file)
@@ -135,5 +135,4 @@ spec:
           defaultMode: 0755
       - name:  logs
         emptyDir: {}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 3770e69..8ceca38 100644 (file)
@@ -102,5 +102,4 @@ spec:
       - name: {{ include "common.fullname" . }}-cqlshrc
         configMap:
           name: {{ include "common.release" . }}-sdc-cqlshrc
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index ec87f1d..59ebb02 100644 (file)
@@ -114,5 +114,4 @@ spec:
             value: "false"
           resources: {{ include "common.resources" . | nindent 12 }}
       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index a305911..5b6762b 100644 (file)
@@ -86,6 +86,5 @@ spec:
         - name: {{ include "common.fullname" . }}-cqlshrc
           configMap:
             name: {{ include "common.release" . }}-sdc-cqlshrc
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
 {{ end }}
index 4925689..b5a2249 100644 (file)
@@ -105,5 +105,4 @@ spec:
         {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }}
         - name: logs
           emptyDir: {}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 0a31e82..d8f1afd 100644 (file)
@@ -133,5 +133,4 @@ spec:
         - name: properties
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 146f06f..731a66d 100644 (file)
@@ -116,5 +116,4 @@ spec:
         - name: config
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 34b0164..66eb307 100644 (file)
@@ -92,5 +92,4 @@ spec:
         {{- else }}
           emptyDir: {}
         {{- end }}
-      imagePullSecrets:
-        - name: {{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 3825b99..cdbe90e 100644 (file)
@@ -110,5 +110,4 @@ spec:
         hostPath:
           path: /etc/localtime
 
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index d374032..579e076 100644 (file)
@@ -128,5 +128,4 @@ spec:
         - name: properties
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index db33114..5aaae2a 100755 (executable)
@@ -177,6 +177,5 @@ spec:
         emptyDir:
           medium: Memory
       restartPolicy: Never
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
 {{- end -}}
index 983fe57..2c31411 100755 (executable)
@@ -145,6 +145,5 @@ spec:
           name: {{ include "common.fullname" . }}-properties
           defaultMode: 0644
       restartPolicy: Never
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
 {{ end -}}
index f8e03b1..86a011b 100644 (file)
@@ -451,8 +451,7 @@ spec:
       {{- if .Values.affinity }}
       affinity: {{ toYaml .Values.affinity | nindent 8 }}
       {{- end }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
         - name: localtime
index f5fa5ce..372224c 100644 (file)
@@ -103,5 +103,4 @@ spec:
       - name: config
         configMap:
             name: {{ include "common.fullname" . }}-app
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 5937e39..a17e0e5 100755 (executable)
@@ -76,5 +76,4 @@ spec:
       {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
       - name:  {{ include "common.fullname" . }}-logs
         emptyDir: {}
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 887efd2..e3a77de 100755 (executable)
@@ -66,5 +66,4 @@ spec:
       - name: config
         configMap:
             name: {{ include "common.fullname" . }}-app-configmap
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 50a15e5..d8670f1 100755 (executable)
@@ -100,5 +100,4 @@ spec:
         - name: encoder
           emptyDir:
             medium: Memory
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 2f035db..45572c9 100644 (file)
@@ -72,5 +72,4 @@ spec:
         - name: config
           configMap:
             name: {{ include "common.fullname" . }}-app-configmap
-      imagePullSecrets:
-          - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index fc9528e..19cf991 100644 (file)
@@ -84,5 +84,4 @@ spec:
         - name: config
           configMap:
             name: {{ include "common.fullname" . }}-app-configmap
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 7854165..4067eee 100755 (executable)
@@ -57,5 +57,4 @@ spec:
       - name: config
         configMap:
             name: {{ include "common.fullname" . }}-app-configmap
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 3e63b45..28e8709 100755 (executable)
@@ -75,5 +75,4 @@ spec:
       - name: config
         configMap:
             name: {{ include "common.fullname" . }}-app-configmap
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index a2edf33..d1fce49 100644 (file)
@@ -73,8 +73,7 @@ spec:
       - name: backup-storage
         persistentVolumeClaim:
           claimName: {{ include "common.fullname" . }}-migration
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       restartPolicy: Never
 ---
 {{- end }}
@@ -206,5 +205,4 @@ spec:
           claimName: {{ include "common.fullname" . }}-migration
       {{- end }}
       restartPolicy: Never
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 32a9eff..5aea302 100755 (executable)
@@ -91,5 +91,4 @@ spec:
         - name: config
           configMap:
             name: {{ include "common.fullname" . }}
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 100371b..eef3ef4 100755 (executable)
@@ -80,5 +80,4 @@ spec:
       {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
       - name:  {{ include "common.fullname" . }}-logs
         emptyDir: {}
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index c2db839..247b8cb 100755 (executable)
@@ -76,5 +76,4 @@ spec:
       {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
       - name:  {{ include "common.fullname" . }}-logs
         emptyDir: {}
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index f6678a4..329d45e 100755 (executable)
@@ -66,5 +66,4 @@ spec:
       - name: config
         configMap:
           name: {{ include "common.fullname" . }}-app-configmap
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 12de6bd..e3a0e2b 100755 (executable)
@@ -81,5 +81,4 @@ spec:
       {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
       - name:  {{ include "common.fullname" . }}-logs
         emptyDir: {}
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 141b5ab..e298069 100755 (executable)
@@ -78,5 +78,4 @@ spec:
       {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
       - name:  {{ include "common.fullname" . }}-logs
         emptyDir: {}
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 3110802..dcf04b0 100755 (executable)
@@ -76,5 +76,4 @@ spec:
       {{ include "common.log.volumes" . | nindent 6 }}
       - name:  {{ include "common.fullname" . }}-logs
         emptyDir: {}
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 7788dc1..b081e29 100644 (file)
@@ -34,3 +34,6 @@ spec:
       configMapKeyRef:
         key: log4j2.properties
         name: {{ include "common.fullname" . }}-kb-logging-cm
+  template:
+    pod:
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index a808b84..aee4696 100644 (file)
@@ -69,6 +69,7 @@ spec:
         - {{ .Values.config.strimziKafkaAdminUser }}
     template:
       pod:
+        {{- include "common.imagePullSecrets" . | nindent 8 }}
         securityContext:
           runAsUser: 0
           fsGroup: 0
@@ -113,6 +114,7 @@ spec:
   zookeeper:
     template:
       pod:
+        {{- include "common.imagePullSecrets" . | nindent 8 }}
         securityContext:
           runAsUser: 0
           fsGroup: 0
@@ -149,10 +151,16 @@ spec:
           key: zookeeper-metrics-config.yml
     {{- end }}
   entityOperator:
+    template:
+      pod:
+        {{- include "common.imagePullSecrets" . | nindent 8 }}
     topicOperator: {}
     userOperator: {}
   {{- if .Values.cruiseControl.enabled }}
   cruiseControl:
+    template:
+      pod:
+        {{- include "common.imagePullSecrets" . | nindent 8 }}
     metricsConfig:
       type: {{ .Values.cruiseControl.metricsConfig.type }}
       valueFrom:
@@ -162,6 +170,9 @@ spec:
   {{- end }}
   {{- if .Values.metrics.kafkaExporter.enabled }}
   kafkaExporter:
+    template:
+      pod:
+        {{- include "common.imagePullSecrets" . | nindent 8 }}
     topicRegex: {{ .Values.metrics.kafkaExporter.topicRegex }}
     groupRegex: {{ .Values.metrics.kafkaExporter.groupRegex }}
     resources:
index 3c3f60e..d2824d1 100644 (file)
@@ -71,5 +71,4 @@ spec:
         configMap:
           name: {{ include "common.fullname" . }}-entrypoint
           defaultMode: 0755
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 9191af0..c020f0e 100644 (file)
@@ -74,8 +74,7 @@ spec:
           mountPath: /aaa/init/intent-analysis-init.sql
           subPath: intent-analysis-init.sql
       {{ include "common.waitForJobContainer" . | indent 6 | trim }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
       - name: init-data
index e72ee44..8ef2792 100644 (file)
@@ -57,6 +57,4 @@ spec:
       {{- else }}
         emptyDir: {}
       {{- end }}
-
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 64a0413..eedbe6a 100644 (file)
@@ -126,5 +126,4 @@ spec:
         configMap:
           name: {{ include "common.fullname" . }}-entrypoint
           defaultMode: 0755
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 943079b..6ca5ee4 100644 (file)
@@ -66,11 +66,9 @@ spec:
           mountPath: /aaa/init/postgres.sql
           subPath: postgres.sql
       {{ include "common.waitForJobContainer" . | indent 6 | trim }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
       - name: init-data
         configMap:
           name: {{ include "common.fullname" . }}
-
index 61b0b2d..c9feacc 100644 (file)
@@ -94,5 +94,4 @@ spec:
       - name: config
         emptyDir:
           medium: Memory
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 47a74b7..93d9257 100644 (file)
@@ -100,5 +100,4 @@ spec:
           configMap:
             name : {{ include "common.fullname" . }}-logging-configmap
         {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index a6da5e3..2defebb 100644 (file)
@@ -103,5 +103,4 @@ spec:
           configMap:
             name : {{ include "common.fullname" . }}-logging-configmap
         {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 280c038..063713d 100644 (file)
@@ -137,5 +137,4 @@ spec:
           configMap:
             name : {{ include "common.fullname" . }}-logging-configmap
         {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 2739bd6..02fc994 100644 (file)
@@ -64,5 +64,4 @@ spec:
         affinity:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index a9cf562..fa874b5 100644 (file)
@@ -137,5 +137,4 @@ spec:
           configMap:
             name : {{ include "common.fullname" . }}-logging-configmap
         {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 7644ba3..eb25f90 100644 (file)
@@ -138,5 +138,4 @@ spec:
             name : {{ include "common.fullname" . }}-logging-configmap
 
         {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index ae9656a..93d9196 100644 (file)
@@ -137,5 +137,4 @@ spec:
           configMap:
             name : {{ include "common.fullname" . }}-logging-configmap
         {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 2a07ed6..39a8d38 100644 (file)
@@ -100,5 +100,4 @@ spec:
           configMap:
             name : {{ include "common.fullname" . }}-logging-configmap
         {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
index 9ba8f27..bf9ad3e 100644 (file)
@@ -62,8 +62,7 @@ spec:
             port: {{ .Values.service.internalPort }}
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       volumes:
       - name: init-data-input
         configMap:
index ea06b54..7c09d97 100644 (file)
@@ -75,8 +75,7 @@ spec:
           mountPath: /aaa/init/marketplace_tables_postgres.sql
           subPath: marketplace_tables_postgres.sql
       {{ include "common.waitForJobContainer" . | indent 6 | trim }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       volumes:
       - name: init-data
         configMap: