kapp includes builtin rules on how to wait for the following resource types:
- any resource with
metadata.deletionTimestamp
: wait for resource to be fully removed - any resource with
kapp.k14s.io/reconcile-*
annotations: see "Custom waiting behaviour" below apiextensions.k8s.io/<any>/CustomResourceDefinition
: wait for all conditions to turnTrue
apps/v1/DaemonSet
: wait forstatus.numberUnavailable
to be 0apps/v1/Deployment
: see "apps/v1/Deployment resource" belowapps/v1/ReplicaSet
: wait forstatus.replicas == status.availableReplicas
batch/v1/Job
: wait forComplete
orFailed
conditions to appearbatch/<any>/CronJob
: immediately considers as done/v1/Pod
: looks atstatus.phase
/v1/Service
: wait forspec.clusterIP
and/orstatus.loadBalancer.ingress
to become set
If resource is not affected by the above rules, its waiting behaviour depends on aggregate of waiting states of its associated resources (associated resources are resources that share same kapp.k14s.io/association
label value).
kapp.k14s.io/disable-wait
annotation controls whether waiting will happen at all. Possible values: ``.kapp.k14s.io/disable-associated-resources-wait
annotation controls whether associated resources impact resource's waiting state. Possible values: ``.
kapp by default waits for apps/v1/Deployment
resource to have status.unavailableReplicas
equal to zero. Additionally waiting behaviour can be controlled via following annotations:
kapp.k14s.io/apps-v1-deployment-wait-minimum-replicas-available
annotation controls how many new available replicas are enough to consider waiting successful. Example values:"10"
,"5%"
.
(This behaviour has not been enabled. Please reach out on slack for more info.)
kapp can be extended with custom waiting behaviour through resource annotations. Controllers/operators can update resource annotations to indicate resource's reconcilation state.
If resource has below annotations, kapp will wait for reconcile state to become either ok
or fail
.
kapp.k14s.io/reconcile-state
: indicates current reconcilation state. Possible values:ok
,fail
,ongoing
.kapp.k14s.io/reconcile-info
: includes additional information about current reconcilation state.
Note that it's recommended to have a mutating webhook hook to reset kapp.k14s.io/reconcile-state
annotation to ongoing
upon resource creation or update to avoid race between kapp and controller updating annotations.