Skip to content

Commit 4db795a

Browse files
authored
Upgrade to runtime 0.13.0 (#5)
Issue #, if available: N/A Description of changes: * Updates with latest initialisms * Enhances ReadMany logic to populate `Id` field with CustomResource's Id * Removes hooks that were populating ReadMany `Id` field By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent c362e4b commit 4db795a

24 files changed

+145
-141
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
ack_generate_info:
2-
build_date: "2021-08-18T21:36:57Z"
3-
build_hash: 821a0daf362fdda8148046310c3eb478b96366ac
4-
go_version: go1.16.6 darwin/amd64
5-
version: v0.12.0
6-
api_directory_checksum: aae0d15e0e983bfceae42ac7f3dd640e1f9b298a
2+
build_date: "2021-09-01T18:32:41Z"
3+
build_hash: 6f22b7b568e25b4ee007bb1ab5f9338c16daf172
4+
go_version: go1.17 darwin/amd64
5+
version: v0.13.0
6+
api_directory_checksum: ae8b61e0359ce7d3f8795b243537b07c43e2609e
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.37.10
99
generator_config_info:
10-
file_checksum: f7a61725fe7d34c5e0180ae010b10eebd5cb95e0
10+
file_checksum: d37d8e26f07ea82e6ce896adffc138034078c1e1
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation
14-
timestamp: 2021-08-18 21:37:05.403098 +0000 UTC
14+
timestamp: 2021-09-01 18:32:53.713542 +0000 UTC

apis/v1alpha1/generator.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,7 @@ ignore:
6363
- VpnGateway
6464

6565
resources:
66-
Vpc:
67-
hooks:
68-
sdk_read_many_post_build_request:
69-
template_path: hooks/vpc/sdk_read_many_post_build_request.go.tpl
7066
Subnet:
71-
hooks:
72-
sdk_read_many_post_build_request:
73-
template_path: hooks/vpc/sdk_read_many_post_build_request.go.tpl
7467
exceptions:
7568
terminal_codes:
7669
- InvalidVpcID.Malformed

apis/v1alpha1/types.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/zz_generated.deepcopy.go

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

generator.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,7 @@ ignore:
6363
- VpnGateway
6464

6565
resources:
66-
Vpc:
67-
hooks:
68-
sdk_read_many_post_build_request:
69-
template_path: hooks/vpc/sdk_read_many_post_build_request.go.tpl
7066
Subnet:
71-
hooks:
72-
sdk_read_many_post_build_request:
73-
template_path: hooks/subnet/sdk_read_many_post_build_request.go.tpl
7467
exceptions:
7568
terminal_codes:
7669
- InvalidVpcID.Malformed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/aws-controllers-k8s/ec2-controller
33
go 1.14
44

55
require (
6-
github.com/aws-controllers-k8s/runtime v0.12.0
6+
github.com/aws-controllers-k8s/runtime v0.13.0
77
github.com/aws/aws-sdk-go v1.37.10
88
github.com/go-logr/logr v0.1.0
99
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo
2323
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
2424
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
2525
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
26-
github.com/aws-controllers-k8s/runtime v0.12.0 h1:G/lCEozh4Brsv1Ojqyl9D/whpq/YvcFtDZBWXf6YIgI=
27-
github.com/aws-controllers-k8s/runtime v0.12.0/go.mod h1:kG2WM4JAmLgf67cgZV9IZUkY2DsrUzsaNbmhFMfb05c=
26+
github.com/aws-controllers-k8s/runtime v0.13.0 h1:PYiNnQejjS/1H93bolFXGIzgQZSn/gRoPSAEU6UG0ec=
27+
github.com/aws-controllers-k8s/runtime v0.13.0/go.mod h1:kG2WM4JAmLgf67cgZV9IZUkY2DsrUzsaNbmhFMfb05c=
2828
github.com/aws/aws-sdk-go v1.37.10 h1:LRwl+97B4D69Z7tz+eRUxJ1C7baBaIYhgrn5eLtua+Q=
2929
github.com/aws/aws-sdk-go v1.37.10/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
3030
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=

helm/Chart.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
apiVersion: v1
22
name: ec2-chart
3-
description: A Helm chart for the ACK service controller for ec2
4-
version: v0.0.1
5-
appVersion: v0.0.1
3+
description: A Helm chart for the ACK service controller for Amazon Elastic Cloud Compute (EC2)
4+
version: v0.0.0-non-release-version
5+
appVersion: v0.0.0-non-release-version
66
home: https://github.com/aws-controllers-k8s/ec2-controller
77
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
88
sources:
99
- https://github.com/aws-controllers-k8s/ec2-controller
1010
maintainers:
1111
- name: ACK Admins
1212
url: https://github.com/orgs/aws-controllers-k8s/teams/ack-admin
13-
- name: ec2 Admins
13+
- name: EC2 Admins
1414
url: https://github.com/orgs/aws-controllers-k8s/teams/ec2-maintainer
1515
keywords:
1616
- aws

helm/templates/_helpers.tpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,9 @@ If release name contains chart name it will be used as a full name.
3030
{{- define "service-account.name" -}}
3131
{{ default "default" .Values.serviceAccount.name }}
3232
{{- end -}}
33+
34+
{{- define "watch-namespace" -}}
35+
{{- if eq .Values.installScope "namespace" -}}
36+
{{- .Release.Namespace -}}
37+
{{- end -}}
38+
{{- end -}}

helm/templates/cluster-role-binding.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
apiVersion: rbac.authorization.k8s.io/v1
2+
{{ if eq .Values.installScope "cluster" }}
23
kind: ClusterRoleBinding
34
metadata:
45
name: {{ include "app.fullname" . }}
56
roleRef:
6-
apiGroup: rbac.authorization.k8s.io
77
kind: ClusterRole
8+
{{ else }}
9+
kind: RoleBinding
10+
metadata:
11+
name: {{ include "app.fullname" . }}
12+
namespace: {{ .Release.Namespace }}
13+
roleRef:
14+
kind: Role
15+
{{ end }}
16+
apiGroup: rbac.authorization.k8s.io
817
name: ack-ec2-controller
918
subjects:
1019
- kind: ServiceAccount

helm/templates/cluster-role-controller.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
2-
---
31
apiVersion: rbac.authorization.k8s.io/v1
2+
{{ if eq .Values.installScope "cluster" }}
43
kind: ClusterRole
54
metadata:
65
creationTimestamp: null
76
name: ack-ec2-controller
7+
{{ else }}
8+
kind: Role
9+
metadata:
10+
creationTimestamp: null
11+
name: ack-ec2-controller
12+
namespace: {{ .Release.Namespace }}
13+
{{ end }}
814
rules:
915
- apiGroups:
1016
- ""

helm/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ spec:
6767
- name: AWS_REGION
6868
value: {{ .Values.aws.region }}
6969
- name: AWS_ENDPOINT_URL
70-
value: {{ .Values.aws.endpoint_url | quote}}
70+
value: {{ .Values.aws.endpoint_url | quote }}
7171
- name: ACK_WATCH_NAMESPACE
72-
value: {{ .Values.watchNamespace }}
72+
value: {{ include "watch-namespace" . }}
7373
- name: ACK_ENABLE_DEVELOPMENT_LOGGING
7474
value: {{ .Values.log.enable_development_logging | quote }}
7575
- name: ACK_LOG_LEVEL

helm/values.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
image:
66
repository: public.ecr.aws/aws-controllers-k8s/ec2-controller
7-
tag: v0.0.1
7+
tag: v0.0.0-non-release-version
88
pullPolicy: IfNotPresent
99
pullSecrets: []
1010

@@ -44,11 +44,14 @@ log:
4444
enable_development_logging: false
4545
level: info
4646

47-
# If specified, the service controller will watch for object creation only in the provided namespace
48-
watchNamespace: ""
47+
# Set to "namespace" to install the controller in a namespaced scope, will only
48+
# watch for object creation in the namespace. By default installScope is
49+
# cluster wide.
50+
installScope: cluster
4951

5052
resourceTags:
51-
# Configures the ACK service controller to always set key/value pairs tags on resources that it manages.
53+
# Configures the ACK service controller to always set key/value pairs tags on
54+
# resources that it manages.
5255
- services.k8s.aws/managed=true
5356
- services.k8s.aws/created=%UTCNOW%
5457
- services.k8s.aws/namespace=%KUBERNETES_NAMESPACE%

pkg/resource/subnet/delta.go

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

pkg/resource/subnet/hooks.go

Lines changed: 0 additions & 30 deletions
This file was deleted.

pkg/resource/subnet/manager.go

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

pkg/resource/subnet/resource.go

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

pkg/resource/subnet/sdk.go

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

0 commit comments

Comments
 (0)