Skip to content

Commit 4f40690

Browse files
committed
Merge branch 'helm-updates' into 'helm-charts'
feat(helm-charts): support extra volume and mounts, update secret See merge request dkinternal/testgen/dataops-testgen!170
2 parents caae9e6 + 9b77dd1 commit 4f40690

8 files changed

Lines changed: 76 additions & 9 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish Charts
2+
description: Push charts to GitHub Pages
3+
inputs:
4+
github-token:
5+
description: 'GitHub token for pushing to gh-pages branch'
6+
required: true
7+
runs:
8+
using: 'composite'
9+
steps:
10+
- name: Configure Git
11+
shell: bash
12+
run: |
13+
git config user.name "$GITHUB_ACTOR"
14+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
15+
16+
- name: Install Helm
17+
uses: azure/setup-helm@v4.2.0
18+
19+
- name: Add Helm Repos for Dependencies
20+
shell: bash
21+
run: |
22+
helm repo add bitnami https://charts.bitnami.com/bitnami
23+
24+
- name: Run chart-releaser
25+
uses: helm/chart-releaser-action@v1.6.0
26+
with:
27+
charts_dir: deploy/charts
28+
skip_existing: 'true'
29+
packages_with_index: 'true'
30+
env:
31+
CR_TOKEN: '${{ inputs.github-token }}'

.github/workflows/release.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release New Version
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
branches:
8+
- main
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Latest Changes
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Package and Publish Charts
19+
uses: ./.github/actions/publish_charts
20+
with:
21+
github-token: '${{ secrets.GITHUB_TOKEN }}'

deploy/charts/testgen-app/templates/_environment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
- name: TG_DECRYPT_SALT
33
valueFrom:
44
secretKeyRef:
5-
name: {{ include "testgen.fullname" . }}
5+
name: {{ .Values.testgen.databaseDecryptSecret.name | quote }}
66
key: "decrypt-salt"
77
- name: TG_DECRYPT_PASSWORD
88
valueFrom:
99
secretKeyRef:
10-
name: {{ include "testgen.fullname" . }}
10+
name: {{ .Values.testgen.databaseDecryptSecret.name | quote }}
1111
key: "decrypt-password"
1212
- name: TG_METADATA_DB_HOST
1313
value: {{ .Values.testgen.databaseHost | quote }}

deploy/charts/testgen-app/templates/deployment.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ spec:
4444
{{- toYaml .Values.resources | nindent 12 }}
4545
env:
4646
{{- include "testgen.environment" . | nindent 12 }}
47+
{{- with .Values.extraVolumeMounts }}
48+
volumeMounts:
49+
{{ toYaml . | nindent 12 }}
50+
{{- end }}
51+
{{- with .Values.extraVolumes }}
52+
volumes:
53+
{{ toYaml . | nindent 8 }}
54+
{{- end }}
4755
{{- with .Values.nodeSelector }}
4856
nodeSelector:
4957
{{- toYaml . | nindent 8 }}

deploy/charts/testgen-app/templates/secrets.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
{{- if .Values.secrets.create -}}
1+
{{- if .Values.testgen.databaseDecryptSecret.create -}}
22
apiVersion: v1
33
kind: Secret
44
metadata:
5-
name: {{ include "testgen.fullname" . }}
5+
name: {{ .Values.testgen.databaseDecryptSecret.name | quote }}
66
labels:
77
{{- include "testgen.labels" . | nindent 4 }}
88
annotations:

deploy/charts/testgen-app/templates/service.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,10 @@ spec:
1111
targetPort: http
1212
protocol: TCP
1313
name: http
14+
{{- if eq .Values.service.type "NodePort" }}
15+
{{- with .Values.service.nodePort }}
16+
nodePort: {{ . }}
17+
{{- end }}
18+
{{- end }}
1419
selector:
1520
{{- include "testgen.selectorLabels" . | nindent 4 }}

deploy/charts/testgen-app/values.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# Default values for testgen.
22

33
testgen:
4-
databaseHost: "testgen-services-postgresql"
4+
databaseHost: "postgresql"
55
databaseName: "datakitchen"
66
databaseSchema: "tgapp"
77
databaseUser: "postgres"
88
databasePasswordSecret:
99
name: "testgen-services-postgresql"
1010
key: "postgres-password"
11+
databaseDecryptSecret:
12+
create: true
13+
name: testgen-database-decrypt
1114
uiUser: "admin"
1215
uiPassword:
1316
trustTargetDatabaseCertificate: false
@@ -29,9 +32,6 @@ image:
2932
pullPolicy: IfNotPresent
3033
tag: "v3"
3134

32-
secrets:
33-
create: true
34-
3535
imagePullSecrets: []
3636
nameOverride: ""
3737
fullnameOverride: ""
@@ -62,8 +62,9 @@ securityContext: {}
6262
# runAsUser: 1000
6363

6464
service:
65-
type: ClusterIP
65+
type: NodePort
6666
port: 8501
67+
nodePort: 8501
6768

6869
resources: {}
6970
# limits:

deploy/charts/testgen-services/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
# Declare variables to be passed into your templates.
44

55
postgresql:
6+
fullnameOverride: postgresql
67
auth:
78
database: "datakitchen"

0 commit comments

Comments
 (0)