From 614987589bed18d2a62727652a727581d34dd673 Mon Sep 17 00:00:00 2001 From: Calcagiara Date: Wed, 20 Nov 2024 16:27:32 +0100 Subject: [PATCH 1/3] ci(digitalhub): added structured changelog for every release --- .github/conventionalchangelog/config.json | 39 +++++++++++++++++++++++ .github/workflows/release.yaml | 25 ++++++++++++++- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 .github/conventionalchangelog/config.json diff --git a/.github/conventionalchangelog/config.json b/.github/conventionalchangelog/config.json new file mode 100644 index 0000000..668ccbb --- /dev/null +++ b/.github/conventionalchangelog/config.json @@ -0,0 +1,39 @@ +{ + "options": { + "preset": { + "name": "@dslab/conventionalcommits-helm", + "types": [ + { "type": "feat", "scope": "aac", "hidden": true }, + { "type": "fix", "scope": "aac", "hidden": true }, + { "type": "bump", "scope": "aac", "hidden": true}, + { "type": "feature", "scope": "aac", "hidden": true}, + { "type": "perf", "scope": "aac", "hidden": true}, + { "type": "revert", "scope": "aac", "hidden": true}, + { "type": "docs", "scope": "aac", "hidden": true}, + { "type": "style", "scope": "aac", "hidden": true}, + { "type": "chore", "scope": "aac", "hidden": true}, + { "type": "refactor", "scope": "aac", "hidden": true}, + { "type": "test", "scope": "aac", "hidden": true}, + { "type": "build", "scope": "aac", "hidden": true}, + { "type": "ci", "scope": "aac", "hidden": true}, + { "type": "feat", "scope": "test", "hidden": true }, + { "type": "fix", "scope": "test", "hidden": true }, + { "type": "feat", "scope": "tests", "hidden": true }, + { "type": "fix", "scope": "tests", "hidden": true }, + { "type": "bump", "section": "New version"}, + { "type": "feat", "section": "Features" }, + { "type": "feature", "section": "Features" }, + { "type": "fix", "section": "Bug Fixes" }, + { "type": "perf", "section": "Performance Improvements" }, + { "type": "revert", "section": "Reverts" }, + { "type": "docs", "section": "Documentation"}, + { "type": "style", "section": "Styles"}, + { "type": "chore", "section": "Miscellaneous Chores"}, + { "type": "refactor", "section": "Code Refactoring"}, + { "type": "test", "section": "Tests"}, + { "type": "build", "section": "Build System"}, + { "type": "ci", "section": "Continuous Integration"} + ] + } + } + } diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b0a5f83..0ef8c58 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,6 +32,28 @@ jobs: git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 'latest' + + - name: Install conventional-changelog + run: npm install -g conventional-changelog-cli + + - name: Install changelog preset + run: npm install -g @dslab/conventional-changelog-conventionalcommits-helm + + - name: Generate changelogs + run: | + for chart in charts/*; do + tag=${chart//"charts/"/} + if [ ${tag} != "digitalhub" ]; then + conventional-changelog -p @dslab/conventionalcommits-helm -i ${chart}/CHANGELOG.md -s -r 1 -t ${tag}- --commit-path ${chart} + else + conventional-changelog -p @dslab/conventionalcommits-helm -i ${chart}/CHANGELOG.md -s -r 1 -t ${tag}- -n .github/conventionalchangelog/config.json + fi + done + - name: Set up Helm uses: Azure/setup-helm@v4 with: @@ -56,7 +78,8 @@ jobs: uses: helm/chart-releaser-action@v1.6.0 env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - CR_GENERATE_RELEASE_NOTES: true + CR_GENERATE_RELEASE_NOTES: false + CR_RELEASE_NOTES_FILE: CHANGELOG.md CR_SKIP_EXISTING: true # see https://github.com/helm/chart-releaser/issues/183 From 28152c10a243cd041e787ebf039407dd3b464a02 Mon Sep 17 00:00:00 2001 From: Calcagiara Date: Wed, 20 Nov 2024 16:28:44 +0100 Subject: [PATCH 2/3] feat(core): added env variables for core tokens duration and another value for extra variables --- charts/core/Chart.yaml | 2 +- charts/core/templates/configmap.yaml | 5 +++++ charts/core/values.yaml | 6 ++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/charts/core/Chart.yaml b/charts/core/Chart.yaml index 9622580..542f0e6 100644 --- a/charts/core/Chart.yaml +++ b/charts/core/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: core description: Core backend application for DigitalHub. type: application -version: 0.2.18 +version: 0.2.19 appVersion: "0.8.0" maintainers: - name: ffais diff --git a/charts/core/templates/configmap.yaml b/charts/core/templates/configmap.yaml index 1233808..2d9b0df 100644 --- a/charts/core/templates/configmap.yaml +++ b/charts/core/templates/configmap.yaml @@ -67,6 +67,8 @@ data: JWT_KEYSTORE_PATH: "{{ .Values.keystore.keystorePath }}/keystore.jwks" JWT_KEYSTORE_KID: {{ .Values.keystore.keystoreKid | quote }} {{- end }} + JWT_ACCESS_TOKEN_DURATION: {{ .Values.coreTokens.accessTokenDuration | quote }} + JWT_REFRESH_TOKEN_DURATION: {{ .Values.coreTokens.refreshTokenDuration | quote }} AWS_DEFAULT_REGION: {{ .Values.minio.awsDefaultRegion }} AWS_REGION: {{ .Values.minio.awsRegion }} S3_ENDPOINT: {{ .Values.minio.publicUrl }} @@ -85,3 +87,6 @@ data: K8S_RESOURCE_GPU_KEY: {{ .Values.additionalConfig.resources.gpuKey | quote }} K8S_SERVICE_TYPE: {{ .Values.additionalConfig.service.type | quote }} K8S_JOB_DEADLINE: {{ .Values.additionalConfig.job.deadline | quote }} +{{- with .Values.configmapAdditionalEnv }} +{{- toYaml . | nindent 2 }} +{{- end }} diff --git a/charts/core/values.yaml b/charts/core/values.yaml index 28024ff..c636e2d 100644 --- a/charts/core/values.yaml +++ b/charts/core/values.yaml @@ -258,3 +258,9 @@ additionalConfig: type: "NodePort" job: deadline: "604800" + +coreTokens: + accessTokenDuration: "43200" + refreshTokenDuration: "86400" + +configmapAdditionalEnv: {} From 5f3bb1681b8946937b7804e129ccdec007384ed4 Mon Sep 17 00:00:00 2001 From: Calcagiara Date: Wed, 20 Nov 2024 16:47:53 +0100 Subject: [PATCH 3/3] feat(external-postgres-operator): added editable resources from values --- charts/ext-postgres-operator/Chart.yaml | 2 +- charts/ext-postgres-operator/templates/operator.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/ext-postgres-operator/Chart.yaml b/charts/ext-postgres-operator/Chart.yaml index da75627..2253cf1 100644 --- a/charts/ext-postgres-operator/Chart.yaml +++ b/charts/ext-postgres-operator/Chart.yaml @@ -11,7 +11,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.2.5 +version: 1.2.6 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/ext-postgres-operator/templates/operator.yaml b/charts/ext-postgres-operator/templates/operator.yaml index 17f6a81..8e2f5b2 100644 --- a/charts/ext-postgres-operator/templates/operator.yaml +++ b/charts/ext-postgres-operator/templates/operator.yaml @@ -66,6 +66,10 @@ spec: - name: {{ $key }} value: {{ $value }} {{- end }} + {{- if .Values.resources }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- end }} {{- if .Values.volumeMounts }} volumeMounts: {{- toYaml .Values.volumeMounts | nindent 12 }}