From 843b44cea755dbd24acb346cc8542a709564ce78 Mon Sep 17 00:00:00 2001 From: JoeKer1 Date: Wed, 27 Nov 2024 05:39:58 -0500 Subject: [PATCH] feat: Ability to provide extra env variables in Helm (#961) Closes #960 --- charts/planka/Chart.yaml | 2 +- charts/planka/templates/deployment.yaml | 14 ++++++++++++++ charts/planka/values.yaml | 15 ++++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/charts/planka/Chart.yaml b/charts/planka/Chart.yaml index d4211538..10f9ab9e 100644 --- a/charts/planka/Chart.yaml +++ b/charts/planka/Chart.yaml @@ -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 diff --git a/charts/planka/templates/deployment.yaml b/charts/planka/templates/deployment.yaml index f9e20581..47fa5020 100644 --- a/charts/planka/templates/deployment.yaml +++ b/charts/planka/templates/deployment.yaml @@ -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 diff --git a/charts/planka/values.yaml b/charts/planka/values.yaml index de9c1bd0..52ea0c81 100644 --- a/charts/planka/values.yaml +++ b/charts/planka/values.yaml @@ -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: / @@ -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: []