-
Notifications
You must be signed in to change notification settings - Fork 667
[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
Open
win5923
wants to merge
1
commit into
ray-project:master
Choose a base branch
from
win5923:helm-configmap
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+283
−1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…s enabled Signed-off-by: win5923 <[email protected]>
8c2c7e6 to
418d799
Compare
win5923
commented
Dec 14, 2025
Comment on lines
+2
to
+21
| {{- if hasKey .Values "reconcileConcurrency" }} | ||
| {{- $rc := toString .Values.reconcileConcurrency }} | ||
| {{- if not (regexMatch "^[1-9][0-9]*$" $rc) }} | ||
| {{- fail (printf "values.reconcileConcurrency must be a positive integer, got %q" $rc) }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- if hasKey .Values "kubeClient" }} | ||
| {{- if hasKey .Values.kubeClient "qps" }} | ||
| {{- $qps := toString .Values.kubeClient.qps }} | ||
| {{- if not (regexMatch "^[+-]?[0-9]+(\\.[0-9]+)?$" $qps) }} | ||
| {{- fail (printf "values.kubeClient.qps must be a valid float number, got %q" $qps) }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- if hasKey .Values.kubeClient "burst" }} | ||
| {{- $burst := toString .Values.kubeClient.burst }} | ||
| {{- if not (regexMatch "^[0-9]+$" $burst) }} | ||
| {{- fail (printf "values.kubeClient.burst must be a non-negative integer, got %q" $burst) }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} |
Collaborator
Author
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.
Copy from
kuberay/helm-chart/kuberay-operator/templates/deployment.yaml
Lines 132 to 151 in bd0d46b
| {{- if hasKey .Values "reconcileConcurrency" -}} | |
| {{- $rc := toString .Values.reconcileConcurrency }} | |
| {{- if not (regexMatch "^[1-9][0-9]*$" $rc) }} | |
| {{- fail (printf "values.reconcileConcurrency must be a positive integer, got %q" $rc) }} | |
| {{- end }} | |
| {{- $argList = append $argList (printf "--reconcile-concurrency=%v" .Values.reconcileConcurrency) -}} | |
| {{- end -}} | |
| {{- if hasKey .Values "kubeClient" -}} | |
| {{- if hasKey .Values.kubeClient "qps" -}} | |
| {{- $qps := toString .Values.kubeClient.qps }} | |
| {{- if not (regexMatch "^[+-]?[0-9]+(\\.[0-9]+)?$" $qps) }} | |
| {{- fail (printf "values.kubeClient.qps must be a valid float number, got %q" $qps) }} | |
| {{- end }} | |
| {{- $argList = append $argList (printf "--qps=%v" .Values.kubeClient.qps) -}} | |
| {{- end -}} | |
| {{- if hasKey .Values.kubeClient "burst" -}} | |
| {{- $burst := toString .Values.kubeClient.burst }} | |
| {{- if not (regexMatch "^[0-9]+$" $burst) }} | |
| {{- fail (printf "values.kubeClient.burst must be a non-negative integer, got %q" $burst) }} | |
| {{- end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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