From c85f980a6d8a5c672367651e7b173973a62a2414 Mon Sep 17 00:00:00 2001 From: Michel Thebeau Date: Thu, 1 Apr 2021 16:05:08 -0400 Subject: [PATCH] vault-manager: use image from values The vault-manager does not pull its image from registry-local. Add values to manifest and use them in vault-manager chart so that armada will prepend registry-local to the image:tag. Also edit the values.yaml in vault-helm tarball with the vault-manager's repository and tag. Closes-Bug: 1921008 Change-Id: If7a086c9dd10c3b5b961e0275be56bfb117e6a1d Signed-off-by: Michel Thebeau --- .../manifests/vault_manifest.yaml | 4 +++ vault-helm/centos/vault-helm.spec | 4 +++ ...lt-manager-repository-to-values.yaml.patch | 29 +++++++++++++++++++ .../vault-helm/helm-charts/vault-init.yaml | 2 +- 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 vault-helm/vault-helm/files/0001-Add-vault-manager-repository-to-values.yaml.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 f6d8a52..1c697ea 100644 --- a/stx-vault-helm/stx-vault-helm/manifests/vault_manifest.yaml +++ b/stx-vault-helm/stx-vault-helm/manifests/vault_manifest.yaml @@ -56,6 +56,10 @@ data: tlsDisable: false imagePullSecrets: - name: default-registry-key + manager: + image: + repository: starlingx/stx-vault-manager + tag: stx.5.0-v1.18.3 injector: enabled: true nodeSelector: | diff --git a/vault-helm/centos/vault-helm.spec b/vault-helm/centos/vault-helm.spec index aa69e45..bb6cd2a 100644 --- a/vault-helm/centos/vault-helm.spec +++ b/vault-helm/centos/vault-helm.spec @@ -31,6 +31,8 @@ Source7: _helpers-CA.tpl BuildArch: noarch +Patch01: 0001-Add-vault-manager-repository-to-values.yaml.patch + BuildRequires: helm BuildRequires: chartmuseum @@ -40,6 +42,8 @@ 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="." & sleep 2 diff --git a/vault-helm/vault-helm/files/0001-Add-vault-manager-repository-to-values.yaml.patch b/vault-helm/vault-helm/files/0001-Add-vault-manager-repository-to-values.yaml.patch new file mode 100644 index 0000000..c5b6eba --- /dev/null +++ b/vault-helm/vault-helm/files/0001-Add-vault-manager-repository-to-values.yaml.patch @@ -0,0 +1,29 @@ +From 48b0d72dffcef539823bb66f49d5da327611434f Mon Sep 17 00:00:00 2001 +From: Michel Thebeau +Date: Thu, 1 Apr 2021 18:12:49 -0400 +Subject: [PATCH] Add vault-manager repository to values.yaml + +Signed-off-by: Michel Thebeau +--- + values.yaml | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/values.yaml b/values.yaml +index 8c6e4a3..250c1a7 100644 +--- a/values.yaml ++++ b/values.yaml +@@ -13,6 +13,11 @@ global: + # Beta Feature: If deploying to OpenShift + openshift: false + ++manager: ++ image: ++ repository: starlingx/stx-vault-manager ++ tag: stx.5.0-v1.18.3 ++ + injector: + # True if you want to enable vault agent injection. + enabled: true +-- +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 d67cbfd..2b78377 100644 --- a/vault-helm/vault-helm/helm-charts/vault-init.yaml +++ b/vault-helm/vault-helm/helm-charts/vault-init.yaml @@ -201,7 +201,7 @@ spec: {{- end }} containers: - name: manager - image: starlingx/stx-vault-manager:stx.5.0-v1.18.3 + image: "{{ .Values.manager.image.repository }}:{{ .Values.manager.image.tag }}" imagePullPolicy: "{{ .Values.injector.image.pullPolicy }}" args: - bash