Skip to content

Commit

Permalink
Add env
Browse files Browse the repository at this point in the history
  • Loading branch information
kostyaplis committed Apr 26, 2020
1 parent ee2b454 commit 0b49bc2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/basic/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: basic
version: 0.0.6
version: 0.0.7
5 changes: 5 additions & 0 deletions charts/basic/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ spec:
resources:
{{- toYaml . | trim | nindent 16 }}
{{- end }}
env:
{{- range $name, $value := .env }}
- name: {{ $name | quote }}
value: {{ $value | quote }}
{{- end }}
restartPolicy: OnFailure
{{- with $.Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
2 changes: 1 addition & 1 deletion charts/basic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fullnameOverride: ""

# environment variables, not a list of objects with keys name and value
# but directly an object of key and value
env: {}
# env: {}
# existing k8s secrets for environment varialbes
envFromSecrets: []
# existing k8s configMaps for environment variables
Expand Down
4 changes: 2 additions & 2 deletions skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2alpha4
apiVersion: skaffold/v2beta1
kind: Config
profiles:
- name: test-cronjob
Expand All @@ -14,4 +14,4 @@ profiles:
remote: true
wait: true
valuesFiles:
- "values.yaml"
- values.yaml

0 comments on commit 0b49bc2

Please sign in to comment.