Improve chectl helm installer to fix cheWorkspacesNamespace che-ws-<username> problem #18459
Labels
area/chectl
Issues related to chectl, the CLI of Che
kind/enhancement
A feature request - must adhere to the feature request template.
severity/P1
Has a major impact to usage or development of the system.
Milestone
Is your enhancement related to a problem? Please describe.
I am using
chectl
with--installer=helm
and--helm-patch-yaml=values.yaml
and when I put the following invalues.yaml
chectl
will crash since it is "flatting" the yaml fields and setting them individually using--set global.cheWorkspacesNamespace=che-ws-<username>
. The set argument is not escaped and the shell will interpret<
and>
. So in order to make it work, I had to single-quote the value in yaml:which is not a good user experience.
Describe the solution you'd like
Here is what we have in
chectl
:we do a join on the options set. What I would like to see is instead of using multiple
--set
switches, use-f values.yaml
and you don't have to parsevalues.yaml
and flat it. If you use multiple-f values.yaml
with helm, the right-most file on the command-line will overwrite the values from the previous ones, effectively taking precedence over the values from the other file.Describe alternatives you've considered
There is also another issue with the current implementation when let's say a user sets a value using one of
chectl
switches (let's saychectl server:deploy --domain=mydomain.com
and also sets it again invalues.yaml
which one will be used? The user has no clue that
chectl
is flatting the yaml and uses--set
, and even if he does, he doesn't know the order that will be used for the--set
switches. So we end up with something like:So it creates confusion in my opinion. A solution would be to leave the code as-is for the
chectl
arguments (pass them as--set
arguments), so they will take priority over what's invalues.yaml
. The documentation could be reflected accordingly to explain the priority, so the user can make a decision on overwriting or not what's invalues.yaml
.Additional context
The text was updated successfully, but these errors were encountered: