Lifecycle
Appears in
.Values.workload.$name.podSpec.containers.$name
lifecycle
Define lifecycle for the container
| Key | workload.$name.podSpec.containers.$name.lifecycle |
| Type | map |
| Required | ❌ |
Helm tpl | ❌ |
| Default | {} |
Example
workload: workload-name: podSpec: containers: container-name: lifecycle: {}lifecycle.preStop
Define preStop lifecycle
| Key | workload.$name.podSpec.containers.$name.lifecycle.preStop |
| Type | map |
| Required | ❌ |
Helm tpl | ❌ |
| Default | {} |
Example
workload: workload-name: podSpec: containers: container-name: lifecycle: preStop: {}lifecycle.postStart
Define preStop lifecycle
| Key | workload.$name.podSpec.containers.$name.lifecycle.postStart |
| Type | map |
| Required | ❌ |
Helm tpl | ❌ |
| Default | {} |
Example
workload: workload-name: podSpec: containers: container-name: lifecycle: postStart: {}lifecycle.$hook.type
Define hook type
| Key | workload.$name.podSpec.containers.$name.lifecycle.$hook.type |
| Type | string |
| Required | ❌ |
Helm tpl | ❌ |
| Default | "" |
Valid Values:
exechttphttps
Example
workload: workload-name: podSpec: containers: container-name: lifecycle: preStop: type: execlifecycle.$hook.command
Define command(s)
See Command for more information.
lifecycle.$hook.port
Define the port
| Key | workload.$name.podSpec.containers.$name.lifecycle.$hook.port |
| Type | int |
| Required | ✅ |
Helm tpl | ✅ |
| Default | "" |
Example
workload: workload-name: podSpec: containers: container-name: lifecycle: postStart: type: http port: 8080lifecycle.$hook.host
Define the host
| Key | workload.$name.podSpec.containers.$name.lifecycle.$hook.host |
| Type | string |
| Required | ❌ |
Helm tpl | ✅ |
| Default | "" |
Example
workload: workload-name: podSpec: containers: container-name: lifecycle: postStart: type: http port: 8080 host: localhostlifecycle.$hook.path
Define the path
| Key | workload.$name.podSpec.containers.$name.lifecycle.$hook.path |
| Type | string |
| Required | ❌ |
Helm tpl | ✅ |
| Default | "/" |
Example
workload: workload-name: podSpec: containers: container-name: lifecycle: postStart: type: http port: 8080 host: localhost path: /pathlifecycle.$hook.httpHeaders
Define the httpHeaders
| Key | workload.$name.podSpec.containers.$name.lifecycle.$hook.httpHeaders |
| Type | map |
| Required | ❌ |
Helm tpl | ✅ (On value only) |
| Default | {} |
Example
workload: workload-name: podSpec: containers: container-name: lifecycle: postStart: type: http port: 8080 host: localhost path: /path httpHeaders: key: valueFull Examples
workload: workload-name: enabled: true primary: true podSpec: containers: container-name: enabled: true primary: true lifecycle: preStop: type: exec command: - command postStart: type: http port: 8080 host: localhost path: /path httpHeaders: key: value