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

Che Operator defaults cleaner makes it impossible to set some fields #22322

Closed
amisevsk opened this issue Jun 23, 2023 · 2 comments
Closed

Che Operator defaults cleaner makes it impossible to set some fields #22322

amisevsk opened this issue Jun 23, 2023 · 2 comments
Assignees
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@amisevsk
Copy link
Contributor

Describe the bug

Attempting to set any of the CheCluster fields "cleaned up" by the CheClusterDefaultsCleaner to what was once a default results in the operator overwriting that field and removing it.

Che version

7.69@latest

Steps to reproduce

  1. Create CheCluster
  2. Set checluster.spec.components.pluginRegistry.openVSXURL to "https://open-vsx.org"
  3. Reload CheCluster after saving, field is not set

Expected behavior

Che should not overwrite fields set in the CheCluster spec

Runtime

OpenShift

Screenshots

No response

Installation method

OperatorHub

Environment

other (please specify in additional context)

Eclipse Che Logs

No response

Additional context

No response

@amisevsk amisevsk added kind/bug Outline of a bug - must adhere to the bug report template. area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator labels Jun 23, 2023
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Jun 23, 2023
@amisevsk amisevsk added severity/P1 Has a major impact to usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Jun 23, 2023
@amisevsk
Copy link
Contributor Author

amisevsk commented Jun 23, 2023

As a workaround for openVSXURL, setting the field to https://open-vsx.org/ (i.e. with a trailing slash) avoids this issue. Does not work -- see #22263

The Che Operator should probably not be un-setting fields in the CR if doing so would change behavior (i.e. if the internal default value is different from the 'detected' default value in the CheCluster).

@tolusha
Copy link
Contributor

tolusha commented Jul 3, 2023

Operator does cleans up the default value for openVSXURL field. My bad, it should NOT do for fresh installations.
The workaround is to add annotation for CheCluster CR sample, like this:

apiVersion: org.eclipse.che/v2
kind: CheCluster
metadata:
  name: devspaces
  namespace: openshift-operators
  annotations:
    che.eclipse.org/checluster-defaults-cleanup: '{"spec.components.pluginRegistry.openVSXURL":"true"}' 
spec:
  components:
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

3 participants