cryostat-operator
cryostat-operator copied to clipboard
[Request] Command line flag to force OpenShift
Describe the feature
It would be helpful for downstream releases if there was a command line option for the operator to force OpenShift instead of relying on the existing detection mechanism. Downstream releases for OpenShift won't have an OAuth2 proxy image available, only the OpenShift OAuth proxy. If the detection fails, this could result in a non-working installation.
I guess this would be a flag (e.g. --platform openshift/auto
) for the controller that we can specify in its deployment? Then, we generate a new bundle for downstream with that flat set to openshift
?
Maybe, for upstream, we can edit the Makefile
to use envsubst
for testing.
I just meant something simpler than that. Just a --openshift
flag that overrides the routes detection, so this function always returns true:
https://github.com/cryostatio/cryostat-operator/blob/d7b0379122b9129a76b0c25ffa29923fe4ca433a/internal/main.go#L212-L214
Ahh thanks I guess I was wondering what if --openshift false
, that means no openshift or auto discovery? Not sure if there is a way with flag.Bool
without providing defaults but I might be missing something.
Ahh thanks I guess I was wondering what if
--openshift false
, that means no openshift or auto discovery? Not sure if there is a way withflag.Bool
without providing defaults but I might be missing something.
I see, I think we should treat false as auto-discovery. We can call it force-openshift
to make it clearer, what do you think?
Oh yea that would work better! Okay I can help with this today :D
Thanks @tthvo!
I think it could be valuable for troubleshooting purposes to be able to force oauth2_proxy use on OpenShift, which seems like it could be done with a similar or the same command line flag too. This way it isn't as directly exposed as a CR field, but it's still an available option. Right now if you're on OpenShift you can only get openshift-oauth-proxy, unless you edit the Operator sources and rebuild from that.
Just closing and track the idea in #830 :D