Avoid setting defaults in CRD for fields where the default might change #22063
Labels
area/che-operator
Issues and PRs related to Eclipse Che Kubernetes Operator
area/dashboard
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
Describe the bug
The Che Operator defines default values in its CheCluster CRD, even though some values are not constant and may change over time. For example,
.devEnvironments.defaultComponents
is defined with the default value (see here)(ref: CRD)
This has the effect of fixing these fields at CheCluster creation time; CRD default values tell the cluster to automatically fill unset fields with the default. Once the fields are filled with the defaults, these fields are not updated by new defaults.
Since the CheCluster is intended to be long-lived over multiple Eclipse Che versions, keeping the defaults from when the CheCluster was created is likely unintentional behavior.
Che version
7.61@latest
Steps to reproduce
.devEnvironments.defaultComponents
.devEnvironments.defaultComponents
is populated with default value.devEnvironments.defaultComponents
Expected behavior
Default values that may change with future versions of Che should use defaults stored in the operator itself, with the default value being used when the CheCluster field is unset. This would mean
Runtime
other (please specify in additional context)
Screenshots
No response
Installation method
other (please specify in additional context)
Environment
other (please specify in additional context)
Eclipse Che Logs
No response
Additional context
Related to issue #21979
This bug can potentially lead to hard-to-diagnose issues in the future -- for example, if a user installed Che before container build support was added, podman build may fail in an empty workspace even after the user has upgraded to a version of Che that supports container build. In trying to reproduce the issue, a new install of Che might not reproduce the issue due to an updated default.
For CheClusters that have fields set by defaults, the only workaround is to delete the fields from the CheCluster manually.
The text was updated successfully, but these errors were encountered: