From b85175197008df8bbff659524d577138f9d9ad99 Mon Sep 17 00:00:00 2001 From: Michel Thebeau Date: Mon, 22 Mar 2021 15:25:07 -0400 Subject: [PATCH] fix Add pull secret for registry.local Commit 53ad52c956314ebc00665f656ab2c4c4f49ff3e2 did not address the issue. Instead, set the global value of imagePullSecrets in the manifest. Fix vault-init.yaml where imagePullSecrets had fallen into another section. Refrain from patching the vault tarball (revert the commit 53ad52c9) Closes-Bug: 1912696 Change-Id: Ia9e7cb52055ba9da342ea32f3c2bd3f24ce06630 Signed-off-by: Michel Thebeau --- .../manifests/vault_manifest.yaml | 4 ++- vault-helm/centos/vault-helm.spec | 3 --- ...0001-add-image-pull-secrets-to-image.patch | 26 ------------------- .../vault-helm/helm-charts/vault-init.yaml | 10 +++---- 4 files changed, 8 insertions(+), 35 deletions(-) delete mode 100644 vault-helm/vault-helm/files/0001-add-image-pull-secrets-to-image.patch diff --git a/stx-vault-helm/stx-vault-helm/manifests/vault_manifest.yaml b/stx-vault-helm/stx-vault-helm/manifests/vault_manifest.yaml index e60f797..f6d8a52 100644 --- a/stx-vault-helm/stx-vault-helm/manifests/vault_manifest.yaml +++ b/stx-vault-helm/stx-vault-helm/manifests/vault_manifest.yaml @@ -54,6 +54,8 @@ data: global: enabled: true tlsDisable: false + imagePullSecrets: + - name: default-registry-key injector: enabled: true nodeSelector: | @@ -134,4 +136,4 @@ metadata: data: release_prefix: sva chart_groups: - - vault \ No newline at end of file + - vault diff --git a/vault-helm/centos/vault-helm.spec b/vault-helm/centos/vault-helm.spec index 5860452..aa69e45 100644 --- a/vault-helm/centos/vault-helm.spec +++ b/vault-helm/centos/vault-helm.spec @@ -31,8 +31,6 @@ Source7: _helpers-CA.tpl BuildArch: noarch -Patch01: 0001-add-image-pull-secrets-to-image.patch - BuildRequires: helm BuildRequires: chartmuseum @@ -41,7 +39,6 @@ StarlingX Vault Helm Charts %prep %setup -n helm-charts-vault -%patch01 -p1 %build chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="." & diff --git a/vault-helm/vault-helm/files/0001-add-image-pull-secrets-to-image.patch b/vault-helm/vault-helm/files/0001-add-image-pull-secrets-to-image.patch deleted file mode 100644 index 7d5f734..0000000 --- a/vault-helm/vault-helm/files/0001-add-image-pull-secrets-to-image.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 40899d1d8dc374b85cfbffe6174c6b4dbfcdd040 Mon Sep 17 00:00:00 2001 -From: Michel Thebeau -Date: Tue, 26 Jan 2021 15:00:31 -0500 -Subject: [PATCH] add image pull secrets to image - -Signed-off-by: Michel Thebeau ---- - templates/injector-deployment.yaml | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/templates/injector-deployment.yaml b/templates/injector-deployment.yaml -index 8768f7d..e8cf060 100644 ---- a/templates/injector-deployment.yaml -+++ b/templates/injector-deployment.yaml -@@ -40,6 +40,8 @@ spec: - containers: - - name: sidecar-injector - {{ template "injector.resources" . }} -+ imagePullSecrets: -+ - name: default-registry-key - image: "{{ .Values.injector.image.repository }}:{{ .Values.injector.image.tag }}" - imagePullPolicy: "{{ .Values.injector.image.pullPolicy }}" - env: --- -2.29.2 - diff --git a/vault-helm/vault-helm/helm-charts/vault-init.yaml b/vault-helm/vault-helm/helm-charts/vault-init.yaml index 933fb7e..d67cbfd 100644 --- a/vault-helm/vault-helm/helm-charts/vault-init.yaml +++ b/vault-helm/vault-helm/helm-charts/vault-init.yaml @@ -195,6 +195,10 @@ spec: component: webhook spec: serviceAccountName: "{{ template "vault.fullname" . }}" + {{- if .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml .Values.global.imagePullSecrets | nindent 8 }} + {{- end }} containers: - name: manager image: starlingx/stx-vault-manager:stx.5.0-v1.18.3 @@ -233,8 +237,4 @@ spec: resources: requests: storage: 1Gi - {{- if .Values.global.imagePullSecrets }} - imagePullSecrets: - {{- toYaml .Values.global.imagePullSecrets | nindent 8 }} - {{- end }} -{{ end }} \ No newline at end of file +{{ end }}