Skip to content

Commit 65506a7

Browse files
authored
Merge pull request #107 from jaypipes/db-param-group
support overriding parameter values on param group
2 parents 2107571 + 2c9ece5 commit 65506a7

15 files changed

+672
-162
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: "2022-08-22T20:21:30Z"
3-
build_hash: fe61d04673fd4d9848d5f726b01e0689a16d3733
4-
go_version: go1.18.2
5-
version: v0.19.3-1-gfe61d04
6-
api_directory_checksum: 6a967cc8a62d521d4f4816dbccc48f81d0cb271d
2+
build_date: "2022-09-02T16:27:09Z"
3+
build_hash: cdb0d99c7c1d3d00e71623eb56e650960dcef0d5
4+
go_version: go1.18.3
5+
version: v0.19.3-2-gcdb0d99
6+
api_directory_checksum: 83bde1f77a49ebd8acd36a1c5e231138b67aa883
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.27
99
generator_config_info:
10-
file_checksum: 48d8a87d42545d99ddabf9bea4ab180e08ab79b7
10+
file_checksum: 868688590b240be6d557dd31f0583bad2d309cb8
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/db_parameter_group.go

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

apis/v1alpha1/generator.yaml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,17 +319,32 @@ resources:
319319
template_path: hooks/db_parameter_group/sdk_read_many_post_set_output.go.tpl
320320
delta_pre_compare:
321321
template_path: hooks/db_parameter_group/delta_pre_compare.go.tpl
322+
sdk_create_post_set_output:
323+
template_path: hooks/db_parameter_group/sdk_create_post_set_output.go.tpl
322324
fields:
323325
Name:
324326
is_primary_key: true
325-
Parameters:
326-
from:
327-
operation: ModifyDBParameterGroup
328-
path: Parameters
327+
# These are ONLY user-defined parameter overrides for the DB parameter
328+
# group. This does not contain default or system parameters.
329+
ParameterOverrides:
330+
custom_field:
331+
# The type is a map[string]string where the map keys are the
332+
# parameter name and the values are the parameter value. We
333+
# automatically determine the "apply method" for parameters so all
334+
# the user needs to do is specify the parameter name and value they
335+
# want to override...
336+
map_of: String
329337
Tags:
330338
compare:
331339
# We have a custom comparison function...
332340
is_ignored: true
341+
# These are the "statuses" for the user-defined parameter overrides in
342+
# Spec.ParameterOverrides
343+
ParameterOverrideStatuses:
344+
from:
345+
operation: DescribeDBParameters
346+
path: Parameters
347+
is_read_only: true
333348
DBSubnetGroup:
334349
renames:
335350
operations:

apis/v1alpha1/zz_generated.deepcopy.go

Lines changed: 23 additions & 8 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_dbparametergroups.yaml

Lines changed: 38 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -67,56 +67,10 @@ spec:
6767
character must be a letter \n * Can't end with a hyphen or contain
6868
two consecutive hyphens \n This value is stored as a lowercase string."
6969
type: string
70-
parameters:
71-
description: "An array of parameter names, values, and the application
72-
methods for the parameter update. At least one parameter name, value,
73-
and application method must be supplied; later arguments are optional.
74-
A maximum of 20 parameters can be modified in a single request.
75-
\n Valid Values (for the application method): immediate | pending-reboot
76-
\n You can use the immediate value with dynamic parameters only.
77-
You can use the pending-reboot value for both dynamic and static
78-
parameters. \n When the application method is immediate, changes
79-
to dynamic parameters are applied immediately to the DB instances
80-
associated with the parameter group. \n When the application method
81-
is pending-reboot, changes to dynamic and static parameters are
82-
applied after a reboot without failover to the DB instances associated
83-
with the parameter group. \n You can't use pending-reboot with dynamic
84-
parameters on RDS for SQL Server DB instances. Use immediate. \n
85-
For more information on modifying DB parameters, see Working with
86-
DB parameter groups (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html)
87-
in the Amazon RDS User Guide."
88-
items:
89-
description: "This data type is used as a request parameter in the
90-
ModifyDBParameterGroup and ResetDBParameterGroup actions. \n This
91-
data type is used as a response element in the DescribeEngineDefaultParameters
92-
and DescribeDBParameters actions."
93-
properties:
94-
allowedValues:
95-
type: string
96-
applyMethod:
97-
type: string
98-
applyType:
99-
type: string
100-
dataType:
101-
type: string
102-
description:
103-
type: string
104-
isModifiable:
105-
type: boolean
106-
minimumEngineVersion:
107-
type: string
108-
parameterName:
109-
type: string
110-
parameterValue:
111-
type: string
112-
source:
113-
type: string
114-
supportedEngineModes:
115-
items:
116-
type: string
117-
type: array
118-
type: object
119-
type: array
70+
parameterOverrides:
71+
additionalProperties:
72+
type: string
73+
type: object
12074
tags:
12175
description: Tags to assign to the DB parameter group.
12276
items:
@@ -198,6 +152,40 @@ spec:
198152
- type
199153
type: object
200154
type: array
155+
parameterOverrideStatuses:
156+
description: A list of Parameter values.
157+
items:
158+
description: "This data type is used as a request parameter in the
159+
ModifyDBParameterGroup and ResetDBParameterGroup actions. \n This
160+
data type is used as a response element in the DescribeEngineDefaultParameters
161+
and DescribeDBParameters actions."
162+
properties:
163+
allowedValues:
164+
type: string
165+
applyMethod:
166+
type: string
167+
applyType:
168+
type: string
169+
dataType:
170+
type: string
171+
description:
172+
type: string
173+
isModifiable:
174+
type: boolean
175+
minimumEngineVersion:
176+
type: string
177+
parameterName:
178+
type: string
179+
parameterValue:
180+
type: string
181+
source:
182+
type: string
183+
supportedEngineModes:
184+
items:
185+
type: string
186+
type: array
187+
type: object
188+
type: array
201189
type: object
202190
type: object
203191
served: true

