From b02d75908a195efec2212fa055d83a290988f476 Mon Sep 17 00:00:00 2001 From: Dmitrii Kovalkov Date: Tue, 22 Jul 2025 12:46:54 +0300 Subject: [PATCH 1/5] Change imagePullSecrets for webhooks Signed-off-by: Dmitrii Kovalkov --- templates/webhooks/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/webhooks/deployment.yaml b/templates/webhooks/deployment.yaml index b6b6575..3bf4558 100644 --- a/templates/webhooks/deployment.yaml +++ b/templates/webhooks/deployment.yaml @@ -104,7 +104,7 @@ spec: {{- end }} imagePullSecrets: - - name: {{ .Chart.Name }}-module-registry + - name: deckhouse-registry serviceAccount: webhooks serviceAccountName: webhooks volumes: From 9081e7e61c0363ba62cf3687d0a792a5a072a393 Mon Sep 17 00:00:00 2001 From: "v.oleynikov" Date: Tue, 22 Jul 2025 12:54:08 +0300 Subject: [PATCH 2/5] [internal] fix imagePullSecrets Signed-off-by: v.oleynikov --- templates/registry-secret.yaml | 14 ++++++++++++++ templates/snapshot-controller/deployment.yaml | 2 +- .../snapshot-validation-webhook/deployment.yaml | 2 +- templates/webhooks/deployment.yaml | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/templates/registry-secret.yaml b/templates/registry-secret.yaml index 12ed21b..2273797 100644 --- a/templates/registry-secret.yaml +++ b/templates/registry-secret.yaml @@ -1,6 +1,20 @@ --- apiVersion: v1 kind: Secret +metadata: + name: {{ .Chart.Name }}-module-registry + namespace: d8-{{ .Chart.Name }} + {{- include "helm_lib_module_labels" (list .) | nindent 2 }} +type: kubernetes.io/dockerconfigjson +data: +{{- if dig "registry" "dockercfg" false .Values.snapshotController }} + .dockerconfigjson: {{ .Values.snapshotController.registry.dockercfg }} +{{- else }} + .dockerconfigjson: "eyJhdXRocyI6IHsgInJlZ2lzdHJ5LmRlY2tob3VzZS5pbyI6IHt9fX0=" +{{- end }} +--- +apiVersion: v1 +kind: Secret metadata: name: deckhouse-registry namespace: d8-{{ .Chart.Name }} diff --git a/templates/snapshot-controller/deployment.yaml b/templates/snapshot-controller/deployment.yaml index edd405b..c64c24c 100644 --- a/templates/snapshot-controller/deployment.yaml +++ b/templates/snapshot-controller/deployment.yaml @@ -60,7 +60,7 @@ spec: app: snapshot-controller spec: imagePullSecrets: - - name: deckhouse-registry + - {{ .Chart.Name }}-module-registry {{- include "helm_lib_priority_class" (tuple . "cluster-low") | nindent 6 }} {{- include "helm_lib_node_selector" (tuple . "system") | nindent 6 }} {{- include "helm_lib_tolerations" (tuple . "system") | nindent 6 }} diff --git a/templates/snapshot-validation-webhook/deployment.yaml b/templates/snapshot-validation-webhook/deployment.yaml index 1e56b3b..6e7c339 100644 --- a/templates/snapshot-validation-webhook/deployment.yaml +++ b/templates/snapshot-validation-webhook/deployment.yaml @@ -61,7 +61,7 @@ spec: checksum/config: {{ include (print $.Template.BasePath "/snapshot-validation-webhook/secret.yaml") . | sha256sum }} spec: imagePullSecrets: - - name: deckhouse-registry + - name: {{ .Chart.Name }}-module-registry {{- include "helm_lib_priority_class" (tuple . "system-cluster-critical") | nindent 6 }} {{- include "helm_lib_node_selector" (tuple . "master") | nindent 6 }} {{- include "helm_lib_tolerations" (tuple . "any-node" "with-uninitialized") | nindent 6 }} diff --git a/templates/webhooks/deployment.yaml b/templates/webhooks/deployment.yaml index 3bf4558..b6b6575 100644 --- a/templates/webhooks/deployment.yaml +++ b/templates/webhooks/deployment.yaml @@ -104,7 +104,7 @@ spec: {{- end }} imagePullSecrets: - - name: deckhouse-registry + - name: {{ .Chart.Name }}-module-registry serviceAccount: webhooks serviceAccountName: webhooks volumes: From a2675759f8f2fd2bd5ad799b4ba411467a84d12d Mon Sep 17 00:00:00 2001 From: "v.oleynikov" Date: Tue, 22 Jul 2025 12:54:50 +0300 Subject: [PATCH 3/5] [internal] fix imagePullSecrets Signed-off-by: v.oleynikov --- templates/webhooks/deployment.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/webhooks/deployment.yaml b/templates/webhooks/deployment.yaml index b6b6575..932c0ee 100644 --- a/templates/webhooks/deployment.yaml +++ b/templates/webhooks/deployment.yaml @@ -102,7 +102,6 @@ spec: {{- if not ( .Values.global.enabledModules | has "vertical-pod-autoscaler-crd") }} {{- include "webhooks_resources" . | nindent 12 }} {{- end }} - imagePullSecrets: - name: {{ .Chart.Name }}-module-registry serviceAccount: webhooks From 8c6340fb4c706663672707fe4feee29d2fc9dbe0 Mon Sep 17 00:00:00 2001 From: "v.oleynikov" Date: Tue, 22 Jul 2025 12:57:31 +0300 Subject: [PATCH 4/5] [internal] fix imagePullSecrets Signed-off-by: v.oleynikov --- templates/webhooks/deployment.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/webhooks/deployment.yaml b/templates/webhooks/deployment.yaml index 932c0ee..b6b6575 100644 --- a/templates/webhooks/deployment.yaml +++ b/templates/webhooks/deployment.yaml @@ -102,6 +102,7 @@ spec: {{- if not ( .Values.global.enabledModules | has "vertical-pod-autoscaler-crd") }} {{- include "webhooks_resources" . | nindent 12 }} {{- end }} + imagePullSecrets: - name: {{ .Chart.Name }}-module-registry serviceAccount: webhooks From 95f6e69b0f729c2d1bc37209da8e21dfefeaf1cb Mon Sep 17 00:00:00 2001 From: "v.oleynikov" Date: Tue, 22 Jul 2025 12:59:54 +0300 Subject: [PATCH 5/5] [internal] fix imagePullSecrets Signed-off-by: v.oleynikov --- templates/snapshot-controller/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/snapshot-controller/deployment.yaml b/templates/snapshot-controller/deployment.yaml index c64c24c..9562f5c 100644 --- a/templates/snapshot-controller/deployment.yaml +++ b/templates/snapshot-controller/deployment.yaml @@ -60,7 +60,7 @@ spec: app: snapshot-controller spec: imagePullSecrets: - - {{ .Chart.Name }}-module-registry + - name: {{ .Chart.Name }}-module-registry {{- include "helm_lib_priority_class" (tuple . "cluster-low") | nindent 6 }} {{- include "helm_lib_node_selector" (tuple . "system") | nindent 6 }} {{- include "helm_lib_tolerations" (tuple . "system") | nindent 6 }}