Closed slopezz closed 3 years ago
/kind feature /priority important-soon /label size/xs /assign
/lgtm
LGTM label has been added.
/lgtm
/shrug
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: slopezz
The full list of commands accepted by this bot can be found here.
The pull request process is described here
kube-rbac-proxy is used by default on
operator-sdk
to protect operator metrics path, in case you don't want anyone in the cluster but only k8s authenticated resources can access to them.But there are 2 current issues with kube-rbac-proxy:
kube-rbac-proxy:v0.5.0
to latestkube-rbac-proxy:v0.8.0
https://github.com/operator-framework/operator-sdk/issues/4684 causes error on OpenShift 4.6+:openshift4/ose-kube-rbac-proxy:v4.7.0
(which works OK), but this image is behindregistry.redhat.io
registry which requires authenticated if not using Openshift (it doesn't work directly on vanilla k8s), so you need to maintain 2 different bundles with different proxy images if you want to run the operator on both OpenShift or K8s, which makes maintenance more complex.bearerTokenFile
field https://github.com/operator-framework/operator-sdk/issues/4764#issuecomment-821264658 (which is needed to scrape metrics behind kube-rbac-proxy) , so it seems there is no way of having operator metrics with auth if using OCP UWM.For that reason, taking into account that operator metrics are not that important to have them with forced auth, I have disabled kube-rbac-proxy container (making a few changes to make that work with a new patch, and leaving default proxy yamls there, in case they want to be enabled easily in the future), so anyone once inside the cluster could check operator metrics without any problem on both OCP and k8s (even if using OCP UWM).