Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Command line flag to force OpenShift #805

Closed
ebaron opened this issue May 1, 2024 · 8 comments
Closed

[Request] Command line flag to force OpenShift #805

ebaron opened this issue May 1, 2024 · 8 comments
Assignees
Labels
feat New feature or request help wanted Extra attention is needed

Comments

@ebaron
Copy link
Member

ebaron commented May 1, 2024

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.

@ebaron ebaron added the feat New feature or request label May 1, 2024
@ebaron ebaron added the help wanted Extra attention is needed label May 1, 2024
@tthvo
Copy link
Member

tthvo commented May 2, 2024

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.

@ebaron
Copy link
Member Author

ebaron commented May 2, 2024

I just meant something simpler than that. Just a --openshift flag that overrides the routes detection, so this function always returns true:

func isOpenShift(client discovery.DiscoveryInterface) (bool, error) {
return discovery.IsResourceEnabled(client, routev1.GroupVersion.WithResource("routes"))
}

@tthvo
Copy link
Member

tthvo commented May 2, 2024

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.

@ebaron
Copy link
Member Author

ebaron commented May 2, 2024

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.

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?

@tthvo
Copy link
Member

tthvo commented May 2, 2024

Oh yea that would work better! Okay I can help with this today :D

@tthvo tthvo self-assigned this May 2, 2024
@ebaron
Copy link
Member Author

ebaron commented May 2, 2024

Thanks @tthvo!

@andrewazores
Copy link
Member

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.

@tthvo
Copy link
Member

tthvo commented May 23, 2024

Just closing and track the idea in #830 :D

@tthvo tthvo closed this as completed May 23, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in 3.0.0 release May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request help wanted Extra attention is needed
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants