Skip to content

Commit 331ca48

Browse files
author
jmccormick2001
committed
fix scale command to allow --service-type to take precedent over the cluster service-type or the pgo.yaml service type
1 parent b4980ff commit 331ca48

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

operator/cluster/cluster.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,9 @@ func ScaleBase(clientset *kubernetes.Clientset, client *rest.RESTClient, replica
406406

407407
st := operator.Pgo.Cluster.ServiceType
408408

409-
if cluster.Spec.UserLabels[util.LABEL_SERVICE_TYPE] != "" {
409+
if replica.Spec.UserLabels[util.LABEL_SERVICE_TYPE] != "" {
410+
st = replica.Spec.UserLabels[util.LABEL_SERVICE_TYPE]
411+
} else if cluster.Spec.UserLabels[util.LABEL_SERVICE_TYPE] != "" {
410412
st = cluster.Spec.UserLabels[util.LABEL_SERVICE_TYPE]
411413
}
412414

0 commit comments

Comments
 (0)