generator.yaml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,17 +319,32 @@ resources:
319319
template_path: hooks/db_parameter_group/sdk_read_many_post_set_output.go.tpl
320320
delta_pre_compare:
321321
template_path: hooks/db_parameter_group/delta_pre_compare.go.tpl
322+
sdk_create_post_set_output:
323+
template_path: hooks/db_parameter_group/sdk_create_post_set_output.go.tpl
322324
fields:
323325
Name:
324326
is_primary_key: true
325-
Parameters:
326-
from:
327-
operation: ModifyDBParameterGroup
328-
path: Parameters
327+
# These are ONLY user-defined parameter overrides for the DB parameter
328+
# group. This does not contain default or system parameters.
329+
ParameterOverrides:
330+
custom_field:
331+
# The type is a map[string]string where the map keys are the
332+
# parameter name and the values are the parameter value. We
333+
# automatically determine the "apply method" for parameters so all
334+
# the user needs to do is specify the parameter name and value they
335+
# want to override...
336+
map_of: String
329337
Tags:
330338
compare:
331339
# We have a custom comparison function...
332340
is_ignored: true
341+
# These are the "statuses" for the user-defined parameter overrides in
342+
# Spec.ParameterOverrides
343+
ParameterOverrideStatuses:
344+
from:
345+
operation: DescribeDBParameters
346+
path: Parameters
347+
is_read_only: true
333348
DBSubnetGroup:
334349
renames:
335350
operations:

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

Lines changed: 38 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -67,56 +67,10 @@ spec:
6767
character must be a letter \n * Can't end with a hyphen or contain
6868
two consecutive hyphens \n This value is stored as a lowercase string."
6969
type: string
70-
parameters:
71-
description: "An array of parameter names, values, and the application
72-
methods for the parameter update. At least one parameter name, value,
73-
and application method must be supplied; later arguments are optional.
74-
A maximum of 20 parameters can be modified in a single request.
75-
\n Valid Values (for the application method): immediate | pending-reboot
76-
\n You can use the immediate value with dynamic parameters only.
77-
You can use the pending-reboot value for both dynamic and static
78-
parameters. \n When the application method is immediate, changes
79-
to dynamic parameters are applied immediately to the DB instances
80-
associated with the parameter group. \n When the application method
81-
is pending-reboot, changes to dynamic and static parameters are
82-
applied after a reboot without failover to the DB instances associated
83-
with the parameter group. \n You can't use pending-reboot with dynamic
84-
parameters on RDS for SQL Server DB instances. Use immediate. \n
85-
For more information on modifying DB parameters, see Working with
86-
DB parameter groups (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html)
87-
in the Amazon RDS User Guide."
88-
items:
89-
description: "This data type is used as a request parameter in the
90-
ModifyDBParameterGroup and ResetDBParameterGroup actions. \n This
91-
data type is used as a response element in the DescribeEngineDefaultParameters
92-
and DescribeDBParameters actions."
93-
properties:
94-
allowedValues:
95-
type: string
96-
applyMethod:
97-
type: string
98-
applyType:
99-
type: string
100-
dataType:
101-
type: string
102-
description:
103-
type: string
104-
isModifiable:
105-
type: boolean
106-
minimumEngineVersion:
107-
type: string
108-
parameterName:
109-
type: string
110-
parameterValue:
111-
type: string
112-
source:
113-
type: string
114-
supportedEngineModes:
115-
items:
116-
type: string
117-
type: array
118-
type: object
119-
type: array
70+
parameterOverrides:
71+
additionalProperties:
72+
type: string
73+
type: object
12074
tags:
12175
description: Tags to assign to the DB parameter group.
12276
items:
@@ -198,6 +152,40 @@ spec:
198152
- type
199153
type: object
200154
type: array
155+
parameterOverrideStatuses:
156+
description: A list of Parameter values.
157+
items:
158+
description: "This data type is used as a request parameter in the
159+
ModifyDBParameterGroup and ResetDBParameterGroup actions. \n This
160+
data type is used as a response element in the DescribeEngineDefaultParameters
161+
and DescribeDBParameters actions."
162+
properties:
163+
allowedValues:
164+
type: string
165+
applyMethod:
166+
type: string
167+
applyType:
168+
type: string
169+
dataType:
170+
type: string
171+
description:
172+
type: string
173+
isModifiable:
174+
type: boolean
175+
minimumEngineVersion:
176+
type: string
177+
parameterName:
178+
type: string
179+
parameterValue:
180+
type: string
181+
source:
182+
type: string
183+
supportedEngineModes:
184+
items:
185+
type: string
186+
type: array
187+
type: object
188+
type: array
201189
type: object
202190
type: object
203191
served: true

0 commit comments

Comments
 (0)