Skip to content

Commit 2b8717b

Browse files
authored
Add support for addon updates (#48)
Signed-off-by: smcavallo <[email protected]> Issue #, if available: Description of changes: Issue affects `public.ecr.aws/aws-controllers-k8s/eks-controller:v0.1.4` Currently unable to update Addon with the below exception. ``` - lastTransitionTime: "2022-08-12T14:48:28Z" message: Unable to determine if desired resource state matches latest observed state reason: | InvalidParameter: 1 validation error(s) found. - missing required field, UpdateAddonInput.AddonName. ``` the Name is a requirement due to the shape -> https://github.com/aws/aws-sdk-go/blob/ec3763d8d5abacbf47c0b4296fb5d27821297508/models/apis/eks/2017-11-01/api-2.json#L2128-L2133 This same configuration exists for `CreateAddon | DescribeAddon | DeleteAddon` With the change in place the Addon upgrades as expected. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent f38b5d3 commit 2b8717b

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

apis/v1alpha1/generator.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ resources:
2121
DeleteAddon:
2222
input_fields:
2323
AddonName: Name
24+
UpdateAddon:
25+
input_fields:
26+
AddonName: Name
2427
exceptions:
2528
errors:
2629
404:

generator.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ resources:
2121
DeleteAddon:
2222
input_fields:
2323
AddonName: Name
24+
UpdateAddon:
25+
input_fields:
26+
AddonName: Name
2427
exceptions:
2528
errors:
2629
404:

pkg/resource/addon/sdk.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/resource/nodegroup/sdk.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/hooks/nodegroup/sdk_create_post_set_output.go.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// We expect the nodegorup to be in 'CREATING' status since we just issued
1+
// We expect the nodegroup to be in 'CREATING' status since we just issued
22
// the call to create it, but I suppose it doesn't hurt to check here.
33
if nodegroupCreating(&resource{ko}) {
44
// Setting resource synced condition to false will trigger a requeue of

0 commit comments

Comments
 (0)