lifecycle
Schema Lifecycle
Lifecycle describes actions that the management system should take in response
to container lifecycle events.
Attributes
Name and Description | Type | Default Value | Required |
---|---|---|---|
preStop The action to be taken before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/\#container-hooks | probe.Exec | probe.Http | Undefined | optional |
postStart The action to be taken after a container is created. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/\#container-hooks | probe.Exec | probe.Http | Undefined | optional |
Examples
import catalog.models.schema.v1.workload.container.probe as p
import catalog.models.schema.v1.workload.container.lifecycle as lc
lifecycleHook = lc.Lifecycle {
preStop: p.Exec {
command: ["preStop.sh"]
}
postStart: p.Http {
url: "http://localhost:80"
}
}