This doc is used to introduce how to add a pre-delete manifestWork for an AddOn.
We support to use Jobs or Pods as a pre-delete manifestWork for an AddOn.
- Add the annotation
addon.open-cluster-management.io/addon-pre-deleteto theJobsorPodsmanifests. - The
JobsorPodswill not be applied until the managedClusterAddon is deleted. - The
JobsorPodswill be applied on the managed cluster by applying the manifestWork namedaddon-<addon name>-pre-deletewhen the managedClusterAddon is deleting. - After the
JobsareCompletedorPodsare inSucceededphase, all the deployed manifestWorks will be deleted.
See the example helloworld_helm