github.com/zoumo/helm@v2.5.0+incompatible/docs/examples/nginx/templates/post-install-job.yaml (about) 1 apiVersion: batch/v1 2 kind: Job 3 metadata: 4 name: "{{template "fullname" . }}" 5 labels: 6 heritage: {{.Release.Service | quote }} 7 release: {{.Release.Name | quote }} 8 chart: "{{.Chart.Name}}-{{.Chart.Version}}" 9 annotations: 10 # This is what defines this resource as a hook. Without this line, the 11 # job is considered part of the release. 12 "helm.sh/hook": post-install 13 spec: 14 template: 15 metadata: 16 name: "{{template "fullname" . }}" 17 labels: 18 heritage: {{.Release.Service | quote }} 19 release: {{.Release.Name | quote }} 20 chart: "{{.Chart.Name}}-{{.Chart.Version}}" 21 spec: 22 # This shows how to use a simple value. This will look for a passed-in value 23 # called restartPolicy. If it is not found, it will use the default value. 24 # {{default "Never" .restartPolicy}} is a slightly optimized version of the 25 # more conventional syntax: {{.restartPolicy | default "Never"}} 26 restartPolicy: Never 27 containers: 28 - name: post-install-job 29 image: "alpine:3.3" 30 # All we're going to do is sleep for a minute, then exit. 31 command: ["/bin/sleep","{{default "10" .Values.sleepyTime}}"]