Skip to content

Commit a4c368a

Browse files
committed
helm-chart: revert coupling to jupyterhub.extraEnv helper
1 parent 41431e0 commit a4c368a

File tree

4 files changed

+6
-36
lines changed

4 files changed

+6
-36
lines changed

helm-chart/binderhub/schema.yaml

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -492,38 +492,9 @@ properties:
492492
extraVolumes: *extraVolumes-spec
493493
extraVolumeMounts: *extraVolumeMounts-spec
494494
extraEnv:
495-
type: [object, array]
496-
additionalProperties: true
495+
type: array
497496
description: |
498-
Environment variables to add to the binder pods.
499-
500-
String literals with `$(ENV_VAR_NAME)` will be expanded by Kubelet which
501-
is a part of Kubernetes.
502-
503-
```yaml
504-
extraEnv:
505-
# basic notation (for literal values only)
506-
MY_ENV_VARS_NAME1: "my env var value 1"
507-
508-
# explicit notation (the "name" field takes precedence)
509-
CHP_NAMESPACE:
510-
name: CHP_NAMESPACE
511-
valueFrom:
512-
fieldRef:
513-
fieldPath: metadata.namespace
514-
515-
# implicit notation (the "name" field is implied)
516-
PREFIXED_CHP_NAMESPACE:
517-
value: "my-prefix-$(CHP_NAMESPACE)"
518-
SECRET_VALUE:
519-
valueFrom:
520-
secretKeyRef:
521-
name: my-k8s-secret
522-
key: password
523-
```
524-
525-
For more information, see the [Kubernetes EnvVar
526-
specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#envvar-v1-core).
497+
Env to add to the binder Pods.
527498
podAnnotations:
528499
type: object
529500
additionalProperties: false

helm-chart/binderhub/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ spec:
117117
{{- end }}
118118
{{- end }}
119119
{{- with .Values.extraEnv }}
120-
{{- include "jupyterhub.extraEnv" . | nindent 8 }}
120+
{{- . | toYaml | nindent 8 }}
121121
{{- end }}
122122
ports:
123123
- containerPort: 8585

helm-chart/binderhub/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,5 +216,5 @@ initContainers: []
216216
lifecycle: {}
217217
extraVolumes: []
218218
extraVolumeMounts: []
219-
extraEnv: {}
219+
extraEnv: []
220220
podAnnotations: {}

tools/templates/lint-and-validate-values.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,8 @@ lifecycle: *lifecycle
147147
extraVolumes: []
148148
extraVolumeMounts: []
149149
extraEnv: &extraEnv
150-
IGNORED_KEY_NAME:
151-
name: MOCK_ENV_VAR_NAME1
150+
- name: MOCK_ENV_VAR_NAME1
152151
value: MOCK_ENV_VAR_VALUE1
153-
MOCK_ENV_VAR_NAME2:
152+
- name: MOCK_ENV_VAR_NAME2
154153
value: MOCK_ENV_VAR_VALUE2
155154
podAnnotations: *annotations

0 commit comments

Comments
 (0)