Search

template

helpers.tpl에 변수를 지정하는 것을 권장
_helpers.tpl --- {{- define "name" -}} {{.Values.env}} {{- end}}
YAML
복사
apiVersion: v1 kind: ConfigMap metadata: name: {{include "name" .}}-cm data: v1: test
YAML
복사
# dev-helm/dev.yaml env: dev # dev-helm/prod.yaml env: prod ################################################################################### helm install test dev-helm -f .\dev-helm\dev.yaml helm install test dev-helm -f .\dev-helm\prod.yaml # -f 옵션으로 어느 파일의 변수를 가져올지 지정 가능함.
Bash
복사
# values.yaml content: "WSI Page" env: stage #################################################################################### # dev-helm/dev.yaml env: dev helm install test dev-helm -f .\dev-helm\dev.yaml # 위와 같이 생성하면 dev.yaml을 참조함.
Bash
복사