diff --git a/templates/chartmuseum/chartmuseum-dpl.yaml b/templates/chartmuseum/chartmuseum-dpl.yaml index 85ac70e256176748eec5c202bc39821bb77435c8..4c151d3911d205de71e03fd7de2b3f679ba9447e 100644 --- a/templates/chartmuseum/chartmuseum-dpl.yaml +++ b/templates/chartmuseum/chartmuseum-dpl.yaml @@ -35,6 +35,10 @@ spec: {{ toYaml .Values.chartmuseum.podAnnotations | indent 8 }} {{- end }} spec: +{{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} +{{- end }} securityContext: fsGroup: 10000 {{- if .Values.chartmuseum.serviceAccountName }} diff --git a/templates/clair/clair-dpl.yaml b/templates/clair/clair-dpl.yaml index 69ee736ddcab1d7f018e609324ec809451fd7b3c..ea824d3862cad9ec7f8ccd727ed31ec2210ba57e 100644 --- a/templates/clair/clair-dpl.yaml +++ b/templates/clair/clair-dpl.yaml @@ -28,6 +28,10 @@ spec: {{ toYaml .Values.clair.podAnnotations | indent 8 }} {{- end }} spec: +{{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} +{{- end }} securityContext: fsGroup: 10000 {{- if .Values.clair.serviceAccountName }} diff --git a/templates/core/core-dpl.yaml b/templates/core/core-dpl.yaml index 4a913c7fd27f280d9d7eaa4492b6fe3a5bd41bdf..eaf7354e287e32762dbd523f374b0da3c989e178 100644 --- a/templates/core/core-dpl.yaml +++ b/templates/core/core-dpl.yaml @@ -29,6 +29,10 @@ spec: {{ toYaml .Values.core.podAnnotations | indent 8 }} {{- end }} spec: +{{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} +{{- end }} securityContext: fsGroup: 10000 {{- if .Values.core.serviceAccountName }} diff --git a/templates/database/database-ss.yaml b/templates/database/database-ss.yaml index d4290420b5d60c13e82de2180ecc91af0359aeea..6a53fe70240e88bf049c20ac69192e335358a0f0 100644 --- a/templates/database/database-ss.yaml +++ b/templates/database/database-ss.yaml @@ -25,6 +25,10 @@ spec: {{ toYaml .Values.database.podAnnotations | indent 8 }} {{- end }} spec: +{{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} +{{- end }} {{- if .Values.database.internal.serviceAccountName }} serviceAccountName: {{ .Values.database.internal.serviceAccountName }} {{- end -}} diff --git a/templates/imagePullSecret.yaml b/templates/imagePullSecret.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3828742bbedd8c984933e3d4dddea75bc8843b11 --- /dev/null +++ b/templates/imagePullSecret.yaml @@ -0,0 +1,10 @@ +{{- if .Values.registrySecrets -}} +kind: Secret +apiVersion: v1 +metadata: + name: beagle-registry + namespace: {{ .Release.Namespace}} +data: + .dockerconfigjson: ewoJImF1dGhzIjogewoJCSJyZWdpc3RyeS5iZWFnbGUuZGVmYXVsdDo2NDQ0IjogewoJCQkiYXV0aCI6ICJZbVZoWjJ4bE9tSmxZV2RzWlE9PSIKCQl9Cgl9Cn0= +type: kubernetes.io/dockerconfigjson +{{- end -}} \ No newline at end of file diff --git a/templates/jobservice/jobservice-dpl.yaml b/templates/jobservice/jobservice-dpl.yaml index cce739592c11c1e8342dfc06bf8b89e13e777a9a..4ba94a9b7a3a3c2f86328d40733e71236a3286ec 100644 --- a/templates/jobservice/jobservice-dpl.yaml +++ b/templates/jobservice/jobservice-dpl.yaml @@ -35,6 +35,10 @@ spec: {{ toYaml .Values.jobservice.podAnnotations | indent 8 }} {{- end }} spec: +{{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} +{{- end }} securityContext: fsGroup: 10000 {{- if .Values.jobservice.serviceAccountName }} diff --git a/templates/nginx/deployment.yaml b/templates/nginx/deployment.yaml index e59ecaad70cc0971cae6c857d768e738c2249b58..9903d8ad93dc121a01bdd0a79379f2b199ed4757 100644 --- a/templates/nginx/deployment.yaml +++ b/templates/nginx/deployment.yaml @@ -30,6 +30,10 @@ spec: {{ toYaml .Values.nginx.podAnnotations | indent 8 }} {{- end }} spec: +{{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} +{{- end }} {{- if .Values.nginx.serviceAccountName }} serviceAccountName: {{ .Values.nginx.serviceAccountName }} {{- end }} diff --git a/templates/notary/notary-server.yaml b/templates/notary/notary-server.yaml index 770950632acc41ce3a426bcf66d31819571cb21e..814a7ea64f6bbea385a94b4c40805ed68704a095 100644 --- a/templates/notary/notary-server.yaml +++ b/templates/notary/notary-server.yaml @@ -24,6 +24,10 @@ spec: {{ toYaml .Values.notary.podAnnotations | indent 8 }} {{- end }} spec: +{{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} +{{- end }} securityContext: fsGroup: 10000 {{- if .Values.notary.server.serviceAccountName }} diff --git a/templates/portal/deployment.yaml b/templates/portal/deployment.yaml index 0cd172135f1acdb63e2496a92babf66c2ef478d0..781e69086df3d1df60ce081f76ce42c2318db036 100644 --- a/templates/portal/deployment.yaml +++ b/templates/portal/deployment.yaml @@ -26,6 +26,10 @@ spec: {{ toYaml .Values.portal.podAnnotations | indent 8 }} {{- end }} spec: +{{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} +{{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/templates/redis/statefulset.yaml b/templates/redis/statefulset.yaml index eeb211cca492fb90969a1fc2d4a3555cc39489ff..8b55798fc4636ce4130b30ee37894cf70b0b56b5 100644 --- a/templates/redis/statefulset.yaml +++ b/templates/redis/statefulset.yaml @@ -24,6 +24,10 @@ spec: {{ toYaml .Values.redis.podAnnotations | indent 8 }} {{- end }} spec: +{{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} +{{- end }} securityContext: fsGroup: 999 {{- if .Values.redis.internal.serviceAccountName }} diff --git a/templates/registry/registry-dpl.yaml b/templates/registry/registry-dpl.yaml index 316b645a85a8c69b5fc722bbee9f980c088f69dc..a711c2686707c5c8c29ed043df720c3df1899234 100644 --- a/templates/registry/registry-dpl.yaml +++ b/templates/registry/registry-dpl.yaml @@ -35,6 +35,10 @@ spec: {{ toYaml .Values.registry.podAnnotations | indent 8 }} {{- end }} spec: +{{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} +{{- end }} securityContext: fsGroup: 10000 {{- if .Values.registry.serviceAccountName }} diff --git a/templates/trivy/trivy-sts.yaml b/templates/trivy/trivy-sts.yaml index 273fbb613ab86b45a2f7ba36c0e07f874b903815..2d3137dd5cec55f5291c010b9c2327728b164daf 100644 --- a/templates/trivy/trivy-sts.yaml +++ b/templates/trivy/trivy-sts.yaml @@ -30,6 +30,10 @@ spec: {{ toYaml .Values.trivy.podAnnotations | indent 8 }} {{- end }} spec: +{{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} +{{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/values-operator.yaml b/values-operator.yaml index 633bd59d47575cd6605129328f64c594824f200b..a728bbf9b3258acb03e5ffaf19340e814a7e9a3e 100644 --- a/values-operator.yaml +++ b/values-operator.yaml @@ -2,4 +2,8 @@ global: hub: registry.cn-qingdao.aliyuncs.com/wod imagePullPolicy: "IfNotPresent" imageArch: amd64 - host: wodcloud.local \ No newline at end of file + host: wodcloud.local + imagePullSecrets: + - name: beagle-registry + +registrySecrets: true \ No newline at end of file