diff --git a/Dockerfile b/Dockerfile index 7ad06900..fd34029d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.21 as builder +FROM --platform=$BUILDPLATFORM golang:1.21 AS builder # OS and Arch args ARG TARGETOS diff --git a/api/v1/aerospikecluster_validating_webhook.go b/api/v1/aerospikecluster_validating_webhook.go index f1152e9b..7a4512ab 100644 --- a/api/v1/aerospikecluster_validating_webhook.go +++ b/api/v1/aerospikecluster_validating_webhook.go @@ -2398,10 +2398,8 @@ func validateOperationUpdate(oldSpec, newSpec *AerospikeClusterSpec, status *Aer oldOp = &oldSpec.Operations[0] } - if !reflect.DeepEqual(oldOp, newOp) { - if oldOp != nil && oldOp.ID == newOp.ID { - return fmt.Errorf("operation %s cannot be updated", newOp.ID) - } + if oldOp != nil && oldOp.ID == newOp.ID && !reflect.DeepEqual(oldOp, newOp) { + return fmt.Errorf("operation %s cannot be updated", newOp.ID) } allPodNames := GetAllPodNames(status.Pods)