Skip to content

Commit

Permalink
[Cluster.RDS] Add ClusterParameterGroup and ParameterGroup Selectors
Browse files Browse the repository at this point in the history
* Add `dbClusterParameterGroupNameSelector`
* Add `dbInstanceParameterGroupNameSelector`
* Extend uptest example
* Include UP_VERSION updated to be able to build on recent docker
  versions

Signed-off-by: Yury Tsarev <[email protected]>
  • Loading branch information
ytsarev committed Apr 24, 2024
1 parent f834fa7 commit a09e1e0
Show file tree
Hide file tree
Showing 7 changed files with 509 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export SUBPACKAGES := $(SUBPACKAGES)
# Setup Kubernetes tools

KIND_VERSION = v0.21.0
UP_VERSION = v0.20.0
UP_VERSION = v0.28.0
UP_CHANNEL = stable
UPTEST_VERSION = v0.11.1
KUSTOMIZE_VERSION = v5.3.0
Expand Down
36 changes: 36 additions & 0 deletions apis/rds/v1beta1/zz_cluster_types.go

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

40 changes: 40 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.

76 changes: 76 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.

6 changes: 6 additions & 0 deletions config/rds/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ func Configure(p *config.Provider) {
r.References["db_subnet_group_name"] = config.Reference{
Type: "SubnetGroup",
}
r.References["db_cluster_parameter_group_name"] = config.Reference{
TerraformName: "aws_rds_cluster_parameter_group",
}
r.References["db_instance_parameter_group_name"] = config.Reference{
TerraformName: "aws_db_parameter_group",
}
r.UseAsync = true
r.Sensitive.AdditionalConnectionDetailsFn = func(attr map[string]any) (map[string][]byte, error) {
conn := map[string][]byte{}
Expand Down
46 changes: 46 additions & 0 deletions examples/rds/v1beta1/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,52 @@ spec:
namespace: upbound-system
key: password
skipFinalSnapshot: true
dbClusterParameterGroupNameSelector:
matchLabels:
testing.upbound.io/example-name: example-ci-cluster
dbInstanceParameterGroupNameSelector:
matchLabels:
testing.upbound.io/example-name: example-ci-cluster-instance
writeConnectionSecretToRef:
name: sample-rds-cluster-secret
namespace: upbound-system

---

apiVersion: rds.aws.upbound.io/v1beta1
kind: ClusterParameterGroup
metadata:
annotations:
meta.upbound.io/example-id: rds/v1beta1/cluster
labels:
testing.upbound.io/example-name: example-ci-cluster
name: example-ci-cluster
spec:
forProvider:
region: us-west-1
description: RDS custom cluster parameter group
family: aurora-postgresql15
parameter:
- name: application_name
value: "example-rds-cluster"
applyMethod: immediate

---

apiVersion: rds.aws.upbound.io/v1beta1
kind: ParameterGroup
metadata:
annotations:
meta.upbound.io/example-id: rds/v1beta1/cluster
labels:
testing.upbound.io/example-name: example-ci-cluster-instance
name: example-parametergroup-ci-cluster-instance
spec:
forProvider:
region: us-west-1
family: aurora-postgresql15
description: example
parameter:
- name: application_name
value: "example-cluster-instance"
applyMethod: immediate
Loading

0 comments on commit a09e1e0

Please sign in to comment.