Skip to content

Commit

Permalink
feat: add envFrom for deployment and statefulset, add githash to char…
Browse files Browse the repository at this point in the history
…t version
  • Loading branch information
danielpanzella committed Oct 24, 2024
1 parent 40b4d37 commit 12044e3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/pr-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ jobs:
env:
PR_NUMBER: ${{ github.event.number }}
run: |
git_hash=$(git rev-parse --short "$GITHUB_SHA")
for chart in $(ct list-changed --config ct.yaml); do
helm package --version=$(helm show chart ${chart} | yq .version)-PR${PR_NUMBER} -d .cr-release-packages ${chart}
helm package --version=$(helm show chart ${chart} | yq .version)-PR${PR_NUMBER}-${git_hash} -d .cr-release-packages ${chart}
done
shell: bash

Expand Down
4 changes: 4 additions & 0 deletions charts/wandb-service/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ spec:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
{{ with .Values.envFrom }}
envFrom:
{{- toYaml . | nindent 12 }}
{{- end }}
{{ with .Values.env }}
env:
{{- toYaml . | nindent 12 }}
Expand Down
8 changes: 8 additions & 0 deletions charts/wandb-service/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ spec:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
{{ with .Values.envFrom }}
envFrom:
{{- toYaml . | nindent 12 }}
{{- end }}
{{ with .Values.env }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
1 change: 1 addition & 0 deletions charts/wandb-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ nameOverride: ""
fullnameOverride: ""

env: []
envFrom: []

# This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/
serviceAccount:
Expand Down

0 comments on commit 12044e3

Please sign in to comment.