Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rds]: Add dbParameterGroupNameSelector to ClusterInstance #1083

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions apis/rds/v1beta1/zz_clusterinstance_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions apis/rds/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions apis/rds/v1beta1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions config/rds/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ func Configure(p *config.Provider) {
RefFieldName: "SecurityGroupNameRefs",
SelectorFieldName: "SecurityGroupNameSelector",
}
r.References["parameter_group_name"] = config.Reference{
Type: "ParameterGroup",
r.References["db_parameter_group_name"] = config.Reference{
TerraformName: "aws_db_parameter_group",
}
r.References["db_subnet_group_name"] = config.Reference{
Type: "SubnetGroup",
Expand Down
23 changes: 23 additions & 0 deletions examples/rds/clusterinstance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ spec:
testing.upbound.io/example-name: example-ci
engine: aurora-postgresql
instanceClass: db.r5.large
dbParameterGroupNameSelector:
matchLabels:
testing.upbound.io/example-name: example-ci

---

Expand Down Expand Up @@ -49,3 +52,23 @@ metadata:
type: Opaque
stringData:
password: TestPass0!

---

apiVersion: rds.aws.upbound.io/v1beta1
kind: ParameterGroup
metadata:
annotations:
meta.upbound.io/example-id: rds/v1beta1/clusterinstance
labels:
testing.upbound.io/example-name: example-ci
name: example-parametergroup-ci
spec:
forProvider:
region: us-west-1
family: aurora-postgresql15
description: example
parameter:
- name: application_name
value: "example"
applyMethod: immediate
150 changes: 150 additions & 0 deletions package/crds/rds.aws.upbound.io_clusterinstances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,81 @@ spec:
description: Name of the DB parameter group to associate with
this instance.
type: string
dbParameterGroupNameRef:
description: Reference to a ParameterGroup in rds to populate
dbParameterGroupName.
properties:
name:
description: Name of the referenced object.
type: string
policy:
description: Policies for referencing.
properties:
resolution:
default: Required
description: Resolution specifies whether resolution of
this reference is required. The default is 'Required',
which means the reconcile will fail if the reference
cannot be resolved. 'Optional' means this reference
will be a no-op if it cannot be resolved.
enum:
- Required
- Optional
type: string
resolve:
description: Resolve specifies when this reference should
be resolved. The default is 'IfNotPresent', which will
attempt to resolve the reference only when the corresponding
field is not present. Use 'Always' to resolve the reference
on every reconcile.
enum:
- Always
- IfNotPresent
type: string
type: object
required:
- name
type: object
dbParameterGroupNameSelector:
description: Selector for a ParameterGroup in rds to populate
dbParameterGroupName.
properties:
matchControllerRef:
description: MatchControllerRef ensures an object with the
same controller reference as the selecting object is selected.
type: boolean
matchLabels:
additionalProperties:
type: string
description: MatchLabels ensures an object with matching labels
is selected.
type: object
policy:
description: Policies for selection.
properties:
resolution:
default: Required
description: Resolution specifies whether resolution of
this reference is required. The default is 'Required',
which means the reconcile will fail if the reference
cannot be resolved. 'Optional' means this reference
will be a no-op if it cannot be resolved.
enum:
- Required
- Optional
type: string
resolve:
description: Resolve specifies when this reference should
be resolved. The default is 'IfNotPresent', which will
attempt to resolve the reference only when the corresponding
field is not present. Use 'Always' to resolve the reference
on every reconcile.
enum:
- Always
- IfNotPresent
type: string
type: object
type: object
dbSubnetGroupName:
description: 'DB subnet group to associate with this DB instance.
NOTE: This must match the db_subnet_group_name of the attached
Expand Down Expand Up @@ -588,6 +663,81 @@ spec:
description: Name of the DB parameter group to associate with
this instance.
type: string
dbParameterGroupNameRef:
description: Reference to a ParameterGroup in rds to populate
dbParameterGroupName.
properties:
name:
description: Name of the referenced object.
type: string
policy:
description: Policies for referencing.
properties:
resolution:
default: Required
description: Resolution specifies whether resolution of
this reference is required. The default is 'Required',
which means the reconcile will fail if the reference
cannot be resolved. 'Optional' means this reference
will be a no-op if it cannot be resolved.
enum:
- Required
- Optional
type: string
resolve:
description: Resolve specifies when this reference should
be resolved. The default is 'IfNotPresent', which will
attempt to resolve the reference only when the corresponding
field is not present. Use 'Always' to resolve the reference
on every reconcile.
enum:
- Always
- IfNotPresent
type: string
type: object
required:
- name
type: object
dbParameterGroupNameSelector:
description: Selector for a ParameterGroup in rds to populate
dbParameterGroupName.
properties:
matchControllerRef:
description: MatchControllerRef ensures an object with the
same controller reference as the selecting object is selected.
type: boolean
matchLabels:
additionalProperties:
type: string
description: MatchLabels ensures an object with matching labels
is selected.
type: object
policy:
description: Policies for selection.
properties:
resolution:
default: Required
description: Resolution specifies whether resolution of
this reference is required. The default is 'Required',
which means the reconcile will fail if the reference
cannot be resolved. 'Optional' means this reference
will be a no-op if it cannot be resolved.
enum:
- Required
- Optional
type: string
resolve:
description: Resolve specifies when this reference should
be resolved. The default is 'IfNotPresent', which will
attempt to resolve the reference only when the corresponding
field is not present. Use 'Always' to resolve the reference
on every reconcile.
enum:
- Always
- IfNotPresent
type: string
type: object
type: object
dbSubnetGroupName:
description: 'DB subnet group to associate with this DB instance.
NOTE: This must match the db_subnet_group_name of the attached
Expand Down
Loading