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

Improve cluster type (Kubernetes or OpenShift) detection on operator startup #995

Closed
amisevsk opened this issue Dec 14, 2022 · 1 comment
Assignees
Milestone

Comments

@amisevsk
Copy link
Collaborator

Description

DWO needs to configure its behaviour based on whether it is running in OpenShift or Kubernetes (for example, setting default pod security context, using routes instead of ingresses). This is normally done by checking if OpenShift-specific APIs are being served by the cluster (routes, projects, templates, etc.). However, when a cluster enters a degraded state it can result in API errors that prevent access to any objects on the cluster. This causes the operator to

  • Fail at leader election, resulting in the controller pod restarting
  • Fail to check for OpenShift APIs on the cluster

If the cluster then recovers from the degraded state, DWO will be left running under the assumption that it is in a Kubernetes cluster. This can result in workspaces failing to start due to an invalid pod security context (i.e. user ID is 1234 instead of unspecified).

How To Reproduce

Not consistently reproducible, unclear what causes cluster degraded state.

Expected behavior

DWO should improve how it detects cluster type in some way to avoid this issue.

Additional context

This issue manifests due to changes in #953 -- previously, configured pod security contexts were ignored on OpenShift and so the default value did not matter.

@amisevsk amisevsk self-assigned this Dec 14, 2022
@amisevsk amisevsk mentioned this issue Jan 9, 2023
60 tasks
@amisevsk
Copy link
Collaborator Author

After various attempts to reproduce the degraded cluster state that triggers this issue and failing, I've decided to close this issue as unreproducible.

If anyone encounters this again, we can reopen.

@amisevsk amisevsk added this to the v0.19.x milestone Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant