-
Notifications
You must be signed in to change notification settings - Fork 321
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
[Feature][Helm] Expose the autoscalerOptions #666
[Feature][Helm] Expose the autoscalerOptions #666
Conversation
Hi @DmitriGekhtman , |
Deferring to @kevin85421 for this one. |
…ct#665) The descriptions were copied from the `ray-cluster.autoscaler.large.yaml` Signed-off-by: Andrew Li <orcahmlee@gmail.com>
097cd57
to
8dc8452
Compare
Hi @kevin85421 , |
{{- if .Values.head.autoscalerOptions }} | ||
{{- $values := .Values.head.autoscalerOptions}} | ||
autoscalerOptions: | ||
upscalingMode: {{ $values.upscalingMode | default "Default" }} |
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.
All of these fields are optional -- It's better not to set any defaults here. Let's leave decisions on defaults to the KubeRay operator.
@@ -14,6 +14,17 @@ spec: | |||
{{- if .Values.head.enableInTreeAutoscaling }} | |||
enableInTreeAutoscaling: {{ .Values.head.enableInTreeAutoscaling }} | |||
{{- end }} | |||
{{- if .Values.head.autoscalerOptions }} | |||
{{- $values := .Values.head.autoscalerOptions}} | |||
autoscalerOptions: |
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.
I am not an expert in autoscaler, but I guess these options will take effect only when enableInTreeAutoscaling
is true based on autoscaler.md (is this correct? cc @DmitriGekhtman).
If so, you need to take enableInTreeAutoscaling
into consideration. For example, maybe you need to move the logic into the if
statement of enableInTreeAutoscaling
.
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.
To match the behavior of RayCluster CR itself and accommodate future changes to autoscalerOptions,
I would just check if autoscalerOptions is specified in the chart and copy autoscalerOptions wholesale into the CR if it is present. In other words, I don't recommend analyzing subfields of autoscalerOptions in the chart.
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.
Thank @DmitriGekhtman for your reply!
To match the behavior of RayCluster CR itself and accommodate future changes to autoscalerOptions
Q1: Can you talk more about why this modification will not match the behavior of RayCluster CR?
I don't recommend analyzing subfields of autoscalerOptions in the chart.
Q2: Do you mean that you recommend using toYaml
to copy the whole autoscalerOptions into the CR as I said in the following review comment?
My thought is as follows
- Move
autoscalerOptions
into theif
statement ofenableInTreeAutoscaling
- Use
toYaml
to copy the wholeautoscalerOptions
.
{{- if .Values.head.enableInTreeAutoscaling }}
enableInTreeAutoscaling: {{ .Values.head.enableInTreeAutoscaling }}
{{- if .Values.head.autoscalerOptions }}
autoscalerOptions: {{- toYaml .Values.head.autoscalerOptions | nindent 4}}
{{- end }}
{{- end }}
Thank you!
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.
Do you mean that you recommend using toYaml to copy the whole autoscalerOptions into the CR as I said in the following review comment?
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.
Move autoscalerOptions into the if statement of enableInTreeAutoscaling
Use toYaml to copy the whole autoscalerOptions.
The net effect is the same. I recommend against, because the RayCluster CR allows setting autoscalerOptions with enableInTreeAutoscaling false. (Though the autoscalerOptions are useless in this situation.)
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.
The net effect is the same. I recommend against, because the RayCluster CR allows setting autoscalerOptions with enableInTreeAutoscaling false. (Though the autoscalerOptions are useless in this situation.)
Got it. Thank you!
{{- if $values.resources }} | ||
resources: {{- toYaml $values.resources | nindent 6 }} | ||
{{- end }} | ||
{{- end }} |
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.
In addition, it is unnecessary to expand all fields of autoscalerOptions
in raycluster-cluster.yaml
. You can use toYaml
(example) to pass it from values.yaml
to raycluster-cluster.yaml
in one line.
autoscalerOptions: {{- toYaml .Values.head.autoscalerOptions | nindent 4}}
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.
+1
…ect#665) Using toYaml instead of exposing all of the autoscalerOptions fileds. This will leave the decisions on defaults to the KubeRay operator. Signed-off-by: Andrew Li <orcahmlee@gmail.com>
8dc8452
to
918001d
Compare
Hi @DmitriGekhtman @kevin85421 , |
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.
Thank @orcahmlee for the contribution! This PR looks good to me. If you have tested it manually, I will merge it.
Expose autoscalerOptions in RayCluster Helm chart. Signed-off-by: Andrew Li <orcahmlee@gmail.com>
Why are these changes needed?
The options of the Autoscaler are useful but not exposed to the Helm values.yaml, such as
idleTimeoutSeconds
andresources
.Related issue number
Closes #665
Checks