Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions pkg/resource/key/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@ package key

import (
"context"
"fmt"
"strconv"
"strings"

ackcompare "github.com/aws-controllers-k8s/runtime/pkg/compare"
ackerr "github.com/aws-controllers-k8s/runtime/pkg/errors"
ackrtlog "github.com/aws-controllers-k8s/runtime/pkg/runtime/log"
svcsdk "github.com/aws/aws-sdk-go-v2/service/kms"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -66,11 +63,6 @@ func (rm *resourceManager) customUpdate(
defer func() {
exit(err)
}()
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))
}
updatedRes := rm.concreteResource(desired.DeepCopy())
updatedRes.SetStatus(latest)

Expand Down
12 changes: 0 additions & 12 deletions test/e2e/tests/test_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,18 +244,6 @@ def test_update_key_policy(self, kms_client, key_with_policy):

key_policy = kms_client.get_key_policy(KeyId=key_id, PolicyName='default')
assert 'updated-key-policy' in key_policy['Policy']

# updating description should set terminal condition on the resource
# because only tags and policy related fields can be updated on the Key
# resource
updates = {
"spec": {
"description": 'only policy and tags update are supported'
}
}
k8s.patch_custom_resource(ref, updates)
time.sleep(MODIFY_WAIT_AFTER_SECONDS)
assert k8s.wait_on_condition(ref, "ACK.Terminal", "True", wait_periods=10)

def test_create_with_rotation(self, kms_client, key_with_rotation):
(ref, cr) = key_with_rotation
Expand Down