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-runtime to v0.23.3
  • 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/name annoation was wrong, so I fixed it everywhere
Edited by Thomas Morin

Merge request reports

Loading
Loading