Skip to content

Commit d9c5184

Browse files
authored
Bring in ACK runtime v0.15.2 (#49)
Regenerates the rds-controller with the latest v0.15.2 runtime. **BREAKING CHANGES**: The DBInstance's Spec.DBSecurityGroupNames field is now renamed to just Spec.DBSecurityGroups. It continues to be a `[]*string` field but now the rds-controller correctly handles comparisons for this fields value with the returned latest observed state. Includes changes to the generator.yaml file that instructs the code-generator how to handle the DBSecurityGroups field on DBInstance. Signed-off-by: Jay Pipes <[email protected]> By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent a8ae4c0 commit d9c5184

File tree

18 files changed

+108
-44
lines changed

18 files changed

+108
-44
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2021-10-21T19:35:08Z"
3-
build_hash: 21ee1672e2c1556fd5784a22bc48aa619975cc6f
4-
go_version: go1.17.1
5-
version: v0.15.1
6-
api_directory_checksum: cd0469d4474d82dbcf9badb97a43cac68ba07044
2+
build_date: "2021-11-18T15:25:36Z"
3+
build_hash: 966e9a9ac6dfb4bbc2d3ded1972ce2b706391d44
4+
go_version: go1.17
5+
version: v0.15.2
6+
api_directory_checksum: cae902b75e1b0827659c4bfe7ef9f6bb98769f5c
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.37.10
99
generator_config_info:
10-
file_checksum: e99b7e3e4ce6b046e2aabcc164c99bc920272c4d
10+
file_checksum: a40f829b03389cf1b2a003ebe2a79b97bc9d3322
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/db_instance.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.

apis/v1alpha1/generator.yaml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,6 @@ resources:
126126
template_path: hooks/db_instance/sdk_update_pre_build_request.go.tpl
127127
sdk_delete_pre_build_request:
128128
template_path: hooks/db_instance/sdk_delete_pre_build_request.go.tpl
129-
renames:
130-
operations:
131-
CreateDBInstance:
132-
input_fields:
133-
# The data type of the create input and create output shape of the
134-
# DBSecurityGroups field is different which causes errors when
135-
# compiling
136-
DBSecurityGroups: DBSecurityGroupNames
137129
exceptions:
138130
terminal_codes:
139131
- InvalidParameter
@@ -144,8 +136,23 @@ resources:
144136
- DBSubnetGroupNotFoundFault
145137
- DBParameterGroupNotFound
146138
fields:
139+
AvailabilityZone:
140+
late_initialize: {}
147141
DBInstanceIdentifier:
148142
is_primary_key: true
143+
# Because the Create input and Create/Update/ReadOne output shapes for
144+
# the DBSecurityGroups field have different Go types, we are instructing
145+
# the code generator to set the Spec.DBSecurityGroups field (which is a
146+
# []string field) to the set of DBSecurityGroups..DBSecurityGroupName
147+
# values in the ReadOne method's Output shape.
148+
DBSecurityGroups:
149+
set:
150+
- method: Update
151+
from: DBSecurityGroupName
152+
- method: Create
153+
from: DBSecurityGroupName
154+
- method: ReadOne
155+
from: DBSecurityGroupName
149156
MasterUserPassword:
150157
is_secret: true
151158
GlobalCluster:

apis/v1alpha1/zz_generated.deepcopy.go

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

config/crd/bases/rds.services.k8s.aws_dbinstances.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ spec:
183183
\n * First character must be a letter \n * Can't end with
184184
a hyphen or contain two consecutive hyphens"
185185
type: string
186-
dbSecurityGroupNames:
186+
dbSecurityGroups:
187187
description: "A list of DB security groups to associate with this
188188
DB instance. \n Default: The default DB security group for the database
189189
engine."

generator.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,6 @@ resources:
126126
template_path: hooks/db_instance/sdk_update_pre_build_request.go.tpl
127127
sdk_delete_pre_build_request:
128128
template_path: hooks/db_instance/sdk_delete_pre_build_request.go.tpl
129-
renames:
130-
operations:
131-
CreateDBInstance:
132-
input_fields:
133-
# The data type of the create input and create output shape of the
134-
# DBSecurityGroups field is different which causes errors when
135-
# compiling
136-
DBSecurityGroups: DBSecurityGroupNames
137129
exceptions:
138130
terminal_codes:
139131
- InvalidParameter
@@ -148,6 +140,19 @@ resources:
148140
late_initialize: {}
149141
DBInstanceIdentifier:
150142
is_primary_key: true
143+
# Because the Create input and Create/Update/ReadOne output shapes for
144+
# the DBSecurityGroups field have different Go types, we are instructing
145+
# the code generator to set the Spec.DBSecurityGroups field (which is a
146+
# []string field) to the set of DBSecurityGroups..DBSecurityGroupName
147+
# values in the ReadOne method's Output shape.
148+
DBSecurityGroups:
149+
set:
150+
- method: Update
151+
from: DBSecurityGroupName
152+
- method: Create
153+
from: DBSecurityGroupName
154+
- method: ReadOne
155+
from: DBSecurityGroupName
151156
MasterUserPassword:
152157
is_secret: true
153158
GlobalCluster:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/aws-controllers-k8s/rds-controller
33
go 1.14
44

55
require (
6-
github.com/aws-controllers-k8s/runtime v0.15.1
6+
github.com/aws-controllers-k8s/runtime v0.15.2
77
github.com/aws/aws-sdk-go v1.37.10
88
github.com/go-logr/logr v0.1.0
99
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo
2323
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
2424
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
2525
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
26-
github.com/aws-controllers-k8s/runtime v0.15.1 h1:3P+6MKWe8ITJynmoxmDnMPlkoI9nuVgn8XD9Pt/XHE8=
27-
github.com/aws-controllers-k8s/runtime v0.15.1/go.mod h1:W0Txdhb1Npx5kg72w2WFwIpGFvSsMxXlJzzNHAwCLeY=
26+
github.com/aws-controllers-k8s/runtime v0.15.2 h1:waRPQGw+b/9huNHcMG+LQoVW4VP2YIBqZNdB+JAh//E=
27+
github.com/aws-controllers-k8s/runtime v0.15.2/go.mod h1:W0Txdhb1Npx5kg72w2WFwIpGFvSsMxXlJzzNHAwCLeY=
2828
github.com/aws/aws-sdk-go v1.37.10 h1:LRwl+97B4D69Z7tz+eRUxJ1C7baBaIYhgrn5eLtua+Q=
2929
github.com/aws/aws-sdk-go v1.37.10/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
3030
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=

helm/crds/rds.services.k8s.aws_dbinstances.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ spec:
183183
\n * First character must be a letter \n * Can't end with
184184
a hyphen or contain two consecutive hyphens"
185185
type: string
186-
dbSecurityGroupNames:
186+
dbSecurityGroups:
187187
description: "A list of DB security groups to associate with this
188188
DB instance. \n Default: The default DB security group for the database
189189
engine."

pkg/resource/db_cluster/sdk.go

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

0 commit comments

Comments
 (0)