Skip to main content
Version: v0.9

lifecycle

Schema Lifecycle

Lifecycle describes actions that the management system should take in response
to container lifecycle events.

Attributes

Name and DescriptionTypeDefault ValueRequired
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.HttpUndefinedoptional
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.HttpUndefinedoptional

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"
}
}