File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ version : 0.11
2+ templates :
3+ chart :
4+ content :
5+ file : " ./Chart.tpl.yaml"
6+ values :
7+ version :
8+ prompt : " Enter the semver for the chart and app version"
9+ dev :
10+ content :
11+ file : " ./values.dev.yaml"
12+ helpers :
13+ " _decrypt " :
14+ shell : |-
15+ printf "$(echo $VALUE | openssl aes-256-cbc -d -a -pass $MY_SECRET_PASS)"
16+ values :
17+ env :
18+ static : " dev"
19+ prod :
20+ content :
21+ file : " ./values.prod.yaml"
22+ helpers :
23+ " _decrypt " :
24+ shell : |-
25+ printf "$(echo $VALUE | openssl aes-256-cbc -d -a -pass $MY_SECRET_PASS)"
26+ values :
27+ env :
28+ static : " prod"
Original file line number Diff line number Diff line change 1+ apiVersion : v2
2+ name : " complate-helm-example"
3+ description : none
4+
5+ type : application
6+ version : " {{ version }}"
7+ appVersion : " {{ version }}"
8+
9+ dependencies : []
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # MY_SECRET_PASS should be set as env var in CI
4+ echo " >>> values dev <<<"
5+ echo " "
6+ complate -e render -t chart -v " version=0.1.0"
7+ echo " >>> values dev <<<"
8+ echo " "
9+ MY_SECRET_PASS=" pass:superpass" complate -e render -t dev --helpers --shell-trust=ultimate
10+ echo " "
11+ echo " >>> values prod <<<"
12+ echo " "
13+ MY_SECRET_PASS=" pass:superpass" complate -e render -t prod --helpers --shell-trust=ultimate
Original file line number Diff line number Diff line change 1+ apiVersion : apps/v1
2+ kind : Deployment
3+ metadata :
4+ name : {{ .Release.Name }}-{{ .Values.env }}-nginx
5+ spec :
6+ selector :
7+ matchLabels :
8+ app : {{ .Release.Name }}-{{ .Values.env }}-nginx
9+ strategy :
10+ type : Recreate
11+ revisionHistoryLimit : 0
12+ template :
13+ metadata :
14+ labels :
15+ app : {{ .Release.Name }}-{{ .Values.env }}-nginx
16+ spec :
17+ containers :
18+ - name : {{ .Release.Name }}-{{ .Values.env }}-nginx
19+ image : nginx:{{ .Chart.AppVersion }}
20+ imagePullPolicy : Always
21+ env : []
22+ ports :
23+ - containerPort : 80
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Secret
3+ metadata :
4+ name : some-secret
5+ type : Opaque
6+ stringData :
7+ {{- toYaml .Values.secret | nindent 2 }}
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Service
3+ metadata :
4+ name : {{ .Release.Name }}-{{ .Values.env }}-nginx
5+ spec :
6+ type : ClusterIP
7+ ports :
8+ - port : 8080
9+ targetPort : 80
10+ protocol : TCP
11+ selector :
12+ app : {{ .Release.Name }}-{{ .Values.env }}-nginx
Original file line number Diff line number Diff line change 1+ env : " {{ env }}"
2+ secret :
3+ apikey : ' {{ _decrypt "U2FsdGVkX1/ugUBmzFwL8/GrodAJqhzuZSphwFqBuKa8t1tjWU+OjZ6dmXmO83Wq" }}'
Original file line number Diff line number Diff line change 1+ env : " {{ env }}"
2+ secret :
3+ apikey : ' {{ _decrypt "U2FsdGVkX19o7/B7vdP8iTC5ToQl8mq6i1SEdrRy5R9Q0GhIahXqCY8PXkhTrRIx" }}'
You can’t perform that action at this time.
0 commit comments