Skip to content

Conversation

vijtrip2
Copy link
Contributor

Issue #, if available: aws-controllers-k8s/community#812

Description of changes:

  • Do not restrict Create and Update operation output to only updating the Status of latest k8s resource. This change will allow both Spec and Status of latest object to be updated.
  • Removing of conditional "performSpecUpdate" will allow both Spec and Status fields to be updated.
  • This will allow server-side-defaults to be populated into the k8s latest object. Server-side-defaults are the default values added by AWS service upon resource creation/update when these optional values were not specified by the user.

make test

➜  code-generator git:(allow-spec-updates) make test
go test -tags codegen ./...
?       github.com/aws-controllers-k8s/code-generator/cmd/ack-generate  [no test files]
?       github.com/aws-controllers-k8s/code-generator/cmd/ack-generate/command  [no test files]
ok      github.com/aws-controllers-k8s/code-generator/pkg/generate/ack  (cached)
ok      github.com/aws-controllers-k8s/code-generator/pkg/generate/code (cached)
?       github.com/aws-controllers-k8s/code-generator/pkg/generate/config       [no test files]
?       github.com/aws-controllers-k8s/code-generator/pkg/generate/crossplane   [no test files]
?       github.com/aws-controllers-k8s/code-generator/pkg/generate/olm  [no test files]
?       github.com/aws-controllers-k8s/code-generator/pkg/generate/templateset  [no test files]
?       github.com/aws-controllers-k8s/code-generator/pkg/metadata      [no test files]
ok      github.com/aws-controllers-k8s/code-generator/pkg/model (cached)
ok      github.com/aws-controllers-k8s/code-generator/pkg/model/multiversion    (cached)
ok      github.com/aws-controllers-k8s/code-generator/pkg/names (cached)
?       github.com/aws-controllers-k8s/code-generator/pkg/testutil      [no test files]
?       github.com/aws-controllers-k8s/code-generator/pkg/util  [no test files]
?       github.com/aws-controllers-k8s/code-generator/pkg/version       [no test files]

make build-controller

➜  code-generator git:(allow-spec-updates) make build-controller            
building ack-generate ... ok.
Copying common custom resource definitions into ecr
Building Kubernetes API objects for ecr
Generating deepcopy code for ecr
Generating custom resource definitions for ecr
Building service controller for ecr
Generating RBAC manifests for ecr
Running gofmt against generated code for ecr

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Collaborator

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, ++

@jaypipes
Copy link
Collaborator

/lgtm

@ack-bot ack-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 22, 2021
@ack-bot
Copy link
Collaborator

ack-bot commented Jul 22, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jaypipes, vijtrip2

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-bot ack-bot merged commit 18a2a64 into aws-controllers-k8s:main Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants