Loading
replace kube-rbac-proxy by kubebuilder secureMetrics/WithAuthenticationAndAuthorization
Closes #66 (closed)
This MR was prepared by applying the "How can I manually change my project to switch to Controller-Runtime's built-in auth protection?" approach described at https://github.com/kubernetes-sigs/kubebuilder/discussions/3907
(I also tried the kubebuilder alpha generate approach, but we modified way to much things in the initial boilerplate to make this practical.)
Here is what this MR does:
- update the code to use the secureMetrics/WithAuthenticationAndAuthorization kubebuilder feature
- this was done using code generated with
kubebuilder alpha generate - to achieve this I also updated
sigs.k8s.io/controller-runtimeto v0.23.3
- this was done using code generated with
- update the manifests to:
- drop everything related to kube-rbac-proxy
- instead, add what relates to using certs on the 8443 metrics port
- in these manifest, I had to fix the pod selector of the ServiceMonitor, and realized that the
app.kubernetes.io/nameannoation was wrong, so I fixed it everywhere
- in these manifest, I had to fix the pod selector of the ServiceMonitor, and realized that the
Edited by Thomas Morin