Skip to content

Commit 8fbbbc7

Browse files
authored
Update to ACK runtime v0.27.1, code-generator v0.27.0 (#28)
### Update to ACK runtime `v0.27.1`, code-generator `v0.27.0` ---------- * ACK code-generator `v0.27.0` [release notes](https://github.com/aws-controllers-k8s/code-generator/releases/tag/v0.27.0) * ACK runtime `v0.27.1` [release notes](https://github.com/aws-controllers-k8s/runtime/releases/tag/v0.27.1) ---------- NOTE: This PR increments the release version of service controller from `v0.0.6` to `v0.0.7` Once this PR is merged, release `v0.0.7` will be automatically created for `route53-controller` **Please close this PR, if you do not want the new patch release for `route53-controller`** ---------- #### stdout for `make build-controller`: ``` building ack-generate ... ok. ==== building route53-controller ==== Copying common custom resource definitions into route53 Building Kubernetes API objects for route53 Generating deepcopy code for route53 Generating custom resource definitions for route53 Building service controller for route53 Generating RBAC manifests for route53 Running gofmt against generated code for route53 Updating additional GitHub repository maintenance files ==== building route53-controller release artifacts ==== Building release artifacts for route53-v0.0.7 Generating common custom resource definitions Generating custom resource definitions for route53 Generating RBAC manifests for route53 ``` ---------- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent ab6ed92 commit 8fbbbc7

17 files changed

+176
-48
lines changed

apis/v1alpha1/ack-generate-metadata.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ack_generate_info:
2-
build_date: "2023-07-17T18:30:35Z"
3-
build_hash: e9b68590da73ce9143ba1e4361cebdc1d876c81e
4-
go_version: go1.20.3
5-
version: v0.26.1-7-ge9b6859
2+
build_date: "2023-09-07T01:46:32Z"
3+
build_hash: 2f2b5e916c59ae2a793a1cc9f9d7333b197c9549
4+
go_version: go1.21.0
5+
version: v0.27.0
66
api_directory_checksum: 2f681761d3417cd3c65709b6dc71d9853bdf0481
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.93

cmd/controller/main.go

+8-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/controller/deployment.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@ spec:
2929
- "$(AWS_REGION)"
3030
- --aws-endpoint-url
3131
- "$(AWS_ENDPOINT_URL)"
32-
- --enable-development-logging
33-
- "$(ACK_ENABLE_DEVELOPMENT_LOGGING)"
32+
- --enable-development-logging=$(ACK_ENABLE_DEVELOPMENT_LOGGING)
3433
- --log-level
3534
- "$(ACK_LOG_LEVEL)"
3635
- --resource-tags
3736
- "$(ACK_RESOURCE_TAGS)"
3837
- --watch-namespace
3938
- "$(ACK_WATCH_NAMESPACE)"
39+
- --enable-leader-election=$(ENABLE_LEADER_ELECTION)
40+
- --leader-election-namespace
41+
- "$(LEADER_ELECTION_NAMESPACE)"
4042
image: controller:latest
4143
name: controller
4244
ports:
@@ -66,6 +68,10 @@ spec:
6668
value: "info"
6769
- name: ACK_RESOURCE_TAGS
6870
value: "services.k8s.aws/controller-version=%CONTROLLER_SERVICE%-%CONTROLLER_VERSION%,services.k8s.aws/namespace=%K8S_NAMESPACE%"
71+
- name: ENABLE_LEADER_ELECTION
72+
value: "false"
73+
- name: LEADER_ELECTION_NAMESPACE
74+
value: "ack-system"
6975
securityContext:
7076
allowPrivilegeEscalation: false
7177
privileged: false

config/controller/kustomization.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ kind: Kustomization
66
images:
77
- name: controller
88
newName: public.ecr.aws/aws-controllers-k8s/route53-controller
9-
newTag: 0.0.6
9+
newTag: 0.0.7

config/rbac/kustomization.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ resources:
44
- role-reader.yaml
55
- role-writer.yaml
66
- service-account.yaml
7-
7+
- leader-election-role.yaml
8+
- leader-election-role-binding.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: RoleBinding
4+
metadata:
5+
namespace: ack-system
6+
name: route53-leader-election-rolebinding
7+
roleRef:
8+
apiGroup: rbac.authorization.k8s.io
9+
kind: Role
10+
name: route53-leader-election-role
11+
subjects:
12+
- kind: ServiceAccount
13+
name: ack-route53-controller
14+
namespace: ack-system

config/rbac/leader-election-role.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: Role
4+
metadata:
5+
name: route53-leader-election-role
6+
namespace: ack-system
7+
rules:
8+
- apiGroups:
9+
- coordination.k8s.io
10+
resources:
11+
- leases
12+
verbs:
13+
- get
14+
- list
15+
- watch
16+
- create
17+
- update
18+
- patch
19+
- delete
20+
- apiGroups:
21+
- ""
22+
resources:
23+
- events
24+
verbs:
25+
- create
26+
- patch

go.mod

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ module github.com/aws-controllers-k8s/route53-controller
33
go 1.19
44

55
require (
6-
github.com/aws-controllers-k8s/runtime v0.26.0
6+
github.com/aws-controllers-k8s/runtime v0.27.1
77
github.com/aws/aws-sdk-go v1.44.93
88
github.com/go-logr/logr v1.2.3
99
github.com/spf13/pflag v1.0.5
10-
k8s.io/api v0.26.1
11-
k8s.io/apimachinery v0.26.1
12-
k8s.io/client-go v0.26.1
10+
k8s.io/api v0.26.8
11+
k8s.io/apimachinery v0.26.8
12+
k8s.io/client-go v0.26.8
1313
sigs.k8s.io/controller-runtime v0.14.5
1414
)
1515

@@ -31,7 +31,7 @@ require (
3131
github.com/google/gnostic v0.5.7-v3refs // indirect
3232
github.com/google/go-cmp v0.5.9 // indirect
3333
github.com/google/gofuzz v1.1.0 // indirect
34-
github.com/google/uuid v1.1.2 // indirect
34+
github.com/google/uuid v1.3.0 // indirect
3535
github.com/imdario/mergo v0.3.12 // indirect
3636
github.com/itchyny/gojq v0.12.6 // indirect
3737
github.com/itchyny/timefmt-go v0.1.3 // indirect
@@ -54,11 +54,11 @@ require (
5454
go.uber.org/multierr v1.6.0 // indirect
5555
go.uber.org/zap v1.24.0 // indirect
5656
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
57-
golang.org/x/net v0.7.0 // indirect
57+
golang.org/x/net v0.8.0 // indirect
5858
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
59-
golang.org/x/sys v0.5.0 // indirect
60-
golang.org/x/term v0.5.0 // indirect
61-
golang.org/x/text v0.7.0 // indirect
59+
golang.org/x/sys v0.6.0 // indirect
60+
golang.org/x/term v0.6.0 // indirect
61+
golang.org/x/text v0.8.0 // indirect
6262
golang.org/x/time v0.3.0 // indirect
6363
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
6464
google.golang.org/appengine v1.6.7 // indirect

go.sum

+18-18
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
3838
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
3939
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
4040
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
41-
github.com/aws-controllers-k8s/runtime v0.26.0 h1:XKqygFzHSBtM74Ov9IroZbyCVeYei9Eskp4aKbJ2SFw=
42-
github.com/aws-controllers-k8s/runtime v0.26.0/go.mod h1:jizDzKikL09cueIuA9ZxoZ+4pfn5U7oKW5s/ZAqOA6E=
41+
github.com/aws-controllers-k8s/runtime v0.27.1 h1:tvJRQDioBFkob0kF4DwgS7MsoXZKwkG5QCHWxFEh+2o=
42+
github.com/aws-controllers-k8s/runtime v0.27.1/go.mod h1:oSCqCzbzJLUrzv+cx4TIxCuSUvL75ABJmhxBc87IRqc=
4343
github.com/aws/aws-sdk-go v1.44.93 h1:hAgd9fuaptBatSft27/5eBMdcA8+cIMqo96/tZ6rKl8=
4444
github.com/aws/aws-sdk-go v1.44.93/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
4545
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
@@ -163,8 +163,8 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf
163163
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
164164
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
165165
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
166-
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
167-
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
166+
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
167+
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
168168
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
169169
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
170170
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
@@ -369,8 +369,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY
369369
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
370370
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
371371
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
372-
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
373-
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
372+
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
373+
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
374374
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
375375
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
376376
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -431,21 +431,21 @@ golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBc
431431
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
432432
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
433433
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
434-
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
435-
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
434+
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
435+
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
436436
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
437437
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
438-
golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY=
439-
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
438+
golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw=
439+
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
440440
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
441441
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
442442
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
443443
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
444444
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
445445
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
446446
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
447-
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
448-
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
447+
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
448+
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
449449
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
450450
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
451451
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -609,14 +609,14 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
609609
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
610610
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
611611
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
612-
k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ=
613-
k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg=
612+
k8s.io/api v0.26.8 h1:k2OtFmQPWfDUyAuYAwQPftVygF/vz4BMGSKnd15iddM=
613+
k8s.io/api v0.26.8/go.mod h1:QaflR7cmG3V9lIz0VLBM+ylndNN897OAUAoJDcgwiQw=
614614
k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI=
615615
k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM=
616-
k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ=
617-
k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74=
618-
k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU=
619-
k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE=
616+
k8s.io/apimachinery v0.26.8 h1:SzpGtRX3/j/Ylg8Eg65Iobpxi9Jz4vOvI0qcBZyPVrM=
617+
k8s.io/apimachinery v0.26.8/go.mod h1:qYzLkrQ9lhrZRh0jNKo2cfvf/R1/kQONnSiyB7NUJU0=
618+
k8s.io/client-go v0.26.8 h1:pPuTYaVtLlg/7n6rqs3MsKLi4XgNaJ3rTMyS37Y5CKU=
619+
k8s.io/client-go v0.26.8/go.mod h1:1sBQqKmdy9rWZYQnoedpc0gnRXG7kU3HrKZvBe2QbGM=
620620
k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4=
621621
k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU=
622622
k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4=

helm/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v1
22
name: route53-chart
33
description: A Helm chart for the ACK service controller for Amazon Route53 (Route53)
4-
version: 0.0.6
5-
appVersion: 0.0.6
4+
version: 0.0.7
5+
appVersion: 0.0.7
66
home: https://github.com/aws-controllers-k8s/route53-controller
77
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
88
sources:

helm/templates/NOTES.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{ .Chart.Name }} has been installed.
2-
This chart deploys "public.ecr.aws/aws-controllers-k8s/route53-controller:0.0.6".
2+
This chart deploys "public.ecr.aws/aws-controllers-k8s/route53-controller:0.0.7".
33

44
Check its status by running:
55
kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}"

helm/templates/deployment.yaml

+9-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ spec:
4949
- --aws-endpoint-url
5050
- "$(AWS_ENDPOINT_URL)"
5151
- --enable-development-logging
52-
- "$(ACK_ENABLE_DEVELOPMENT_LOGGING)"
52+
- "$(ENABLE_DEVELOPMENT_LOGGING)"
5353
- --log-level
5454
- "$(ACK_LOG_LEVEL)"
5555
- --resource-tags
@@ -58,6 +58,10 @@ spec:
5858
- "$(ACK_WATCH_NAMESPACE)"
5959
- --deletion-policy
6060
- "$(DELETION_POLICY)"
61+
- --enable-leader-election
62+
- "$(ENABLE_LEADER_ELECTION)"
63+
- --leader-election-namespace
64+
- "$(LEADER_ELECTION_NAMESPACE)"
6165
{{- if gt .Values.reconcile.defaultResyncPeriod 0.0 }}
6266
- --reconcile-default-resync-seconds
6367
- "$(RECONCILE_DEFAULT_RESYNC_SECONDS)"
@@ -87,6 +91,10 @@ spec:
8791
value: {{ include "watch-namespace" . }}
8892
- name: DELETION_POLICY
8993
value: {{ .Values.deletionPolicy }}
94+
- name: ENABLED_LEADER_ELECTION
95+
value: {{ .Values.leaderElection.enabled | quote }}
96+
- name: LEADER_ELECTION_NAMESPACE
97+
value: {{ .Values.leaderElection.namespace | quote }}
9098
- name: ACK_ENABLE_DEVELOPMENT_LOGGING
9199
value: {{ .Values.log.enable_development_logging | quote }}
92100
- name: ACK_LOG_LEVEL
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{{ if .Values.leaderElection.enabled }}
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: RoleBinding
4+
metadata:
5+
name: route53-leader-election-rolebinding
6+
{{ if .Values.leaderElection.namespace }}
7+
namespace: {{ .Values.leaderElection.namespace }}
8+
{{ else }}
9+
namespace: {{ .Release.Namespace }}
10+
{{ end }}
11+
roleRef:
12+
apiGroup: rbac.authorization.k8s.io
13+
kind: Role
14+
name: route53-leader-election-role
15+
subjects:
16+
- kind: ServiceAccount
17+
name: ack-route53-controller
18+
namespace: {{ .Release.Namespace }}{{- end }}
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{{ if .Values.leaderElection.enabled }}
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: Role
4+
metadata:
5+
name: route53-leader-election-role
6+
{{ if .Values.leaderElection.namespace }}
7+
namespace: {{ .Values.leaderElection.namespace }}
8+
{{ else }}
9+
namespace: {{ .Release.Namespace }}
10+
{{ end }}
11+
rules:
12+
- apiGroups:
13+
- coordination.k8s.io
14+
resources:
15+
- leases
16+
verbs:
17+
- get
18+
- list
19+
- watch
20+
- create
21+
- update
22+
- patch
23+
- delete
24+
- apiGroups:
25+
- ""
26+
resources:
27+
- events
28+
verbs:
29+
- create
30+
- patch{{- end }}

helm/values.schema.json

+12
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,18 @@
231231
},
232232
"type": "object"
233233
},
234+
"leaderElection": {
235+
"description": "Parameter to configure the controller's leader election system.",
236+
"properties": {
237+
"enabled": {
238+
"type": "boolean"
239+
},
240+
"namespace": {
241+
"type": "string"
242+
}
243+
},
244+
"type": "object"
245+
},
234246
"serviceAccount": {
235247
"description": "ServiceAccount settings",
236248
"properties": {

helm/values.yaml

+13-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
image:
66
repository: public.ecr.aws/aws-controllers-k8s/route53-controller
7-
tag: 0.0.6
7+
tag: 0.0.7
88
pullPolicy: IfNotPresent
99
pullSecrets: []
1010

@@ -121,3 +121,15 @@ serviceAccount:
121121
name: ack-route53-controller
122122
annotations: {}
123123
# eks.amazonaws.com/role-arn: arn:aws:iam::AWS_ACCOUNT_ID:role/IAM_ROLE_NAME
124+
125+
# Configuration of the leader election. Required for running multiple instances of the
126+
# controller within the same cluster.
127+
# See https://kubernetes.io/docs/concepts/architecture/leases/#leader-election
128+
leaderElection:
129+
# Enable Controller Leader Election. Set this to true to enable leader election
130+
# for this controller.
131+
enabled: false
132+
# Leader election can be scoped to a specific namespace. By default, the controller
133+
# will attempt to use the namespace of the service account mounted to the Controller
134+
# pod.
135+
namespace: ""

metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ service:
22
full_name: "Amazon Route53"
33
short_name: "Route53"
44
link: "https://aws.amazon.com/route53/"
5-
documentation: "https://docs.aws.amazon.com/route53/index.html"
5+
documentation: "https://docs.aws.amazon.com/route53/"
66
api_versions:
77
- api_version: v1alpha1
88
status: available

0 commit comments

Comments
 (0)