From fb145a1f140b3f97ae6e7388638f73194d10ece1 Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Tue, 13 Jun 2023 10:18:47 +0000 Subject: [PATCH 1/5] Updated latest image of hyperion in installer --- charts/devtron/Chart.yaml | 2 +- charts/devtron/devtron-bom.yaml | 4 ++-- charts/devtron/values.yaml | 4 ++-- manifests/install/devtron-installer.yaml | 2 +- manifests/installation-script | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/charts/devtron/Chart.yaml b/charts/devtron/Chart.yaml index 1e6888505b..51eacc6fbf 100644 --- a/charts/devtron/Chart.yaml +++ b/charts/devtron/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: devtron-operator -appVersion: 0.6.18-rc.1 +appVersion: description: Chart to configure and install Devtron. Devtron is a Kubernetes Orchestration system. keywords: - Devtron diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index f7585351a8..f7c5a6349d 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -9,7 +9,7 @@ global: runAsNonRoot: true installer: - release: "v0.6.18-rc.1" + release: "" image: "quay.io/devtron/inception" tag: "44b30917-185-13275" @@ -21,7 +21,7 @@ components: USE_V2: "true" ENABLE_BUILD_CONTEXT: "true" devtron: - image: "quay.io/devtron/hyperion:2c6ed701-280-14059" + image: "quay.io/devtron/hyperion:f4dd5126-280-14094" cicdImage: "quay.io/devtron/devtron:2c6ed701-434-14060" argocdDexServer: image: "ghcr.io/dexidp/dex:v2.30.2" diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index dfdc769bd9..eb9751c9ff 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -10,7 +10,7 @@ global: installer: repo: "devtron-labs/devtron" # For Kubernetes version < 1.16, set release: legacy. You won't be able to upgrade Devtron unless you upgrade the K8s version to 1.16 or above. - release: "v0.6.18-rc.1" #You can use a branch name or a release tag name as a release, for gitee as source only "main" is supported as of now + release: "" #You can use a branch name or a release tag name as a release, for gitee as source only "main" is supported as of now image: quay.io/devtron/inception tag: 44b30917-185-13275 source: "github" # Available options are github and gitee @@ -59,7 +59,7 @@ components: imagePullPolicy: IfNotPresent devtron: - image: "quay.io/devtron/hyperion:2c6ed701-280-14059" + image: "quay.io/devtron/hyperion:f4dd5126-280-14094" cicdImage: "quay.io/devtron/devtron:2c6ed701-434-14060" imagePullPolicy: IfNotPresent customOverrides: {} diff --git a/manifests/install/devtron-installer.yaml b/manifests/install/devtron-installer.yaml index 4412b7769b..54d5d3db32 100644 --- a/manifests/install/devtron-installer.yaml +++ b/manifests/install/devtron-installer.yaml @@ -4,4 +4,4 @@ metadata: name: installer-devtron namespace: devtroncd spec: - url: https://raw.githubusercontent.com/devtron-labs/devtron/v0.6.18-rc.1/manifests/installation-script + url: https://raw.githubusercontent.com/devtron-labs/devtron//manifests/installation-script diff --git a/manifests/installation-script b/manifests/installation-script index fe62007d3d..0e82b17df6 100644 --- a/manifests/installation-script +++ b/manifests/installation-script @@ -1,4 +1,4 @@ -LTAG="v0.6.18-rc.1"; +LTAG=""; REPO_RAW_URL="https://raw.githubusercontent.com/devtron-labs/devtron/"; operatorSecret = kubectl get secret -n devtroncd devtron-operator-secret; From c5f54cc92e1500133975707b2c1f7017df3a086c Mon Sep 17 00:00:00 2001 From: ReleaseBot Date: Tue, 13 Jun 2023 10:21:47 +0000 Subject: [PATCH 2/5] Updated latest image of devtron in installer --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- manifests/yamls/devtron.yaml | 2 +- manifests/yamls/migrator.yaml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index f7c5a6349d..72438efc4c 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -22,7 +22,7 @@ components: ENABLE_BUILD_CONTEXT: "true" devtron: image: "quay.io/devtron/hyperion:f4dd5126-280-14094" - cicdImage: "quay.io/devtron/devtron:2c6ed701-434-14060" + cicdImage: "quay.io/devtron/devtron:f4dd5126-434-14095" argocdDexServer: image: "ghcr.io/dexidp/dex:v2.30.2" initContainer: diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index eb9751c9ff..02ecac2ffd 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -60,7 +60,7 @@ components: devtron: image: "quay.io/devtron/hyperion:f4dd5126-280-14094" - cicdImage: "quay.io/devtron/devtron:2c6ed701-434-14060" + cicdImage: "quay.io/devtron/devtron:f4dd5126-434-14095" imagePullPolicy: IfNotPresent customOverrides: {} serviceMonitor: diff --git a/manifests/yamls/devtron.yaml b/manifests/yamls/devtron.yaml index cdb68f5440..2dfeb0e86e 100644 --- a/manifests/yamls/devtron.yaml +++ b/manifests/yamls/devtron.yaml @@ -162,7 +162,7 @@ spec: runAsUser: 1000 containers: - name: devtron - image: "quay.io/devtron/devtron:2c6ed701-434-14060" + image: "quay.io/devtron/devtron:f4dd5126-434-14095" securityContext: allowPrivilegeEscalation: false runAsUser: 1000 diff --git a/manifests/yamls/migrator.yaml b/manifests/yamls/migrator.yaml index 1f681acb0a..3e56360ee3 100644 --- a/manifests/yamls/migrator.yaml +++ b/manifests/yamls/migrator.yaml @@ -47,7 +47,7 @@ spec: - name: MIGRATE_TO_VERSION value: "0" - name: GIT_HASH - value: 2c6ed701f1c9b357eee0c07587c426033bd4c4f4 + value: f4dd51267d227edc8d459ba53f987eac4ccc1131 envFrom: - secretRef: name: postgresql-migrator @@ -96,7 +96,7 @@ spec: - name: MIGRATE_TO_VERSION value: "0" - name: GIT_HASH - value: 2c6ed701f1c9b357eee0c07587c426033bd4c4f4 + value: f4dd51267d227edc8d459ba53f987eac4ccc1131 - name: GIT_BRANCH value: main envFrom: From 4094341b727bf9ac220c88a85eb4fc0b74d11d1f Mon Sep 17 00:00:00 2001 From: Subhashish Date: Tue, 13 Jun 2023 16:05:36 +0530 Subject: [PATCH 3/5] fix Global secret data bug in CI workflow --- pkg/pipeline/WorkflowUtils.go | 14 +++++++++++++- pkg/pipeline/bean/GlobalCMCSDto.go | 22 +++++++++++++++------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/pkg/pipeline/WorkflowUtils.go b/pkg/pipeline/WorkflowUtils.go index f90d4690e7..399c978aa0 100644 --- a/pkg/pipeline/WorkflowUtils.go +++ b/pkg/pipeline/WorkflowUtils.go @@ -215,7 +215,19 @@ func AddTemplatesForGlobalSecretsInWorkflowTemplate(globalCmCsConfigs []*bean.Gl }) cmIndex++ } else if config.ConfigType == repository.CS_TYPE_CONFIG { - secretJson, err := GetSecretJson(ConfigMapSecretDto{Name: config.Name, Data: config.Data, OwnerRef: ArgoWorkflowOwnerRef}) + + // special handling for secret data since GetSecretJson expects encoded values in data map + encodedSecretData, err := bean.ConvertToEncodedForm(config.Data) + if err != nil { + return err + } + var encodedSecretDataMap = make(map[string]string) + err = json.Unmarshal(encodedSecretData, &encodedSecretDataMap) + if err != nil { + return err + } + + secretJson, err := GetSecretJson(ConfigMapSecretDto{Name: config.Name, Data: encodedSecretDataMap, OwnerRef: ArgoWorkflowOwnerRef}) if err != nil { return err } diff --git a/pkg/pipeline/bean/GlobalCMCSDto.go b/pkg/pipeline/bean/GlobalCMCSDto.go index 0580152fab..cce097f9ee 100644 --- a/pkg/pipeline/bean/GlobalCMCSDto.go +++ b/pkg/pipeline/bean/GlobalCMCSDto.go @@ -20,27 +20,35 @@ type GlobalCMCSDto struct { } func (dto GlobalCMCSDto) ConvertToConfigSecretMap() (bean.ConfigSecretMap, error) { - var jsonRawMsg []byte - var err error + configSecretMap := bean.ConfigSecretMap{} configSecretMap.Name = dto.Name configSecretMap.Type = dto.Type configSecretMap.MountPath = dto.MountPath + var jsonRawMsg []byte + var err error // adding handling to get base64 encoded value in map value in case of secrets if dto.ConfigType == repository.CS_TYPE_CONFIG { - var csDataMap = make(map[string][]byte) - for key, value := range dto.Data { - csDataMap[key] = []byte(value) - } - jsonRawMsg, err = json.Marshal(csDataMap) + jsonRawMsg, err = ConvertToEncodedForm(dto.Data) } else { jsonRawMsg, err = json.Marshal(dto.Data) } + if err != nil { return configSecretMap, err } configSecretMap.Data = jsonRawMsg return configSecretMap, nil } + +// ConvertToEncodedForm Function to encode the values in the input map values +func ConvertToEncodedForm(data map[string]string) ([]byte, error) { + var csDataMap = make(map[string][]byte) + for key, value := range data { + csDataMap[key] = []byte(value) + } + jsonRawMsg, err := json.Marshal(csDataMap) + return jsonRawMsg, err +} From 982ea183be0cab89422be8d1d6773038fe45b820 Mon Sep 17 00:00:00 2001 From: Subhashish Date: Tue, 13 Jun 2023 18:43:23 +0530 Subject: [PATCH 4/5] Revert "Updated latest image of devtron in installer" This reverts commit c5f54cc92e1500133975707b2c1f7017df3a086c. --- charts/devtron/devtron-bom.yaml | 2 +- charts/devtron/values.yaml | 2 +- manifests/yamls/devtron.yaml | 2 +- manifests/yamls/migrator.yaml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index 72438efc4c..f7c5a6349d 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -22,7 +22,7 @@ components: ENABLE_BUILD_CONTEXT: "true" devtron: image: "quay.io/devtron/hyperion:f4dd5126-280-14094" - cicdImage: "quay.io/devtron/devtron:f4dd5126-434-14095" + cicdImage: "quay.io/devtron/devtron:2c6ed701-434-14060" argocdDexServer: image: "ghcr.io/dexidp/dex:v2.30.2" initContainer: diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 02ecac2ffd..eb9751c9ff 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -60,7 +60,7 @@ components: devtron: image: "quay.io/devtron/hyperion:f4dd5126-280-14094" - cicdImage: "quay.io/devtron/devtron:f4dd5126-434-14095" + cicdImage: "quay.io/devtron/devtron:2c6ed701-434-14060" imagePullPolicy: IfNotPresent customOverrides: {} serviceMonitor: diff --git a/manifests/yamls/devtron.yaml b/manifests/yamls/devtron.yaml index 2dfeb0e86e..cdb68f5440 100644 --- a/manifests/yamls/devtron.yaml +++ b/manifests/yamls/devtron.yaml @@ -162,7 +162,7 @@ spec: runAsUser: 1000 containers: - name: devtron - image: "quay.io/devtron/devtron:f4dd5126-434-14095" + image: "quay.io/devtron/devtron:2c6ed701-434-14060" securityContext: allowPrivilegeEscalation: false runAsUser: 1000 diff --git a/manifests/yamls/migrator.yaml b/manifests/yamls/migrator.yaml index 3e56360ee3..1f681acb0a 100644 --- a/manifests/yamls/migrator.yaml +++ b/manifests/yamls/migrator.yaml @@ -47,7 +47,7 @@ spec: - name: MIGRATE_TO_VERSION value: "0" - name: GIT_HASH - value: f4dd51267d227edc8d459ba53f987eac4ccc1131 + value: 2c6ed701f1c9b357eee0c07587c426033bd4c4f4 envFrom: - secretRef: name: postgresql-migrator @@ -96,7 +96,7 @@ spec: - name: MIGRATE_TO_VERSION value: "0" - name: GIT_HASH - value: f4dd51267d227edc8d459ba53f987eac4ccc1131 + value: 2c6ed701f1c9b357eee0c07587c426033bd4c4f4 - name: GIT_BRANCH value: main envFrom: From c812f48b378a9d4f4cf34fdd8d30efc9e5d10c97 Mon Sep 17 00:00:00 2001 From: Subhashish Date: Tue, 13 Jun 2023 18:43:44 +0530 Subject: [PATCH 5/5] Revert "Updated latest image of hyperion in installer" This reverts commit fb145a1f140b3f97ae6e7388638f73194d10ece1. --- charts/devtron/Chart.yaml | 2 +- charts/devtron/devtron-bom.yaml | 4 ++-- charts/devtron/values.yaml | 4 ++-- manifests/install/devtron-installer.yaml | 2 +- manifests/installation-script | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/charts/devtron/Chart.yaml b/charts/devtron/Chart.yaml index 51eacc6fbf..1e6888505b 100644 --- a/charts/devtron/Chart.yaml +++ b/charts/devtron/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: devtron-operator -appVersion: +appVersion: 0.6.18-rc.1 description: Chart to configure and install Devtron. Devtron is a Kubernetes Orchestration system. keywords: - Devtron diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index f7c5a6349d..f7585351a8 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -9,7 +9,7 @@ global: runAsNonRoot: true installer: - release: "" + release: "v0.6.18-rc.1" image: "quay.io/devtron/inception" tag: "44b30917-185-13275" @@ -21,7 +21,7 @@ components: USE_V2: "true" ENABLE_BUILD_CONTEXT: "true" devtron: - image: "quay.io/devtron/hyperion:f4dd5126-280-14094" + image: "quay.io/devtron/hyperion:2c6ed701-280-14059" cicdImage: "quay.io/devtron/devtron:2c6ed701-434-14060" argocdDexServer: image: "ghcr.io/dexidp/dex:v2.30.2" diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index eb9751c9ff..dfdc769bd9 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -10,7 +10,7 @@ global: installer: repo: "devtron-labs/devtron" # For Kubernetes version < 1.16, set release: legacy. You won't be able to upgrade Devtron unless you upgrade the K8s version to 1.16 or above. - release: "" #You can use a branch name or a release tag name as a release, for gitee as source only "main" is supported as of now + release: "v0.6.18-rc.1" #You can use a branch name or a release tag name as a release, for gitee as source only "main" is supported as of now image: quay.io/devtron/inception tag: 44b30917-185-13275 source: "github" # Available options are github and gitee @@ -59,7 +59,7 @@ components: imagePullPolicy: IfNotPresent devtron: - image: "quay.io/devtron/hyperion:f4dd5126-280-14094" + image: "quay.io/devtron/hyperion:2c6ed701-280-14059" cicdImage: "quay.io/devtron/devtron:2c6ed701-434-14060" imagePullPolicy: IfNotPresent customOverrides: {} diff --git a/manifests/install/devtron-installer.yaml b/manifests/install/devtron-installer.yaml index 54d5d3db32..4412b7769b 100644 --- a/manifests/install/devtron-installer.yaml +++ b/manifests/install/devtron-installer.yaml @@ -4,4 +4,4 @@ metadata: name: installer-devtron namespace: devtroncd spec: - url: https://raw.githubusercontent.com/devtron-labs/devtron//manifests/installation-script + url: https://raw.githubusercontent.com/devtron-labs/devtron/v0.6.18-rc.1/manifests/installation-script diff --git a/manifests/installation-script b/manifests/installation-script index 0e82b17df6..fe62007d3d 100644 --- a/manifests/installation-script +++ b/manifests/installation-script @@ -1,4 +1,4 @@ -LTAG=""; +LTAG="v0.6.18-rc.1"; REPO_RAW_URL="https://raw.githubusercontent.com/devtron-labs/devtron/"; operatorSecret = kubectl get secret -n devtroncd devtron-operator-secret;