From 36343bbf48da5f8d40ed22df50bac2826feea897 Mon Sep 17 00:00:00 2001 From: ksrinimba Date: Mon, 27 Sep 2021 13:45:13 +0530 Subject: [PATCH 1/3] Fixed bootstrap from cm to secret for pipeline-config decryptor --- .../spinnaker/templates/configmap/halyard-init-script.yaml | 3 ++- charts/oes/charts/spinnaker/templates/rbac/spinnaker-role.yaml | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/oes/charts/spinnaker/templates/configmap/halyard-init-script.yaml b/charts/oes/charts/spinnaker/templates/configmap/halyard-init-script.yaml index 319f74de..af0e6bdf 100755 --- a/charts/oes/charts/spinnaker/templates/configmap/halyard-init-script.yaml +++ b/charts/oes/charts/spinnaker/templates/configmap/halyard-init-script.yaml @@ -126,7 +126,8 @@ data: ls -lart /home/spinnaker/java-lib/ if [ -d "/tmp/spinnaker/pipeline-promotion/" ] then - decrypt_key=$(kubectl get cm bootstrap -o yaml -n ${SPINNAKER_NAMESPACE}| grep 'password:' | awk '{ print $2}') + #decrypt_key=$(kubectl get cm bootstrap -o yaml -n ${SPINNAKER_NAMESPACE}| grep 'password:' | awk '{ print $2}') + decrypt_key=$(kubectl get secret bootstrap -o jsonpath='{.data.bootstrap\.yml}' -n ${SPINNAKER_NAMESPACE} | base64 -d | grep 'password:' | awk '{ print $2}') if [[ $decrypt_key != "" ]]; then for filename in /tmp/spinnaker/pipeline-promotion/*; do diff --git a/charts/oes/charts/spinnaker/templates/rbac/spinnaker-role.yaml b/charts/oes/charts/spinnaker/templates/rbac/spinnaker-role.yaml index 28306b4f..16be4680 100644 --- a/charts/oes/charts/spinnaker/templates/rbac/spinnaker-role.yaml +++ b/charts/oes/charts/spinnaker/templates/rbac/spinnaker-role.yaml @@ -7,7 +7,6 @@ rules: resources: [ 'namespaces', - 'configmaps', 'events', 'replicationcontrollers', 'serviceaccounts', @@ -15,7 +14,7 @@ rules: ] verbs: ['get', 'list'] - apiGroups: [''] - resources: ['pods', 'services', 'secrets'] + resources: ['pods', 'services', 'secrets', 'configmaps'] verbs: [ 'create', From e7afa39be62ebb6b180d756685c9aa40379faff6 Mon Sep 17 00:00:00 2001 From: Abhinay Byrisetty Date: Mon, 27 Sep 2021 14:01:35 +0530 Subject: [PATCH 2/3] Rename bootstrap-cm.yaml to bootstrap-secret.yaml --- .../secrets/{bootstrap-cm.yaml => bootstrap-secret.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename charts/oes/templates/secrets/{bootstrap-cm.yaml => bootstrap-secret.yaml} (100%) diff --git a/charts/oes/templates/secrets/bootstrap-cm.yaml b/charts/oes/templates/secrets/bootstrap-secret.yaml similarity index 100% rename from charts/oes/templates/secrets/bootstrap-cm.yaml rename to charts/oes/templates/secrets/bootstrap-secret.yaml From 89333e8b8acd0cbd6adab56153ef2f86e8813408 Mon Sep 17 00:00:00 2001 From: ksrinimba Date: Mon, 27 Sep 2021 21:50:10 +0530 Subject: [PATCH 3/3] Updated chart version --- charts/oes/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/oes/Chart.yaml b/charts/oes/Chart.yaml index a38becfc..80bd129c 100644 --- a/charts/oes/Chart.yaml +++ b/charts/oes/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: oes -version: 3.9.5 +version: 3.9.6 appVersion: 3.9.1.2 description: OES is a non-forked version of OSS spinnaker icon: https://raw.githubusercontent.com/OpsMx/enterprise-spinnaker/master/img/opsmx.png