-
Notifications
You must be signed in to change notification settings - Fork 681
[Helm] Fix: inject flag-based env into ConfigMap when configuration.enabled=true #4270
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
base: master
Are you sure you want to change the base?
Conversation
…s enabled Signed-off-by: win5923 <[email protected]>
8c2c7e6 to
418d799
Compare
seanlaii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Overall this looks great to me.
Aside from the comment below, I have one minor suggestion: should we consider avoiding setting this flag?
I think both are fine, This flag is primarily designed for complex structures that cannot be easily passed via command-line flags (like defaultContainerEnvs, headSidecarContainers). |
Signed-off-by: win5923 <[email protected]>
Sorry for the confusion. What I mean is should we consider avoiding setting the |
Oh, Thanks for catching this. I think we should consider avoiding setting the command line flags when they enable the config map mode. |
| {{- end -}} | ||
| {{- end -}} | ||
| {{- end -}} | ||
| {{- $argList = append $argList (include "kuberay.featureGates" . | trim) -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! To confirm, featureGates is not supported in config map, is it correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM!
Why are these changes needed?
Check #4268 (comment)
Some helm values, e.g. leaderElectionEnabled and EnableMetrics, are passed as flags, see here:
kuberay/helm-chart/kuberay-operator/templates/deployment.yaml
Lines 126 to 130 in 9e8a2c0
Then these flags get ignored when
configuration.enabled=true, see here:kuberay/ray-operator/main.go
Lines 117 to 141 in 9e8a2c0
kuberay/helm-chart/kuberay-operator/values.yaml
Lines 104 to 107 in 9e8a2c0
kuberay/helm-chart/kuberay-operator/templates/deployment.yaml
Lines 86 to 91 in 9e8a2c0
kuberay/helm-chart/kuberay-operator/templates/configmap.yaml
Lines 1 to 20 in 9e8a2c0
This PR includes all flag-based configuration options in the ConfigMap template, ensuring they are properly read from helm values and injected into the ConfigMap.
When
configuration.enabled = true, the KubeRay Operator would read all flag-based envs from the ConfigMap, and these values would take precedence over the flag-based configuration.When
configuration.enabled = falseand the relevant flag-based options are explicitly set in values.yaml (e.g. metrics.enabled = true), the operator would preserving the current flag-based behavior.Related issue number
Closes #4268
Checks