You can manage Kubewarden Helm charts, like other Helm charts, with Rancher Fleet. Rancher Fleet uses Kubernetes CRDs to define a GitOps approach to managing Kubernetes clusters. It does this by defining Fleet Bundles.
The Kubewarden charts are standard charts,
they have dependencies (such as
and depend transitively on each other
See the Quickstart docs for more information.
Using Rancher Fleet, you can code the chart dependencies using
dependsOn in the
You may see transient errors until the charts are ready, such as:
ErrApplied(1) [Cluster fleet-local/local: dependent bundle(s) are not ready:
These errors don't signify a problem, and once the charts have finished deployment, they no longer appear.
When removing the GitRepo, all 3 Kubewarden charts get removed at once.
This means the
kubewarden-crds chart gets removed.
Kubewarden uses a pre-delete helm hook job in
kubewarden-controller chart that deletes the default policy-server.
This pre-delete hook is necessary to vacate the webhooks of the policies before deleting the PolicyServer.
This is true any Policy Engine.
If not, the cluster may have webhooks for policies that don't exist anymore
so rejecting everything and being in a failed state.
Removing the GitRepo, and hence the
at the same time as the
kubewarden-controller chart makes the pre-delete hook job fail.
It means the removal is incomplete, leaving 'debris' in the cluster.
Uninstalling CRDs automatically isn't normally supported by any tooling, and Rancher Fleet is no exception.
To perform a correct removal,
make sure to first remove the Bundle for
kubewarden-defaults from the cluster.
Do this by committing those changes to the repository holding
the Fleet configuration and then waiting until it's applied.
kubewarden-controller in the same way,
and lastly, remove
Another option is to add 2 GitRepos, one for the CRDs only, and another for the rest of the Kubewarden charts. This lets you remove the Kubewarden charts first and the Kubewarden CRDs last.
For an example of Fleet bundle definitions see github.com/kubewarden/fleet-example.