Skip to content

Commit

Permalink
feat: Ability to provide extra env variables in Helm (#961)
Browse files Browse the repository at this point in the history
Closes #960
  • Loading branch information
JoeKer1 authored Nov 27, 2024
1 parent 8d245e8 commit 843b44c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/planka/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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: 0.2.17
version: 0.2.18

# 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
Expand Down
14 changes: 14 additions & 0 deletions charts/planka/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
{{- if .Values.extraEnv }}
{{- range .Values.extraEnv }}
- name: {{ .name }}
{{- if .value }}
value: {{ .value | quote}}
{{- end }}
{{- if .valueFrom }}
valueFrom:
secretKeyRef:
name: {{ .valueFrom.secretName }}
key: {{ .valueFrom.key }}
{{- end }}
{{- end }}
{{- end }}
{{- if not .Values.postgresql.enabled }}
{{- if .Values.existingDburlSecret }}
- name: DATABASE_URL
Expand Down
15 changes: 14 additions & 1 deletion charts/planka/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ingress:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
# Used to set planka BASE_URL if no `baseurl` is provided.
# Used to set planka BASE_URL if no `baseurl` is provided.
- host: planka.local
paths:
- path: /
Expand Down Expand Up @@ -197,3 +197,16 @@ oidc:
##
roles: []
# - planka-admin

## Extra environment variables for planka deployment
## Supports hard coded and getting values from a k8s secret
## - name: test
## value: valuetest
## - name: another
## value: another
## - name: test-secret
## valueFrom:
## secretName: k8s-secret-name
## key: key-inside-the-secret
##
extraEnv: []

0 comments on commit 843b44c

Please sign in to comment.