Kyverno detection
The installer detects an existing Kyverno instance in the cluster, because two instances take ownership of each other's objects and one fails to start.
Kyverno is a cluster-wide component with fixed custom resource definition, cluster role, and webhook names. Two instances in one cluster take ownership of each other's objects, and one then fails to start. The cluster-vars phase looks for a running Kyverno admission controller that carries the label app.kubernetes.io/part-of=kyverno, and acts as follows:
- No other instance, or only the instance that the artifact provides (namespace kyverno): the installer changes nothing.
- Exactly one other instance, for example ccf-kyverno on a cluster that the taikun-kubevap context provisions: the installer sets kyverno_suspend to
trueand kyverno_namespace to the namespace of that instance. The ccf artifact does not reconcile its own Kyverno release, binds its generate-secrets role-based access control to the existing instance, and the existing instance enforces the Cloudera Cloud Factory policies. - Both kyverno and another namespace, several other instances, an admission controller that does not run as kyverno-admission-controller, or a failed lookup: the installer changes nothing and prints a warning. Resolve the cluster state, or set the variables yourself.
To decide yourself, set CLUSTER_VAR_kyverno_suspend, CLUSTER_VAR_kyverno_namespace, or both in bootstrap.env. If you set either variable, the installer skips the detection.
