Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit 8f4aaf1

Browse files
authored
feat: add AWS CPI ConfigMap for v1.28 (nutanix-cloud-native#376)
Reusing the same chart version since there is [only 1](https://github.com/kubernetes/cloud-provider-aws/releases), but setting the image version based on the tag.
1 parent b23ddcd commit 8f4aaf1

File tree

5 files changed

+204
-9
lines changed

5 files changed

+204
-9
lines changed
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
# Copyright 2023 D2iQ, Inc. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
#=================================================================
5+
# DO NOT EDIT THIS FILE
6+
# IT HAS BEEN GENERATED BY /hack/addons/update-aws-cpi.sh
7+
#=================================================================
8+
apiVersion: v1
9+
data:
10+
aws-cpi-v1.28.1.yaml: |
11+
apiVersion: v1
12+
kind: ServiceAccount
13+
metadata:
14+
labels:
15+
helm.sh/chart: aws-cloud-controller-manager-0.0.8
16+
name: cloud-controller-manager
17+
namespace: kube-system
18+
---
19+
apiVersion: rbac.authorization.k8s.io/v1
20+
kind: ClusterRole
21+
metadata:
22+
labels:
23+
helm.sh/chart: aws-cloud-controller-manager-0.0.8
24+
name: system:cloud-controller-manager
25+
rules:
26+
- apiGroups:
27+
- ""
28+
resources:
29+
- events
30+
verbs:
31+
- create
32+
- patch
33+
- update
34+
- apiGroups:
35+
- ""
36+
resources:
37+
- nodes
38+
verbs:
39+
- '*'
40+
- apiGroups:
41+
- ""
42+
resources:
43+
- nodes/status
44+
verbs:
45+
- patch
46+
- apiGroups:
47+
- ""
48+
resources:
49+
- services
50+
verbs:
51+
- list
52+
- patch
53+
- update
54+
- watch
55+
- apiGroups:
56+
- ""
57+
resources:
58+
- services/status
59+
verbs:
60+
- list
61+
- patch
62+
- update
63+
- watch
64+
- apiGroups:
65+
- ""
66+
resources:
67+
- serviceaccounts
68+
verbs:
69+
- create
70+
- apiGroups:
71+
- ""
72+
resources:
73+
- persistentvolumes
74+
verbs:
75+
- get
76+
- list
77+
- update
78+
- watch
79+
- apiGroups:
80+
- ""
81+
resources:
82+
- endpoints
83+
verbs:
84+
- create
85+
- get
86+
- list
87+
- watch
88+
- update
89+
- apiGroups:
90+
- coordination.k8s.io
91+
resources:
92+
- leases
93+
verbs:
94+
- create
95+
- get
96+
- list
97+
- watch
98+
- update
99+
- apiGroups:
100+
- ""
101+
resources:
102+
- serviceaccounts/token
103+
verbs:
104+
- create
105+
---
106+
apiVersion: rbac.authorization.k8s.io/v1
107+
kind: RoleBinding
108+
metadata:
109+
labels:
110+
helm.sh/chart: aws-cloud-controller-manager-0.0.8
111+
name: cloud-controller-manager:apiserver-authentication-reader
112+
namespace: kube-system
113+
roleRef:
114+
apiGroup: rbac.authorization.k8s.io
115+
kind: Role
116+
name: extension-apiserver-authentication-reader
117+
subjects:
118+
- apiGroup: ""
119+
kind: ServiceAccount
120+
name: cloud-controller-manager
121+
namespace: kube-system
122+
---
123+
apiVersion: rbac.authorization.k8s.io/v1
124+
kind: ClusterRoleBinding
125+
metadata:
126+
labels:
127+
helm.sh/chart: aws-cloud-controller-manager-0.0.8
128+
name: system:cloud-controller-manager
129+
roleRef:
130+
apiGroup: rbac.authorization.k8s.io
131+
kind: ClusterRole
132+
name: system:cloud-controller-manager
133+
subjects:
134+
- apiGroup: ""
135+
kind: ServiceAccount
136+
name: cloud-controller-manager
137+
namespace: kube-system
138+
---
139+
apiVersion: apps/v1
140+
kind: DaemonSet
141+
metadata:
142+
labels:
143+
helm.sh/chart: aws-cloud-controller-manager-0.0.8
144+
k8s-app: aws-cloud-controller-manager
145+
name: aws-cloud-controller-manager
146+
namespace: kube-system
147+
spec:
148+
selector:
149+
matchLabels:
150+
k8s-app: aws-cloud-controller-manager
151+
template:
152+
metadata:
153+
labels:
154+
k8s-app: aws-cloud-controller-manager
155+
name: aws-cloud-controller-manager
156+
spec:
157+
containers:
158+
- args:
159+
- --v=2
160+
- --cloud-provider=aws
161+
- --configure-cloud-routes=false
162+
env: []
163+
image: registry.k8s.io/provider-aws/cloud-controller-manager:v1.28.1
164+
name: aws-cloud-controller-manager
165+
resources:
166+
requests:
167+
cpu: 200m
168+
securityContext: {}
169+
dnsPolicy: Default
170+
nodeSelector:
171+
node-role.kubernetes.io/control-plane: ""
172+
priorityClassName: system-node-critical
173+
securityContext: {}
174+
serviceAccountName: cloud-controller-manager
175+
tolerations:
176+
- effect: NoSchedule
177+
key: node.cloudprovider.kubernetes.io/uninitialized
178+
value: "true"
179+
- effect: NoSchedule
180+
key: node-role.kubernetes.io/master
181+
- effect: NoSchedule
182+
key: node-role.kubernetes.io/control-plane
183+
updateStrategy:
184+
type: RollingUpdate
185+
kind: ConfigMap
186+
metadata:
187+
creationTimestamp: null
188+
name: aws-cpi-v1.28.1

hack/addons/kustomize/aws-cpi/kustomization.yaml.tmpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ helmCharts:
1111
- name: aws-cloud-controller-manager
1212
includeCRDs: true
1313
releaseName: aws-cloud-controller-manager
14-
version: ${CHART_VERSION}
14+
version: ${AWS_CPI_CHART_VERSION}
1515
repo: https://kubernetes.github.io/cloud-provider-aws
1616

1717
patches:
@@ -21,3 +21,7 @@ patches:
2121
value: --configure-cloud-routes=false
2222
target:
2323
kind: DaemonSet
24+
25+
images:
26+
- name: registry.k8s.io/provider-aws/cloud-controller-manager
27+
newTag: ${AWS_CPI_VERSION}

hack/addons/update-aws-cpi.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ readonly SCRIPT_DIR
99
source "${SCRIPT_DIR}/../common.sh"
1010

1111
AWS_CPI_VERSION=$1
12+
export AWS_CPI_VERSION
13+
AWS_CPI_CHART_VERSION=$2
14+
export AWS_CPI_CHART_VERSION
1215

1316
if [ -z "${AWS_CPI_VERSION:-}" ]; then
1417
echo "Missing argument: AWS_CPI_VERSION"
@@ -19,11 +22,6 @@ ASSETS_DIR="$(mktemp -d -p "${TMPDIR:-/tmp}")"
1922
readonly ASSETS_DIR
2023
trap_add "rm -rf ${ASSETS_DIR}" EXIT
2124

22-
export CHART_VERSION=""
23-
if [ "${AWS_CPI_VERSION}" = "1.27.1" ]; then
24-
CHART_VERSION="0.0.8"
25-
fi
26-
2725
readonly KUSTOMIZE_BASE_DIR="${SCRIPT_DIR}/kustomize/aws-cpi/"
2826
envsubst -no-unset <"${KUSTOMIZE_BASE_DIR}/kustomization.yaml.tmpl" >"${ASSETS_DIR}/kustomization.yaml"
2927

make/addons.mk

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ export CILIUM_VERSION := $(shell goprintconst -file pkg/handlers/generic/lifecyc
66
export NODE_FEATURE_DISCOVERY_VERSION := 0.14.1
77
export AWS_CSI_SNAPSHOT_CONTROLLER_VERSION := v6.3.0
88
export AWS_EBS_CSI_VERSION := v1.25.0
9+
# a map of AWS CPI versions
910
export AWS_CPI_VERSION_127 := v1.27.1
11+
export AWS_CPI_CHART_VERSION_127 := 0.0.8
12+
export AWS_CPI_VERSION_128 := v1.28.1
13+
export AWS_CPI_CHART_VERSION_128 := 0.0.8
1014

1115
addons.sync: $(addprefix update-addon.,calico cilium nfd aws-ebs-csi)
1216

@@ -26,6 +30,6 @@ update-addon.nfd: ; $(info $(M) updating node feature discovery manifests)
2630
update-addon.aws-ebs-csi: ; $(info $(M) updating aws ebs csi manifests)
2731
./hack/addons/update-aws-ebs-csi.sh
2832

29-
.PHONY: update-addon.aws-cpi.127
30-
update-addon.aws-cpi.127: ; $(info $(M) updating aws cpi manifests)
31-
./hack/addons/update-aws-cpi.sh $(AWS_CPI_VERSION_127)
33+
.PHONY: update-addon.aws-cpi.%
34+
update-addon.aws-cpi.%: ; $(info $(M) updating aws cpi manifests)
35+
./hack/addons/update-aws-cpi.sh $(AWS_CPI_VERSION_$*) $(AWS_CPI_CHART_VERSION_$*)

pkg/handlers/generic/lifecycle/cpi/aws/handler.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ func (a *AWSCPIConfig) AddFlags(prefix string, flags *pflag.FlagSet) {
3636
prefix+".default-aws-cpi-configmap-names",
3737
map[string]string{
3838
"1.27": "aws-cpi-v1.27.1",
39+
"1.28": "aws-cpi-v1.28.1",
3940
},
4041
"map of provider cluster implementation type to default installation ConfigMap name",
4142
)

0 commit comments

Comments
 (0)