Skip to content

Commit

Permalink
add no-monitor by default
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin85421 committed May 22, 2023
1 parent 82c925b commit 718de4d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ray-operator/controllers/ray/common/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ func DefaultHeadPodTemplate(instance rayiov1alpha1.RayCluster, headSpec rayiov1a

// if in-tree autoscaling is enabled, then autoscaler container should be injected into head pod.
if instance.Spec.EnableInTreeAutoscaling != nil && *instance.Spec.EnableInTreeAutoscaling {
// The default autoscaler is not compatible with Kubernetes. As a result, we disable
// the monitor process by default and inject a KubeRay autoscaler side container into the head pod.
headSpec.RayStartParams["no-monitor"] = "true"
// set custom service account with proper roles bound.
// utils.CheckName clips the name to match the behavior of reconcileAutoscalerServiceAccount
Expand Down Expand Up @@ -685,6 +687,15 @@ func setMissingRayStartParams(rayStartParams map[string]string, nodeType rayiov1
}
}

if nodeType == rayiov1alpha1.HeadNode {
if _, ok := rayStartParams["no-monitor"]; !ok {
// Ray autoscaler supports various node providers such as AWS, GCP, Azure, and Kubernetes.
// However, the default autoscaler is not compatible with Kubernetes. Therefore, we disable
// the monitor process by default.
rayStartParams["no-monitor"] = "true"
}
}

// add metrics port for expose the metrics to the prometheus.
if _, ok := rayStartParams["metrics-export-port"]; !ok {
rayStartParams["metrics-export-port"] = fmt.Sprint(DefaultMetricsPort)
Expand Down

0 comments on commit 718de4d

Please sign in to comment.