Skip to content

Instantly share code, notes, and snippets.

@dwdraju
Created April 14, 2020 17:54
Show Gist options
  • Save dwdraju/a92981314792b40c1abc0c4ea34d926f to your computer and use it in GitHub Desktop.
Save dwdraju/a92981314792b40c1abc0c4ea34d926f to your computer and use it in GitHub Desktop.
Helm Chart Hook
apiVersion: v1
kind: Pod
metadata:
name: {{ .Release.Name }}-post-upgrade-hook
labels:
app.kubernetes.io/name: {{ .Release.Name }}
annotations:
"helm.sh/hook": "post-upgrade"
"helm.sh/hook-delete-policy": "hook-succeeded"
"sidecar.istio.io/inject": "false"
spec:
restartPolicy: Never
serviceAccountName: {{ .Release.Name }}
containers:
- name: post-install-job
image: buildpack-deps:curl
args:
- /bin/sh
- -ec
- curl -X POST --data-urlencode 'payload={"text":"Version `{{ .Values.image.repository }}` of `{{ .Release.Name }}` is deployed!"}' {{ .Values.SLACK_WEBHOOK }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment