mirror of
https://github.com/netbirdio/kubernetes-operator.git
synced 2026-05-22 17:11:40 -07:00
Remove webhook for setup key resource (#148)
The webhook for the NBSetupKey does a mix of runtime validation and configuration validation. The validation of secret key ref has been switched to using CEL rules to achieve the same thing. The other logic is just being removed as it is goes against common practice in Kubernetes. We should not block secret deletion if a pod is using the secret. Existing pods will keep running while new pods will not be able to be created. This is expected behavior in other tools and should be dealt with during reconcile. Checking that secrets exist and other dependency problems should be done during reconcile and then bubbled up with conditions instead. Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
@@ -264,20 +264,6 @@ var _ = Describe("Manager", Ordered, func() {
|
||||
Eventually(verifyCAInjection).Should(Succeed())
|
||||
})
|
||||
|
||||
It("should have CA injection for validating webhooks", func() {
|
||||
By("checking CA injection for validating webhooks")
|
||||
verifyCAInjection := func(g Gomega) {
|
||||
cmd := exec.Command("kubectl", "get",
|
||||
"validatingwebhookconfigurations.admissionregistration.k8s.io",
|
||||
"kubernetes-operator-vnbsetupkey-webhook",
|
||||
"-o", "go-template={{ range .webhooks }}{{ .clientConfig.caBundle }}{{ end }}")
|
||||
vwhOutput, err := utils.Run(cmd)
|
||||
g.Expect(err).NotTo(HaveOccurred())
|
||||
g.Expect(len(vwhOutput)).To(BeNumerically(">", 10))
|
||||
}
|
||||
Eventually(verifyCAInjection).Should(Succeed())
|
||||
})
|
||||
|
||||
Context("NBSetupKey", Ordered, func() {
|
||||
Describe("Basic functionality", Ordered, func() {
|
||||
BeforeAll(func() {
|
||||
|
||||
Reference in New Issue
Block a user