From 6d4ad9a877c1d115fe0c6ef9d04aafeaeefa2bd2 Mon Sep 17 00:00:00 2001 From: Jawad Qureshi Date: Thu, 8 Dec 2022 18:58:25 +0100 Subject: [PATCH 1/8] (ci): Deploy gen3 chart on pull requests --- .github/workflows/lint_test.yaml | 17 ++++++++++------- helm/revproxy/templates/_helpers.tpl | 1 - 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint_test.yaml b/.github/workflows/lint_test.yaml index 1ca99744..b1eb7ee6 100644 --- a/.github/workflows/lint_test.yaml +++ b/.github/workflows/lint_test.yaml @@ -29,12 +29,21 @@ jobs: run: | changed=$(ct list-changed --config .github/ct.yaml) if [[ -n "$changed" ]]; then - echo "::set-output name=changed::true" + echo "changed=true" >> $GITHUB_ENV fi - name: Run chart-testing (lint) run: ct lint --config .github/ct.yaml + - name: Create kind cluster + uses: helm/kind-action@v1.4.0 + if: steps.list-changed.outputs.changed == 'true' + + - name: Run chart-testing gen3 (install) + if: steps.list-changed.outputs.changed == 'true' + run: ct install --chart-dirs helm --charts helm/gen3 + + # deploy-charts-to-kind: # name: ${{ matrix.environments }} - gen3 data portal build # timeout-minutes: 20 @@ -42,9 +51,3 @@ jobs: # needs: [get-changes-for-envs] # if: ${{ needs.get-changes-for-envs.outputs.matrix != '[]' && needs.get-changes-for-envs.outputs.matrix != '' }} # steps: - # - name: Create kind cluster - # uses: helm/kind-action@v1.4.0 - # if: steps.list-changed.outputs.changed == 'true' - - # - name: Run chart-testing (install) - # run: ct install diff --git a/helm/revproxy/templates/_helpers.tpl b/helm/revproxy/templates/_helpers.tpl index 2019b5ad..da8beb75 100644 --- a/helm/revproxy/templates/_helpers.tpl +++ b/helm/revproxy/templates/_helpers.tpl @@ -48,7 +48,6 @@ Selector labels app.kubernetes.io/name: {{ include "revproxy.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app: revproxy -#GEN3_DATE_LABEL {{- end }} {{/* From 9e23468310da320f579a923cce116352454e39bf Mon Sep 17 00:00:00 2001 From: Jawad Qureshi Date: Thu, 8 Dec 2022 19:06:15 +0100 Subject: [PATCH 2/8] (ci): Deploy gen3 chart on pull requests --- .github/workflows/lint_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint_test.yaml b/.github/workflows/lint_test.yaml index b1eb7ee6..91a6e6a9 100644 --- a/.github/workflows/lint_test.yaml +++ b/.github/workflows/lint_test.yaml @@ -37,10 +37,10 @@ jobs: - name: Create kind cluster uses: helm/kind-action@v1.4.0 - if: steps.list-changed.outputs.changed == 'true' + if: steps.list-changed.outputs.changed == true - name: Run chart-testing gen3 (install) - if: steps.list-changed.outputs.changed == 'true' + if: steps.list-changed.outputs.changed == true run: ct install --chart-dirs helm --charts helm/gen3 From 973502f4b71d2e3fce8309c26af468af120190b2 Mon Sep 17 00:00:00 2001 From: Jawad Qureshi Date: Thu, 8 Dec 2022 19:09:19 +0100 Subject: [PATCH 3/8] (ci): Deploy gen3 chart on pull requests --- .github/workflows/lint_test.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint_test.yaml b/.github/workflows/lint_test.yaml index 91a6e6a9..d2d1e484 100644 --- a/.github/workflows/lint_test.yaml +++ b/.github/workflows/lint_test.yaml @@ -29,18 +29,19 @@ jobs: run: | changed=$(ct list-changed --config .github/ct.yaml) if [[ -n "$changed" ]]; then - echo "changed=true" >> $GITHUB_ENV + echo "::set-output name=changed::true" fi - name: Run chart-testing (lint) + if: steps.list-changed.outputs.changed == 'true' run: ct lint --config .github/ct.yaml - name: Create kind cluster uses: helm/kind-action@v1.4.0 - if: steps.list-changed.outputs.changed == true + if: steps.list-changed.outputs.changed == 'true' - name: Run chart-testing gen3 (install) - if: steps.list-changed.outputs.changed == true + if: steps.list-changed.outputs.changed == 'true' run: ct install --chart-dirs helm --charts helm/gen3 From 43cde845b35ee118c8b5d0c5702ba1fd7bb3376b Mon Sep 17 00:00:00 2001 From: Jawad Qureshi Date: Thu, 8 Dec 2022 19:24:11 +0100 Subject: [PATCH 4/8] (ci): Deploy gen3 chart on pull requests --- .github/workflows/lint_test.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint_test.yaml b/.github/workflows/lint_test.yaml index d2d1e484..88f5ddbe 100644 --- a/.github/workflows/lint_test.yaml +++ b/.github/workflows/lint_test.yaml @@ -42,7 +42,11 @@ jobs: - name: Run chart-testing gen3 (install) if: steps.list-changed.outputs.changed == 'true' - run: ct install --chart-dirs helm --charts helm/gen3 + run: ct install --config ./github/ct.yaml --charts helm/gen3 + + # - name: Run chart-testing gen3 (upgrade) + # if: steps.list-changed.outputs.changed == 'true' + # run: ct install --upgrade --debug --chart-dirs helm --charts helm/gen3 # deploy-charts-to-kind: From 973e8a1a00f80fc7292127cc4dcc9b57d0c07381 Mon Sep 17 00:00:00 2001 From: Jawad Qureshi Date: Thu, 8 Dec 2022 19:28:28 +0100 Subject: [PATCH 5/8] (ci): Deploy gen3 chart on pull requests --- .github/workflows/lint_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_test.yaml b/.github/workflows/lint_test.yaml index 88f5ddbe..ecdc9fb7 100644 --- a/.github/workflows/lint_test.yaml +++ b/.github/workflows/lint_test.yaml @@ -42,7 +42,7 @@ jobs: - name: Run chart-testing gen3 (install) if: steps.list-changed.outputs.changed == 'true' - run: ct install --config ./github/ct.yaml --charts helm/gen3 + run: ct install --config .github/ct.yaml --charts helm/gen3 # - name: Run chart-testing gen3 (upgrade) # if: steps.list-changed.outputs.changed == 'true' From 2579977e1575fef8e33398bb2fc2914ac4a1699e Mon Sep 17 00:00:00 2001 From: Jawad Qureshi Date: Thu, 8 Dec 2022 19:53:45 +0100 Subject: [PATCH 6/8] (ci): Deploy gen3 chart on pull requests --- helm/common/templates/_postgres_secrets.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/common/templates/_postgres_secrets.tpl b/helm/common/templates/_postgres_secrets.tpl index c256b10f..15c3c6a2 100644 --- a/helm/common/templates/_postgres_secrets.tpl +++ b/helm/common/templates/_postgres_secrets.tpl @@ -56,7 +56,7 @@ Usage: {{- $chartName := .context.Chart.Name }} {{- $valuesPostgres := get .context.Values.global.postgres.master .key}} - {{- $secret := (lookup "v1" "Secret" "default" "gen3-postgresql" )}} + {{- $secret := (lookup "v1" "Secret" "default" "{{ .Release.Name }}-postgresql" )}} {{- $devPostgresSecret := "" }} {{- if $secret }} {{- $devPostgresSecret = (index $secret "data" "postgres-password") | b64dec }} From c8c3ac5a2d33373ca8996cd55e1fd990aa09d7f1 Mon Sep 17 00:00:00 2001 From: Jawad Qureshi Date: Thu, 8 Dec 2022 20:46:19 +0100 Subject: [PATCH 7/8] (ci): Deploy gen3 chart on pull requests --- helm/gen3/README.md | 2 +- helm/gen3/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/gen3/README.md b/helm/gen3/README.md index c190cdf6..2debcd07 100644 --- a/helm/gen3/README.md +++ b/helm/gen3/README.md @@ -60,7 +60,7 @@ Helm chart to deploy Gen3 Data Commons | db_restore | bool | `false` | | | fence.enabled | bool | `true` | | | fence.image.repository | string | `nil` | | -| fence.image.tag | string | `nil` | | +| fence.image.tag | string | `"feat_dbenvvar"` | | | global.aws.account | string | `nil` | | | global.aws.enabled | bool | `false` | | | global.dbRestoreBucket | string | `"gen3-dummy-data"` | | diff --git a/helm/gen3/values.yaml b/helm/gen3/values.yaml index b5d32a12..0c794ec7 100644 --- a/helm/gen3/values.yaml +++ b/helm/gen3/values.yaml @@ -58,7 +58,7 @@ fence: enabled: true image: repository: - tag: + tag: feat_dbenvvar guppy: enabled: true From 3b921504380fe4ff441f37742f412ab0d07f4691 Mon Sep 17 00:00:00 2001 From: Jawad Qureshi Date: Thu, 8 Dec 2022 23:20:43 +0100 Subject: [PATCH 8/8] (ci): Deploy gen3 chart on pull requests --- helm/ambassador/templates/serviceaccount.yaml | 4 ++-- helm/gen3/README.md | 2 +- helm/gen3/values.yaml | 2 +- helm/wts/templates/rolebinding.yaml | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/helm/ambassador/templates/serviceaccount.yaml b/helm/ambassador/templates/serviceaccount.yaml index d1ae1a61..3325f520 100644 --- a/helm/ambassador/templates/serviceaccount.yaml +++ b/helm/ambassador/templates/serviceaccount.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ include "ambassador.fullname" . }} + name: ambassador-{{ .Release.Namespace }} rules: - apiGroups: [""] resources: @@ -25,7 +25,7 @@ metadata: roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: {{ include "ambassador.fullname" . }} + name: ambassador-{{ .Release.Namespace }} subjects: - kind: ServiceAccount name: ambassador diff --git a/helm/gen3/README.md b/helm/gen3/README.md index 2debcd07..3fce33cd 100644 --- a/helm/gen3/README.md +++ b/helm/gen3/README.md @@ -84,7 +84,7 @@ Helm chart to deploy Gen3 Data Commons | global.syncFromDbgap | bool | `false` | | | global.tierAccessLevel | string | `"libre"` | | | global.userYamlS3Path | string | `"s3://cdis-gen3-users/test/user.yaml"` | | -| guppy.enabled | bool | `true` | | +| guppy.enabled | bool | `false` | | | guppy.image.repository | string | `nil` | | | guppy.image.tag | string | `nil` | | | hatchery.enabled | bool | `true` | | diff --git a/helm/gen3/values.yaml b/helm/gen3/values.yaml index 0c794ec7..ab834c99 100644 --- a/helm/gen3/values.yaml +++ b/helm/gen3/values.yaml @@ -61,7 +61,7 @@ fence: tag: feat_dbenvvar guppy: - enabled: true + enabled: false image: repository: tag: diff --git a/helm/wts/templates/rolebinding.yaml b/helm/wts/templates/rolebinding.yaml index b949bbe4..613a7a7b 100644 --- a/helm/wts/templates/rolebinding.yaml +++ b/helm/wts/templates/rolebinding.yaml @@ -1,8 +1,7 @@ kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: - #WTS_BINDING - name: wts-role-binding + name: wts-role-binding-{{ .Release.Namespace}} namespace: {{ $.Release.Namespace }} subjects: - kind: ServiceAccount