From 03b8316fddf2fd868273e2054f9040aac7f5990b Mon Sep 17 00:00:00 2001 From: Arush Sharma Date: Tue, 18 Feb 2025 13:32:16 -0800 Subject: [PATCH] remove getImmutableFieldChanges references --- pkg/resource/health_check/hooks.go | 7 ------- pkg/resource/record_set/hooks.go | 7 ------- 2 files changed, 14 deletions(-) diff --git a/pkg/resource/health_check/hooks.go b/pkg/resource/health_check/hooks.go index 92b35de..414f818 100644 --- a/pkg/resource/health_check/hooks.go +++ b/pkg/resource/health_check/hooks.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" "math" - "strings" "time" svcapitypes "github.com/aws-controllers-k8s/route53-controller/apis/v1alpha1" @@ -35,12 +34,6 @@ func (rm *resourceManager) customUpdateHealthCheck( exit(err) }() - // Do not proceed with update if an immutable field was updated - if immutableFieldChanges := rm.getImmutableFieldChanges(delta); len(immutableFieldChanges) > 0 { - msg := fmt.Sprintf("Immutable Spec fields have been modified: %s", strings.Join(immutableFieldChanges, ",")) - return nil, ackerr.NewTerminalError(fmt.Errorf(msg)) - } - // Merge in the information we read from the API call above to the copy of // the original Kubernetes object we passed to the function ko := desired.ko.DeepCopy() diff --git a/pkg/resource/record_set/hooks.go b/pkg/resource/record_set/hooks.go index 0653258..04c3055 100644 --- a/pkg/resource/record_set/hooks.go +++ b/pkg/resource/record_set/hooks.go @@ -3,7 +3,6 @@ package record_set import ( "context" "errors" - "fmt" "strings" svcapitypes "github.com/aws-controllers-k8s/route53-controller/apis/v1alpha1" @@ -188,12 +187,6 @@ func (rm *resourceManager) customUpdateRecordSet( exit(err) }() - // Do not proceed with update if an immutable field was updated - if immutableFieldChanges := rm.getImmutableFieldChanges(delta); len(immutableFieldChanges) > 0 { - msg := fmt.Sprintf("Immutable Spec fields have been modified: %s", strings.Join(immutableFieldChanges, ",")) - return nil, ackerr.NewTerminalError(fmt.Errorf(msg)) - } - // Merge in the information we read from the API call above to the copy of // the original Kubernetes object we passed to the function ko := desired.ko.DeepCopy()