Skip to content

Commit 4a28143

Browse files
authored
[Refactor] Use RayNodeTypeLabelKey constant in CalculateAvailableReplicas (#4948) (#4950)
Signed-off-by: Tsung-Han Ho (Miles Ho) <mystes3016@gmail.com>
1 parent 44daa5f commit 4a28143

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • ray-operator/controllers/ray/utils

ray-operator/controllers/ray/utils/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ func CalculateReadyReplicas(pods corev1.PodList) int32 {
465465
func CalculateAvailableReplicas(pods corev1.PodList) int32 {
466466
count := int32(0)
467467
for _, pod := range pods.Items {
468-
if val, ok := pod.Labels["ray.io/node-type"]; !ok || val != string(rayv1.WorkerNode) {
468+
if val, ok := pod.Labels[RayNodeTypeLabelKey]; !ok || val != string(rayv1.WorkerNode) {
469469
continue
470470
}
471471
if pod.Status.Phase == corev1.PodRunning {

0 commit comments

Comments
 (0)