[COMMON] Make imagePullSecrets configurable
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>
diff --git a/kubernetes/uui/components/uui-intent-analysis/templates/deployment.yaml b/kubernetes/uui/components/uui-intent-analysis/templates/deployment.yaml
index 3c3f60e..d2824d1 100644
--- a/kubernetes/uui/components/uui-intent-analysis/templates/deployment.yaml
+++ b/kubernetes/uui/components/uui-intent-analysis/templates/deployment.yaml
@@ -71,5 +71,4 @@
configMap:
name: {{ include "common.fullname" . }}-entrypoint
defaultMode: 0755
- imagePullSecrets:
- - name: "{{ include "common.namespace" . }}-docker-registry-key"
+ {{- include "common.imagePullSecrets" . | nindent 6 }}
diff --git a/kubernetes/uui/components/uui-intent-analysis/templates/job.yaml b/kubernetes/uui/components/uui-intent-analysis/templates/job.yaml
index 9191af0..c020f0e 100644
--- a/kubernetes/uui/components/uui-intent-analysis/templates/job.yaml
+++ b/kubernetes/uui/components/uui-intent-analysis/templates/job.yaml
@@ -74,8 +74,7 @@
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
diff --git a/kubernetes/uui/components/uui-nlp/templates/deployment.yaml b/kubernetes/uui/components/uui-nlp/templates/deployment.yaml
index e72ee44..8ef2792 100644
--- a/kubernetes/uui/components/uui-nlp/templates/deployment.yaml
+++ b/kubernetes/uui/components/uui-nlp/templates/deployment.yaml
@@ -57,6 +57,4 @@
{{- else }}
emptyDir: {}
{{- end }}
-
- imagePullSecrets:
- - name: "{{ include "common.namespace" . }}-docker-registry-key"
+ {{- include "common.imagePullSecrets" . | nindent 6 }}
diff --git a/kubernetes/uui/components/uui-server/templates/deployment.yaml b/kubernetes/uui/components/uui-server/templates/deployment.yaml
index 64a0413..eedbe6a 100644
--- a/kubernetes/uui/components/uui-server/templates/deployment.yaml
+++ b/kubernetes/uui/components/uui-server/templates/deployment.yaml
@@ -126,5 +126,4 @@
configMap:
name: {{ include "common.fullname" . }}-entrypoint
defaultMode: 0755
- imagePullSecrets:
- - name: "{{ include "common.namespace" . }}-docker-registry-key"
+ {{- include "common.imagePullSecrets" . | nindent 6 }}
diff --git a/kubernetes/uui/components/uui-server/templates/job.yaml b/kubernetes/uui/components/uui-server/templates/job.yaml
index 943079b..6ca5ee4 100644
--- a/kubernetes/uui/components/uui-server/templates/job.yaml
+++ b/kubernetes/uui/components/uui-server/templates/job.yaml
@@ -66,11 +66,9 @@
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" . }}
-
diff --git a/kubernetes/uui/templates/deployment.yaml b/kubernetes/uui/templates/deployment.yaml
index 61b0b2d..c9feacc 100644
--- a/kubernetes/uui/templates/deployment.yaml
+++ b/kubernetes/uui/templates/deployment.yaml
@@ -94,5 +94,4 @@
- name: config
emptyDir:
medium: Memory
- imagePullSecrets:
- - name: "{{ include "common.namespace" . }}-docker-registry-key"
+ {{- include "common.imagePullSecrets" . | nindent 6 }}