cybozu-go / accurate

Kubernetes controller for multi-tenancy. It propagates resources between namespaces accurately and allows tenant users to create/delete sub-namespaces.
https://cybozu-go.github.io/accurate/
Apache License 2.0
38 stars 5 forks source link

chore: ensure webhooks are handling all API versions #110

Closed erikgb closed 10 months ago

erikgb commented 10 months ago

First I want to clarify that this PR does not fix any problem. 😉 I just felt uncertain if the webhooks were addressing the new (and now served) SubNamespace API version. But they do - since the default matchPolicy in webhooks is Equivalent. Since I already made an effort to check this with tests, I think my changes could be added as an improvement to the hooks tests. It is probably unlikely, but if we want to test webhooks for different behavior between versions, this is possible now.

Also configured matchPolicy explicitly in webhook configuration resources, which I think makes sense now, as we have to ensure the webhooks address all versions.