Skip to content

Commit 06cb511

Browse files
authored
fix: parameter passing error (#6715)
1 parent f35998d commit 06cb511

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/controller/jobs/deployment/deployment_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func (wh *Webhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Ob
131131
// or if the queue-name has been deleted.
132132
isSuspended := oldDeployment.Status.ReadyReplicas == 0
133133
if !isSuspended || newQueueName == "" {
134-
allErrs = append(allErrs, apivalidation.ValidateImmutableField(oldQueueName, newQueueName, queueNameLabelPath)...)
134+
allErrs = append(allErrs, apivalidation.ValidateImmutableField(newQueueName, oldQueueName, queueNameLabelPath)...)
135135
}
136136
if !isSuspended || jobframework.IsWorkloadPriorityClassNameEmpty(newDeployment.Object()) {
137137
allErrs = append(allErrs, jobframework.ValidateUpdateForWorkloadPriorityClassName(oldDeployment.Object(), newDeployment.Object())...)

pkg/controller/jobs/statefulset/statefulset_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func (wh *Webhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Ob
142142
// or if the queue-name has been deleted.
143143
isSuspended := oldStatefulSet.Status.ReadyReplicas == 0
144144
if !isSuspended || newQueueName == "" {
145-
allErrs = append(allErrs, apivalidation.ValidateImmutableField(oldQueueName, newQueueName, queueNameLabelPath)...)
145+
allErrs = append(allErrs, apivalidation.ValidateImmutableField(newQueueName, oldQueueName, queueNameLabelPath)...)
146146
}
147147
if !isSuspended || jobframework.IsWorkloadPriorityClassNameEmpty(newStatefulSet.Object()) {
148148
allErrs = append(allErrs, jobframework.ValidateUpdateForWorkloadPriorityClassName(

0 commit comments

Comments
 (0)