Skip to content

Commit f97b026

Browse files
authored
Add SubnetIds ref to ec2 subnet group ids (#120)
Issue #, if available: aws-controllers-k8s/community#1457 Description of changes: Add dbSubnetIds ref to ec2 subnet ids By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent cb16718 commit f97b026

12 files changed

+188
-13
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-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
2+
build_date: "2022-09-06T21:49:16Z"
3+
build_hash: 87477ae8ca8ac6ddb8c565bbd910cc7e30f55ed0
4+
go_version: go1.18.2
5+
version: v0.19.3
6+
api_directory_checksum: 49e40e1f4eba86556bce0a1e14d5888fd21fea2f
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.27
99
generator_config_info:
10-
file_checksum: 868688590b240be6d557dd31f0583bad2d309cb8
10+
file_checksum: 0fb61f01b3715995f51dfc33124c45670c87a257
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

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

apis/v1alpha1/generator.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,11 @@ resources:
377377
delta_pre_compare:
378378
template_path: hooks/db_subnet_group/delta_pre_compare.go.tpl
379379
fields:
380+
SubnetIDs:
381+
references:
382+
service_name: ec2
383+
resource: Subnet
384+
path: Status.SubnetID
380385
Name:
381386
is_primary_key: true
382387
Tags:

apis/v1alpha1/zz_generated.deepcopy.go

Lines changed: 11 additions & 0 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_dbsubnetgroups.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,22 @@ spec:
5353
items:
5454
type: string
5555
type: array
56+
subnetRefs:
57+
items:
58+
description: 'AWSResourceReferenceWrapper provides a wrapper around
59+
*AWSResourceReference type to provide more user friendly syntax
60+
for references using ''from'' field Ex: APIIDRef: from: name:
61+
my-api'
62+
properties:
63+
from:
64+
description: AWSResourceReference provides all the values necessary
65+
to reference another k8s resource for finding the identifier(Id/ARN/Name)
66+
properties:
67+
name:
68+
type: string
69+
type: object
70+
type: object
71+
type: array
5672
tags:
5773
description: Tags to assign to the DB subnet group.
5874
items:
@@ -68,7 +84,6 @@ spec:
6884
required:
6985
- description
7086
- name
71-
- subnetIDs
7287
type: object
7388
status:
7489
description: DBSubnetGroupStatus defines the observed state of DBSubnetGroup

config/rbac/cluster-role-controller.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@ rules:
4646
verbs:
4747
- get
4848
- list
49+
- apiGroups:
50+
- ec2.services.k8s.aws
51+
resources:
52+
- subnets
53+
verbs:
54+
- get
55+
- list
56+
- apiGroups:
57+
- ec2.services.k8s.aws
58+
resources:
59+
- subnets/status
60+
verbs:
61+
- get
62+
- list
4963
- apiGroups:
5064
- kms.services.k8s.aws
5165
resources:

generator.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,11 @@ resources:
377377
delta_pre_compare:
378378
template_path: hooks/db_subnet_group/delta_pre_compare.go.tpl
379379
fields:
380+
SubnetIDs:
381+
references:
382+
service_name: ec2
383+
resource: Subnet
384+
path: Status.SubnetID
380385
Name:
381386
is_primary_key: true
382387
Tags:

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,22 @@ spec:
5353
items:
5454
type: string
5555
type: array
56+
subnetRefs:
57+
items:
58+
description: 'AWSResourceReferenceWrapper provides a wrapper around
59+
*AWSResourceReference type to provide more user friendly syntax
60+
for references using ''from'' field Ex: APIIDRef: from: name:
61+
my-api'
62+
properties:
63+
from:
64+
description: AWSResourceReference provides all the values necessary
65+
to reference another k8s resource for finding the identifier(Id/ARN/Name)
66+
properties:
67+
name:
68+
type: string
69+
type: object
70+
type: object
71+
type: array
5672
tags:
5773
description: Tags to assign to the DB subnet group.
5874
items:
@@ -68,7 +84,6 @@ spec:
6884
required:
6985
- description
7086
- name
71-
- subnetIDs
7287
type: object
7388
status:
7489
description: DBSubnetGroupStatus defines the observed state of DBSubnetGroup

helm/templates/cluster-role-controller.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,20 @@ rules:
5252
verbs:
5353
- get
5454
- list
55+
- apiGroups:
56+
- ec2.services.k8s.aws
57+
resources:
58+
- subnets
59+
verbs:
60+
- get
61+
- list
62+
- apiGroups:
63+
- ec2.services.k8s.aws
64+
resources:
65+
- subnets/status
66+
verbs:
67+
- get
68+
- list
5569
- apiGroups:
5670
- kms.services.k8s.aws
5771
resources:

helm/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ spec:
106106
affinity: {{ toYaml .Values.deployment.affinity | nindent 8 }}
107107
{{ end -}}
108108
{{ if .Values.deployment.priorityClassName -}}
109-
priorityClassName: {{ .Values.deployment.priorityClassName }}
109+
priorityClassName: {{ .Values.deployment.priorityClassName -}}
110110
{{ end -}}
111111
hostIPC: false
112112
hostNetwork: false

0 commit comments

Comments
 (0)