Commit 18a2a64
authored
Remove performSpecUpdate(boolean) from Set<Operation>Output. (#132)
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.1 parent a5d6be1 commit 18a2a64
File tree
11 files changed
+391
-44
lines changed- pkg/generate
- ack
- code
- crossplane
- templates
- crossplane/pkg
- pkg/resource
11 files changed
+391
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
| 60 | + | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
| 66 | + | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
| 81 | + | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
| 87 | + | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
92 | | - | |
93 | | - | |
94 | 91 | | |
95 | 92 | | |
96 | 93 | | |
| |||
220 | 217 | | |
221 | 218 | | |
222 | 219 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | 220 | | |
227 | 221 | | |
228 | 222 | | |
| |||
0 commit comments