Release lifecycle hooks
The fields, admission rules, status and subresource of Release lifecycle hooks.
lifecycle is a top-level field of a Release, next to spec. It holds one
list of hooks per phase. Each hook creates a Job or a Pod on the target cluster. For the
behavior, see Lifecycle hooks.
| Path | Release.lifecycle |
| Subresource | releases/lifecycle (GET, PUT, PATCH) |
| Status | status.lifecycle, condition LifecycleSucceeded |
Changes metadata.generation | No |
Example#
apiVersion: core.convoy.kumodo.io/v1alpha1
kind: Release
metadata:
name: podinfo-in-cluster-helm-with-lifecycle
namespace: default
lifecycle:
preSync:
- name: pre-sleep
type: Job
timeout: 30s
onFailure: Continue
cleanup: Never
deleteBeforeCreation: true
jobTemplate:
metadata:
labels:
test-label: "true"
annotations:
test-annotation: "true"
spec:
template:
spec:
restartPolicy: Never
containers:
- name: job-worker
image: "busybox:1.38.0"
command: ["sh", "-c", "sleep 10"]
postSync:
- name: post-sleep
type: Job
runAfter: Healthy
timeout: 30s
onFailure: Continue
cleanup: OnSuccess
jobTemplate:
metadata:
labels:
test-label: "true"
annotations:
test-annotation: "true"
spec:
template:
spec:
restartPolicy: Never
containers:
- name: job-worker
image: "busybox:1.38.0"
command: ["sh", "-c", "sleep 10"]
mutations:
- type: syncWave
waveStrategy:
strategy: waitForHealthy
wave: 1
target:
group: ""
version: v1
kind: Service
spec:
clusterRef:
name: dev-local
source:
type: gitRepository
gitRepository:
name: podinfo
namespace: default
ref:
branch: master
content:
type: helm
helm:
path: charts/podinfo
releaseName: podinfo-helm
values:
- type: inline
inline:
probes:
readiness:
initialDelaySeconds: 15
liveness:
initialDelaySeconds: 15
syncPolicy:
automatic: true
prune:
orphaned: false
includeCRDs: false
includeNamespaces: false
interval: 1m
healthAssessment:
globalRuleSetSelector:
matchLabels:
convoy.kumodo.io/default: "true"
deadline: 1m
Phases#
| Field | When the hooks run |
|---|---|
preSync | After the dry run, before the first sync wave |
postSync | After all waves are applied and orphans are pruned |
syncFailed | After the sync fails in the apply stage |
preDelete | On deletion, before convoy deletes the applied objects |
postDelete | On deletion, after convoy deletes the applied objects |
Fields of a hook#
| Field | Default | Meaning |
|---|---|---|
name | required | Unique in its phase. |
type | required | Job or Pod. |
jobTemplate | Required for type: Job. Partial metadata (labels, annotations, namespace) and a JobSpec. | |
podTemplate | Required for type: Pod. Partial metadata and a PodSpec. | |
if | always run | A CEL expression. false or an error skips the hook. |
runAfter | Applied | postSync only. Healthy waits until all resources of the render are healthy. |
weight | 0 | Lower weights run first. Hooks with the same weight run in parallel. |
timeout | no limit | After this time, the hook state is TimedOut. |
onFailure | Continue | Fail stops the sync (preSync) or the deletion (preDelete). |
cleanup | Never | OnSuccess, OnCompletion or Never. |
deleteBeforeCreation | false | Delete the workloads of this hook from earlier renders before convoy creates the new one. |
Templates and if read cluster (the spec.metadata keys of the Cluster and cluster.name)
and release (the name, namespace, labels and annotations of the Release). Mutations do
not change hook templates.
Admission rules#
nameis required and unique in its phase.type: JobrequiresjobTemplate, andpodTemplatemust not be set.type: Podis the reverse.onFailure, if set, isContinueorFail.cleanup, if set, isOnSuccess,OnCompletionorNever.runAfteris allowed only onpostSynchooks, and isAppliedorHealthy.
Admission does not compile the if expression or the templates.
Workloads#
convoy names each workload <phase>-<name>-<hash>. The hash comes from the Release, the hook and
the renderRef, so a new render creates a new workload. convoy sets these labels, and they
replace user labels with the same key:
| Label | Value |
|---|---|
convoy.kumodo.io/managed-by | convoy |
convoy.kumodo.io/release-name | The name of the Release |
convoy.kumodo.io/release-namespace | The namespace of the Release |
convoy.kumodo.io/release-uid | The UID of the Release |
convoy.kumodo.io/hook-phase | The phase, for example PreSync |
convoy.kumodo.io/hook-name | The name of the hook |
Status#
status.lifecycle has one list per phase. Each entry records the workload, the renderRef, the
state (Running, Succeeded, Failed or TimedOut) and the times. A skipped hook has no
entry.
LifecycleSucceeded · written by convoy-controller-manager (field manager convoy-release)
| Reason | Status | Meaning |
|---|---|---|
AllSucceeded | True | All lifecycle hooks succeeded or were skipped. |
Running | Unknown | At least one lifecycle hook is still running. |
HookFailed | False | A lifecycle hook failed. This is so for each onFailure value. onFailure only controls if the sync continues. |
The Lifecycle printer column shows N/A, Running:<phase>, Failed:<phase> or
Completed:<phase>, for the hooks of the current render.
| Field | Type | Description |
|---|---|---|
status.lifecycle | LifecycleStatus | Lifecycle reflects the observed state of the release lifecycle hooks. |
status.lifecycle.postDelete | []LifecycleHookStatuslist type: map, keys: name | PostDelete are the post-delete hooks. |
status.lifecycle.postDelete[].apiVersion required | string | ApiVersion is the API version of the resource created by the hook. |
status.lifecycle.postDelete[].cleanedUpAt | Time | CleanedUpAt is the time when the hook was cleaned up. |
status.lifecycle.postDelete[].completedAt | Time | CompletedAt is the time when the hook completed. |
status.lifecycle.postDelete[].followUpAction | string | FollowUpAction is the action to take after the hook failed.
|
status.lifecycle.postDelete[].kind required | string | Kind is the kind of the resource created by the hook. |
status.lifecycle.postDelete[].message | string | Message is the human-readable message containing the failure reason, if any. |
status.lifecycle.postDelete[].name required | string | Name is the name of the hook. |
status.lifecycle.postDelete[].renderRef | string | RenderRef is the hash of the release render lifecycle hook was triggered by. |
status.lifecycle.postDelete[].resourceName required | string | ResourceName is the name of the resource created by the hook. |
status.lifecycle.postDelete[].resourceNamespace required | string | ResourceNamespace is the namespace of the resource created by the hook. |
status.lifecycle.postDelete[].source required | string | Source is the source of the hook.
|
status.lifecycle.postDelete[].startedAt | Time | StartedAt is the time when the hook started. |
status.lifecycle.postDelete[].state required | string | State is the state of the hook.
|
status.lifecycle.postDelete[].weight required | integer | Weight is the weight of the hook. |
status.lifecycle.postSync | []LifecycleHookStatuslist type: map, keys: name | PostSync are the post-sync hooks. |
status.lifecycle.postSync[].apiVersion required | string | ApiVersion is the API version of the resource created by the hook. |
status.lifecycle.postSync[].cleanedUpAt | Time | CleanedUpAt is the time when the hook was cleaned up. |
status.lifecycle.postSync[].completedAt | Time | CompletedAt is the time when the hook completed. |
status.lifecycle.postSync[].followUpAction | string | FollowUpAction is the action to take after the hook failed.
|
status.lifecycle.postSync[].kind required | string | Kind is the kind of the resource created by the hook. |
status.lifecycle.postSync[].message | string | Message is the human-readable message containing the failure reason, if any. |
status.lifecycle.postSync[].name required | string | Name is the name of the hook. |
status.lifecycle.postSync[].renderRef | string | RenderRef is the hash of the release render lifecycle hook was triggered by. |
status.lifecycle.postSync[].resourceName required | string | ResourceName is the name of the resource created by the hook. |
status.lifecycle.postSync[].resourceNamespace required | string | ResourceNamespace is the namespace of the resource created by the hook. |
status.lifecycle.postSync[].source required | string | Source is the source of the hook.
|
status.lifecycle.postSync[].startedAt | Time | StartedAt is the time when the hook started. |
status.lifecycle.postSync[].state required | string | State is the state of the hook.
|
status.lifecycle.postSync[].weight required | integer | Weight is the weight of the hook. |
status.lifecycle.preDelete | []LifecycleHookStatuslist type: map, keys: name | PreDelete are the pre-delete hooks. |
status.lifecycle.preDelete[].apiVersion required | string | ApiVersion is the API version of the resource created by the hook. |
status.lifecycle.preDelete[].cleanedUpAt | Time | CleanedUpAt is the time when the hook was cleaned up. |
status.lifecycle.preDelete[].completedAt | Time | CompletedAt is the time when the hook completed. |
status.lifecycle.preDelete[].followUpAction | string | FollowUpAction is the action to take after the hook failed.
|
status.lifecycle.preDelete[].kind required | string | Kind is the kind of the resource created by the hook. |
status.lifecycle.preDelete[].message | string | Message is the human-readable message containing the failure reason, if any. |
status.lifecycle.preDelete[].name required | string | Name is the name of the hook. |
status.lifecycle.preDelete[].renderRef | string | RenderRef is the hash of the release render lifecycle hook was triggered by. |
status.lifecycle.preDelete[].resourceName required | string | ResourceName is the name of the resource created by the hook. |
status.lifecycle.preDelete[].resourceNamespace required | string | ResourceNamespace is the namespace of the resource created by the hook. |
status.lifecycle.preDelete[].source required | string | Source is the source of the hook.
|
status.lifecycle.preDelete[].startedAt | Time | StartedAt is the time when the hook started. |
status.lifecycle.preDelete[].state required | string | State is the state of the hook.
|
status.lifecycle.preDelete[].weight required | integer | Weight is the weight of the hook. |
status.lifecycle.preSync | []LifecycleHookStatuslist type: map, keys: name | PreSync are the pre-sync hooks. |
status.lifecycle.preSync[].apiVersion required | string | ApiVersion is the API version of the resource created by the hook. |
status.lifecycle.preSync[].cleanedUpAt | Time | CleanedUpAt is the time when the hook was cleaned up. |
status.lifecycle.preSync[].completedAt | Time | CompletedAt is the time when the hook completed. |
status.lifecycle.preSync[].followUpAction | string | FollowUpAction is the action to take after the hook failed.
|
status.lifecycle.preSync[].kind required | string | Kind is the kind of the resource created by the hook. |
status.lifecycle.preSync[].message | string | Message is the human-readable message containing the failure reason, if any. |
status.lifecycle.preSync[].name required | string | Name is the name of the hook. |
status.lifecycle.preSync[].renderRef | string | RenderRef is the hash of the release render lifecycle hook was triggered by. |
status.lifecycle.preSync[].resourceName required | string | ResourceName is the name of the resource created by the hook. |
status.lifecycle.preSync[].resourceNamespace required | string | ResourceNamespace is the namespace of the resource created by the hook. |
status.lifecycle.preSync[].source required | string | Source is the source of the hook.
|
status.lifecycle.preSync[].startedAt | Time | StartedAt is the time when the hook started. |
status.lifecycle.preSync[].state required | string | State is the state of the hook.
|
status.lifecycle.preSync[].weight required | integer | Weight is the weight of the hook. |
status.lifecycle.syncFailed | []LifecycleHookStatuslist type: map, keys: name | SyncFailed are the sync-failed hooks. |
status.lifecycle.syncFailed[].apiVersion required | string | ApiVersion is the API version of the resource created by the hook. |
status.lifecycle.syncFailed[].cleanedUpAt | Time | CleanedUpAt is the time when the hook was cleaned up. |
status.lifecycle.syncFailed[].completedAt | Time | CompletedAt is the time when the hook completed. |
status.lifecycle.syncFailed[].followUpAction | string | FollowUpAction is the action to take after the hook failed.
|
status.lifecycle.syncFailed[].kind required | string | Kind is the kind of the resource created by the hook. |
status.lifecycle.syncFailed[].message | string | Message is the human-readable message containing the failure reason, if any. |
status.lifecycle.syncFailed[].name required | string | Name is the name of the hook. |
status.lifecycle.syncFailed[].renderRef | string | RenderRef is the hash of the release render lifecycle hook was triggered by. |
status.lifecycle.syncFailed[].resourceName required | string | ResourceName is the name of the resource created by the hook. |
status.lifecycle.syncFailed[].resourceNamespace required | string | ResourceNamespace is the namespace of the resource created by the hook. |
status.lifecycle.syncFailed[].source required | string | Source is the source of the hook.
|
status.lifecycle.syncFailed[].startedAt | Time | StartedAt is the time when the hook started. |
status.lifecycle.syncFailed[].state required | string | State is the state of the hook.
|
status.lifecycle.syncFailed[].weight required | integer | Weight is the weight of the hook. |
Subresource and CLI#
A write to releases/lifecycle changes only lifecycle, and requests a reconcile. Kubernetes
RBAC controls releases/lifecycle separately from the Release.
kubectl convoy release lifecycle get podinfo
kubectl convoy release lifecycle set podinfo -f hooks.yamlFields#
| Field | Type | Description |
|---|---|---|
lifecycle | ReleaseLifecycle | ReleaseLifecycle defines the desired state of the ReleaseLifecycle. |
lifecycle.postDelete | []LifecycleHookSpeclist type: atomic | PostDelete are the post-delete hooks. |
lifecycle.postDelete[].cleanup required | string | Cleanup is the action to take when the hook completes.
|
lifecycle.postDelete[].deleteBeforeCreation | boolean | DeleteBeforeCreation is true if the hook should delete the resources before they are created. |
lifecycle.postDelete[].if | string | If is the hook execution condition written in CEL expression format. |
lifecycle.postDelete[].jobTemplate | LifecycleHookJobTemplate | JobTemplate is the job template for the hook. Mutual exclusive with PodTemplate. |
lifecycle.postDelete[].jobTemplate.metadata | PartialMetadata | Metadata contains partial object metadata. |
lifecycle.postDelete[].jobTemplate.metadata.annotations | map[string]string | Annotations is the annotations that will be set on the lifecycle hook workload. |
lifecycle.postDelete[].jobTemplate.metadata.labels | map[string]string | Labels is the labels that will be set on the lifecycle hook workload. |
lifecycle.postDelete[].jobTemplate.metadata.namespace | string | Namespace is the namespace where the lifecycle hook workload should run. Defaults to release target namespace if not set. |
lifecycle.postDelete[].jobTemplate.spec required | JobSpec | Spec contains the Job spec. |
lifecycle.postDelete[].name required | string | Name is the name of the hook. |
lifecycle.postDelete[].onFailure required | string | OnFailure is the action to take when the hook fails.
|
lifecycle.postDelete[].podTemplate | LifecycleHookPodTemplate | PodTemplate is the pod template for the hook. Mutual exclusive with JobTemplate. |
lifecycle.postDelete[].podTemplate.metadata | PartialMetadata | Metadata contains partial object metadata. |
lifecycle.postDelete[].podTemplate.metadata.annotations | map[string]string | Annotations is the annotations that will be set on the lifecycle hook workload. |
lifecycle.postDelete[].podTemplate.metadata.labels | map[string]string | Labels is the labels that will be set on the lifecycle hook workload. |
lifecycle.postDelete[].podTemplate.metadata.namespace | string | Namespace is the namespace where the lifecycle hook workload should run. Defaults to release target namespace if not set. |
lifecycle.postDelete[].podTemplate.spec required | PodSpec | Spec contains the Pod spec. |
lifecycle.postDelete[].runAfter | string | RunAfter defines the Release condition that should be achieved before running the PostSync lifecycle hook(s).
|
lifecycle.postDelete[].timeout | Duration | Timeout is the timeout for the hook. If not set, controller will wait indefinitely. |
lifecycle.postDelete[].type required | string | Type is the type of the hook.
|
lifecycle.postDelete[].weight required | integer | Weight is the weight of the hook. |
lifecycle.postSync | []LifecycleHookSpeclist type: atomic | PostSync are the post-sync hooks. |
lifecycle.postSync[].cleanup required | string | Cleanup is the action to take when the hook completes.
|
lifecycle.postSync[].deleteBeforeCreation | boolean | DeleteBeforeCreation is true if the hook should delete the resources before they are created. |
lifecycle.postSync[].if | string | If is the hook execution condition written in CEL expression format. |
lifecycle.postSync[].jobTemplate | LifecycleHookJobTemplate | JobTemplate is the job template for the hook. Mutual exclusive with PodTemplate. |
lifecycle.postSync[].jobTemplate.metadata | PartialMetadata | Metadata contains partial object metadata. |
lifecycle.postSync[].jobTemplate.metadata.annotations | map[string]string | Annotations is the annotations that will be set on the lifecycle hook workload. |
lifecycle.postSync[].jobTemplate.metadata.labels | map[string]string | Labels is the labels that will be set on the lifecycle hook workload. |
lifecycle.postSync[].jobTemplate.metadata.namespace | string | Namespace is the namespace where the lifecycle hook workload should run. Defaults to release target namespace if not set. |
lifecycle.postSync[].jobTemplate.spec required | JobSpec | Spec contains the Job spec. |
lifecycle.postSync[].name required | string | Name is the name of the hook. |
lifecycle.postSync[].onFailure required | string | OnFailure is the action to take when the hook fails.
|
lifecycle.postSync[].podTemplate | LifecycleHookPodTemplate | PodTemplate is the pod template for the hook. Mutual exclusive with JobTemplate. |
lifecycle.postSync[].podTemplate.metadata | PartialMetadata | Metadata contains partial object metadata. |
lifecycle.postSync[].podTemplate.metadata.annotations | map[string]string | Annotations is the annotations that will be set on the lifecycle hook workload. |
lifecycle.postSync[].podTemplate.metadata.labels | map[string]string | Labels is the labels that will be set on the lifecycle hook workload. |
lifecycle.postSync[].podTemplate.metadata.namespace | string | Namespace is the namespace where the lifecycle hook workload should run. Defaults to release target namespace if not set. |
lifecycle.postSync[].podTemplate.spec required | PodSpec | Spec contains the Pod spec. |
lifecycle.postSync[].runAfter | string | RunAfter defines the Release condition that should be achieved before running the PostSync lifecycle hook(s).
|
lifecycle.postSync[].timeout | Duration | Timeout is the timeout for the hook. If not set, controller will wait indefinitely. |
lifecycle.postSync[].type required | string | Type is the type of the hook.
|
lifecycle.postSync[].weight required | integer | Weight is the weight of the hook. |
lifecycle.preDelete | []LifecycleHookSpeclist type: atomic | PreDelete are the pre-delete hooks. |
lifecycle.preDelete[].cleanup required | string | Cleanup is the action to take when the hook completes.
|
lifecycle.preDelete[].deleteBeforeCreation | boolean | DeleteBeforeCreation is true if the hook should delete the resources before they are created. |
lifecycle.preDelete[].if | string | If is the hook execution condition written in CEL expression format. |
lifecycle.preDelete[].jobTemplate | LifecycleHookJobTemplate | JobTemplate is the job template for the hook. Mutual exclusive with PodTemplate. |
lifecycle.preDelete[].jobTemplate.metadata | PartialMetadata | Metadata contains partial object metadata. |
lifecycle.preDelete[].jobTemplate.metadata.annotations | map[string]string | Annotations is the annotations that will be set on the lifecycle hook workload. |
lifecycle.preDelete[].jobTemplate.metadata.labels | map[string]string | Labels is the labels that will be set on the lifecycle hook workload. |
lifecycle.preDelete[].jobTemplate.metadata.namespace | string | Namespace is the namespace where the lifecycle hook workload should run. Defaults to release target namespace if not set. |
lifecycle.preDelete[].jobTemplate.spec required | JobSpec | Spec contains the Job spec. |
lifecycle.preDelete[].name required | string | Name is the name of the hook. |
lifecycle.preDelete[].onFailure required | string | OnFailure is the action to take when the hook fails.
|
lifecycle.preDelete[].podTemplate | LifecycleHookPodTemplate | PodTemplate is the pod template for the hook. Mutual exclusive with JobTemplate. |
lifecycle.preDelete[].podTemplate.metadata | PartialMetadata | Metadata contains partial object metadata. |
lifecycle.preDelete[].podTemplate.metadata.annotations | map[string]string | Annotations is the annotations that will be set on the lifecycle hook workload. |
lifecycle.preDelete[].podTemplate.metadata.labels | map[string]string | Labels is the labels that will be set on the lifecycle hook workload. |
lifecycle.preDelete[].podTemplate.metadata.namespace | string | Namespace is the namespace where the lifecycle hook workload should run. Defaults to release target namespace if not set. |
lifecycle.preDelete[].podTemplate.spec required | PodSpec | Spec contains the Pod spec. |
lifecycle.preDelete[].runAfter | string | RunAfter defines the Release condition that should be achieved before running the PostSync lifecycle hook(s).
|
lifecycle.preDelete[].timeout | Duration | Timeout is the timeout for the hook. If not set, controller will wait indefinitely. |
lifecycle.preDelete[].type required | string | Type is the type of the hook.
|
lifecycle.preDelete[].weight required | integer | Weight is the weight of the hook. |
lifecycle.preSync | []LifecycleHookSpeclist type: atomic | PreSync are the pre-sync hooks. |
lifecycle.preSync[].cleanup required | string | Cleanup is the action to take when the hook completes.
|
lifecycle.preSync[].deleteBeforeCreation | boolean | DeleteBeforeCreation is true if the hook should delete the resources before they are created. |
lifecycle.preSync[].if | string | If is the hook execution condition written in CEL expression format. |
lifecycle.preSync[].jobTemplate | LifecycleHookJobTemplate | JobTemplate is the job template for the hook. Mutual exclusive with PodTemplate. |
lifecycle.preSync[].jobTemplate.metadata | PartialMetadata | Metadata contains partial object metadata. |
lifecycle.preSync[].jobTemplate.metadata.annotations | map[string]string | Annotations is the annotations that will be set on the lifecycle hook workload. |
lifecycle.preSync[].jobTemplate.metadata.labels | map[string]string | Labels is the labels that will be set on the lifecycle hook workload. |
lifecycle.preSync[].jobTemplate.metadata.namespace | string | Namespace is the namespace where the lifecycle hook workload should run. Defaults to release target namespace if not set. |
lifecycle.preSync[].jobTemplate.spec required | JobSpec | Spec contains the Job spec. |
lifecycle.preSync[].name required | string | Name is the name of the hook. |
lifecycle.preSync[].onFailure required | string | OnFailure is the action to take when the hook fails.
|
lifecycle.preSync[].podTemplate | LifecycleHookPodTemplate | PodTemplate is the pod template for the hook. Mutual exclusive with JobTemplate. |
lifecycle.preSync[].podTemplate.metadata | PartialMetadata | Metadata contains partial object metadata. |
lifecycle.preSync[].podTemplate.metadata.annotations | map[string]string | Annotations is the annotations that will be set on the lifecycle hook workload. |
lifecycle.preSync[].podTemplate.metadata.labels | map[string]string | Labels is the labels that will be set on the lifecycle hook workload. |
lifecycle.preSync[].podTemplate.metadata.namespace | string | Namespace is the namespace where the lifecycle hook workload should run. Defaults to release target namespace if not set. |
lifecycle.preSync[].podTemplate.spec required | PodSpec | Spec contains the Pod spec. |
lifecycle.preSync[].runAfter | string | RunAfter defines the Release condition that should be achieved before running the PostSync lifecycle hook(s).
|
lifecycle.preSync[].timeout | Duration | Timeout is the timeout for the hook. If not set, controller will wait indefinitely. |
lifecycle.preSync[].type required | string | Type is the type of the hook.
|
lifecycle.preSync[].weight required | integer | Weight is the weight of the hook. |
lifecycle.syncFailed | []LifecycleHookSpeclist type: atomic | SyncFailed are the sync-failed hooks. |
lifecycle.syncFailed[].cleanup required | string | Cleanup is the action to take when the hook completes.
|
lifecycle.syncFailed[].deleteBeforeCreation | boolean | DeleteBeforeCreation is true if the hook should delete the resources before they are created. |
lifecycle.syncFailed[].if | string | If is the hook execution condition written in CEL expression format. |
lifecycle.syncFailed[].jobTemplate | LifecycleHookJobTemplate | JobTemplate is the job template for the hook. Mutual exclusive with PodTemplate. |
lifecycle.syncFailed[].jobTemplate.metadata | PartialMetadata | Metadata contains partial object metadata. |
lifecycle.syncFailed[].jobTemplate.metadata.annotations | map[string]string | Annotations is the annotations that will be set on the lifecycle hook workload. |
lifecycle.syncFailed[].jobTemplate.metadata.labels | map[string]string | Labels is the labels that will be set on the lifecycle hook workload. |
lifecycle.syncFailed[].jobTemplate.metadata.namespace | string | Namespace is the namespace where the lifecycle hook workload should run. Defaults to release target namespace if not set. |
lifecycle.syncFailed[].jobTemplate.spec required | JobSpec | Spec contains the Job spec. |
lifecycle.syncFailed[].name required | string | Name is the name of the hook. |
lifecycle.syncFailed[].onFailure required | string | OnFailure is the action to take when the hook fails.
|
lifecycle.syncFailed[].podTemplate | LifecycleHookPodTemplate | PodTemplate is the pod template for the hook. Mutual exclusive with JobTemplate. |
lifecycle.syncFailed[].podTemplate.metadata | PartialMetadata | Metadata contains partial object metadata. |
lifecycle.syncFailed[].podTemplate.metadata.annotations | map[string]string | Annotations is the annotations that will be set on the lifecycle hook workload. |
lifecycle.syncFailed[].podTemplate.metadata.labels | map[string]string | Labels is the labels that will be set on the lifecycle hook workload. |
lifecycle.syncFailed[].podTemplate.metadata.namespace | string | Namespace is the namespace where the lifecycle hook workload should run. Defaults to release target namespace if not set. |
lifecycle.syncFailed[].podTemplate.spec required | PodSpec | Spec contains the Pod spec. |
lifecycle.syncFailed[].runAfter | string | RunAfter defines the Release condition that should be achieved before running the PostSync lifecycle hook(s).
|
lifecycle.syncFailed[].timeout | Duration | Timeout is the timeout for the hook. If not set, controller will wait indefinitely. |
lifecycle.syncFailed[].type required | string | Type is the type of the hook.
|
lifecycle.syncFailed[].weight required | integer | Weight is the weight of the hook. |
In the code
convoy v0.9.0
api/core.ValidateReleaseLifecycleapi/core/validation.go:371api/core.validateLifecycleHookapi/core/validation.go:421internal/controller/release.hookWorkloadNameinternal/controller/release/hookworkload.go:86internal/controller/release.lifecycleConditioninternal/controller/release/hookstatus.go:110internal/registry/core/release.(*LifecycleREST).Updateinternal/registry/core/release/store.go:293