Skip to content

Commit 0c6c4b2

Browse files
authored
Merge pull request #1715 from macintoshme/allow-additional-envs
chart: Added ability to use environment variables
2 parents 48b1801 + 8c64a0c commit 0c6c4b2

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

charts/headlamp/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ sources:
2020
maintainers:
2121
- name: kinvolk
2222
url: https://kinvolk.io/
23-
version: 0.18.1
23+
version: 0.18.2
2424
appVersion: 0.22.0
2525
annotations:
2626
artifacthub.io/category: monitoring-logging

charts/headlamp/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ See [MAINTAINERS.md](https://github.com/headlamp-k8s/headlamp/blob/main/MAINTAIN
2828
| affinity | object | `{}` | Affinity settings for pod assignment |
2929
| clusterRoleBinding.annotations | object | `{}` | Annotations to add to the cluster role binding |
3030
| clusterRoleBinding.create | bool | `true` | Specified whether a cluster role binding should be created |
31+
| env | list | `[]` | An optional list of environment variables |
3132
| fullnameOverride | string | `""` | Overrides the full name of the chart |
3233
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy. One of Always, Never, IfNotPresent |
3334
| image.registry | string | `"ghcr.io"` | Container image registry |

charts/headlamp/templates/deployment.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ spec:
3535
{{- toYaml .Values.securityContext | nindent 12 }}
3636
image: "{{ .Values.image.registry}}/{{ .Values.image.repository }}:{{ .Values.image.tag | default (printf "v%s" .Chart.AppVersion) }}"
3737
imagePullPolicy: {{ .Values.image.pullPolicy }}
38-
{{ with .Values.config.oidc }}
38+
{{ if or .Values.config.oidc .Values.env }}
3939
env:
40+
{{- with .Values.config.oidc }}
4041
{{- if or .clientID (not .secret.create) }}
4142
- name: OIDC_CLIENT_ID
4243
valueFrom:
@@ -65,6 +66,10 @@ spec:
6566
name: {{ .secret.name }}
6667
key: scopes
6768
{{- end }}
69+
{{- end }}
70+
{{- if .Values.env }}
71+
{{- toYaml .Values.env | nindent 12 }}
72+
{{- end }}
6873
{{- end }}
6974
args:
7075
- "-in-cluster"

charts/headlamp/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ config:
4545
# -- directory to look for plugins
4646
pluginsDir: "/headlamp/plugins"
4747

48+
# -- An optional list of environment variables
49+
# env:
50+
# - name: KUBERNETES_SERVICE_HOST
51+
# value: localhost
52+
# - name: KUBERNETES_SERVICE_PORT
53+
# value: 6443
54+
4855
serviceAccount:
4956
# -- Specifies whether a service account should be created
5057
create: true

0 commit comments

Comments
 (0)