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 turn
apps/v1/DaemonSet: wait for
status.numberUnavailableto be 0
apps/v1/Deployment: see "apps/v1/Deployment resource" below
apps/v1/ReplicaSet: wait for
status.replicas == status.availableReplicas
batch/v1/Job: wait for
Failedconditions to appear
batch/<any>/CronJob: immediately considers as done
/v1/Pod: looks at
/v1/Service: wait for
status.loadBalancer.ingressto 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).
Controlling waiting via resource annotations
kapp.k14s.io/disable-waitannotation controls whether waiting will happen at all. Possible values: ``.
kapp.k14s.io/disable-associated-resources-waitannotation 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-availableannotation controls how many new available replicas are enough to consider waiting successful. Example values:
Custom waiting behaviour
(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
kapp.k14s.io/reconcile-state: indicates current reconcilation state. Possible values:
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.