* Do not remove webhooks during initialization
During initialization the Kyverno leader Pod deletes all the
existing webhooks and recreates them. There is a small time window were
the cluster is not protected by the webhooks, allowing a user to apply
resources without any verfication.
This commit updates the leader registration logic to not remove and
recreate the webhooks but, in the case that the webhooks already exist,
update them.
Signed-off-by: Ioannis Bouloumpasis <buluba@arrikto.com>
* Fix linter errors
Signed-off-by: Ioannis Bouloumpasis <buluba@arrikto.com>
* Use the Lister to get webhook configurations
Signed-off-by: Ioannis Bouloumpasis <buluba@arrikto.com>