28 lines
909 B
YAML
28 lines
909 B
YAML
|
templates:
|
||
|
# ---------------------------
|
||
|
# -- Hooks
|
||
|
# ---------------------------
|
||
|
crd-management-hook:
|
||
|
hooks:
|
||
|
- events: ["preapply"]
|
||
|
showlogs: true
|
||
|
command: "sh"
|
||
|
args:
|
||
|
- -c
|
||
|
- |
|
||
|
helm show crds {{ .Release.Chart }} --version {{ .Release.Version }} | kubectl replace -f - \
|
||
|
|| helm show crds {{ .Release.Chart }} --version {{ .Release.Version }} | kubectl create -f - \
|
||
|
|| true
|
||
|
- events: ["prepare"]
|
||
|
showlogs: true
|
||
|
command: "sh"
|
||
|
args:
|
||
|
- -c
|
||
|
- "helm show crds {{ .Release.Chart }} --version {{ .Release.Version }} | kubectl diff -f - || true"
|
||
|
- events: ["postuninstall"]
|
||
|
showlogs: true
|
||
|
command: "sh"
|
||
|
args:
|
||
|
- -c
|
||
|
- "helm show crds {{ .Release.Chart }} --version {{ .Release.Version }} | kubectl delete -f - || true"
|