Currently every release of the elasticsearch operator bundles a specific version of oauth-proxy with its releases. During the discussion about a bug it became clear that it might be a good idea to not have a specific version for each release of the operator but instead determine the oauth-proxy version based on the cluster the operator is running in. That way there should be no bugs caused by incompatibility between the oauth-proxy and the oauth-server running in the cluster while also being able to use features of newer versions.
- elasticsearch-operator selects an oauth-proxy image for created deployments (currently only Kibana) based on the cluster version it is running in
- Requires first testing deployment of 5.4 with oauth-proxy:4.8 on OCP 4.8 works OOTB
- Introduce two env vars: PROXY_IMAGE_4_8, PROXY_IMAGE
- Read the ClusterVersion resource on startup and decide which env var determines the proxy image:
- On 4.8: PROXY_IMAGE_4_8
- On >4.8: PROXY_IMAGE