Skip to content

Commit 0a88681

Browse files
authored
remove getImmutableFieldChanges references (#61)
fix aws-controllers-k8s/code-generator#565 Description of changes: Remove getImmutableFieldChanges from hooks to support cel immutability By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent b5ee3a7 commit 0a88681

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

pkg/resource/health_check/hooks.go

-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"errors"
66
"fmt"
77
"math"
8-
"strings"
98
"time"
109

1110
svcapitypes "github.com/aws-controllers-k8s/route53-controller/apis/v1alpha1"
@@ -35,12 +34,6 @@ func (rm *resourceManager) customUpdateHealthCheck(
3534
exit(err)
3635
}()
3736

38-
// Do not proceed with update if an immutable field was updated
39-
if immutableFieldChanges := rm.getImmutableFieldChanges(delta); len(immutableFieldChanges) > 0 {
40-
msg := fmt.Sprintf("Immutable Spec fields have been modified: %s", strings.Join(immutableFieldChanges, ","))
41-
return nil, ackerr.NewTerminalError(fmt.Errorf(msg))
42-
}
43-
4437
// Merge in the information we read from the API call above to the copy of
4538
// the original Kubernetes object we passed to the function
4639
ko := desired.ko.DeepCopy()

pkg/resource/record_set/hooks.go

-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package record_set
33
import (
44
"context"
55
"errors"
6-
"fmt"
76
"strings"
87

98
svcapitypes "github.com/aws-controllers-k8s/route53-controller/apis/v1alpha1"
@@ -188,12 +187,6 @@ func (rm *resourceManager) customUpdateRecordSet(
188187
exit(err)
189188
}()
190189

191-
// Do not proceed with update if an immutable field was updated
192-
if immutableFieldChanges := rm.getImmutableFieldChanges(delta); len(immutableFieldChanges) > 0 {
193-
msg := fmt.Sprintf("Immutable Spec fields have been modified: %s", strings.Join(immutableFieldChanges, ","))
194-
return nil, ackerr.NewTerminalError(fmt.Errorf(msg))
195-
}
196-
197190
// Merge in the information we read from the API call above to the copy of
198191
// the original Kubernetes object we passed to the function
199192
ko := desired.ko.DeepCopy()

0 commit comments

Comments
 (0)