Skip to content

Commit 79b7d61

Browse files
author
Jake Klein
authored
Revert "Enable Windows IPAM when creating a Windows nodegroup, deprecate install-vpc-controllers" (#4340)
1 parent b7144cf commit 79b7d61

23 files changed

+770
-399
lines changed

examples/14-windows-nodes.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# An example of ClusterConfig containing Windows and Linux node groups to support Windows workloads
2-
# This example should be run with `eksctl create cluster -f 14-windows-nodes.yaml`
2+
# This example should be run with `eksctl create cluster -f 14-windows-nodes.yaml --install-vpc-controllers`
33
---
44
apiVersion: eksctl.io/v1alpha5
55
kind: ClusterConfig
@@ -13,8 +13,6 @@ nodeGroups:
1313
amiFamily: WindowsServer2019FullContainer
1414
minSize: 2
1515
maxSize: 3
16-
17-
managedNodeGroups:
1816
- name: linux-ng
1917
instanceType: t2.large
2018
minSize: 2

integration/tests/windows/windows_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ var _ = Describe("(Integration) [Windows Nodegroups]", func() {
7070
"--config-file", "-",
7171
"--verbose", "4",
7272
"--kubeconfig", params.KubeconfigPath,
73+
"--install-vpc-controllers",
7374
).
7475
WithoutArg("--region", params.Region).
7576
WithStdin(bytes.NewReader(data))

pkg/actions/nodegroup/create.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,6 @@ func (m *Manager) nodeCreationTasks(options CreateOpts, nodegroupFilter filter.N
160160
taskTree.Append(m.stackManager.NewClusterCompatTask())
161161
}
162162

163-
if m.cfg.HasWindowsNodeGroup() {
164-
taskTree.Append(&eks.WindowsIPAMTask{
165-
Info: "enable Windows IPAM",
166-
ClientsetFunc: func() (kubernetes.Interface, error) {
167-
return m.ctl.NewStdClientSet(m.cfg)
168-
},
169-
})
170-
}
171-
172163
awsNodeUsesIRSA, err := init.DoesAWSNodeUseIRSA(m.ctl.Provider, m.clientSet)
173164
if err != nil {
174165
return errors.Wrap(err, "couldn't check aws-node for annotation")

pkg/addons/assets.go

Lines changed: 129 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: admissionregistration.k8s.io/v1beta1
2+
kind: MutatingWebhookConfiguration
3+
metadata:
4+
name: vpc-admission-webhook-cfg
5+
namespace: kube-system
6+
labels:
7+
app: vpc-admission-webhook
8+
webhooks:
9+
- name: vpc-admission-webhook.amazonaws.com
10+
clientConfig:
11+
service:
12+
name: vpc-admission-webhook
13+
namespace: kube-system
14+
path: "/mutate"
15+
rules:
16+
- operations: [ "CREATE" ]
17+
apiGroups: [""]
18+
apiVersions: ["v1"]
19+
resources: ["pods"]
20+
failurePolicy: Ignore
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: certificates.k8s.io/v1beta1
2+
kind: CertificateSigningRequest
3+
metadata:
4+
name: vpc-admission-webhook.kube-system
5+
spec:
6+
groups:
7+
- system:authenticated
8+
usages:
9+
- digital signature
10+
- key encipherment
11+
- server auth
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: vpc-admission-webhook
5+
namespace: kube-system
6+
labels:
7+
app: vpc-admission-webhook
8+
spec:
9+
replicas: 1
10+
strategy:
11+
type: Recreate
12+
selector:
13+
matchLabels:
14+
app: vpc-admission-webhook
15+
template:
16+
metadata:
17+
labels:
18+
app: vpc-admission-webhook
19+
spec:
20+
containers:
21+
- name: vpc-admission-webhook
22+
args:
23+
- -tlsCertFile=/etc/webhook/certs/cert.pem
24+
- -tlsKeyFile=/etc/webhook/certs/key.pem
25+
- -OSLabelSelectorOverride=windows
26+
- -alsologtostderr
27+
- -v=4
28+
- 2>&1
29+
image: '%s.dkr.ecr.%s.%s/eks/vpc-admission-webhook:v0.2.6'
30+
imagePullPolicy: Always
31+
volumeMounts:
32+
- name: webhook-certs
33+
mountPath: /etc/webhook/certs
34+
readOnly: true
35+
hostNetwork: true
36+
affinity:
37+
nodeAffinity:
38+
requiredDuringSchedulingIgnoredDuringExecution:
39+
nodeSelectorTerms:
40+
- matchExpressions:
41+
- key: beta.kubernetes.io/os
42+
operator: In
43+
values:
44+
- linux
45+
- key: beta.kubernetes.io/arch
46+
operator: In
47+
values:
48+
- amd64
49+
- matchExpressions:
50+
- key: kubernetes.io/os
51+
operator: In
52+
values:
53+
- linux
54+
- key: kubernetes.io/arch
55+
operator: In
56+
values:
57+
- amd64
58+
volumes:
59+
- name: webhook-certs
60+
secret:
61+
secretName: vpc-admission-webhook-certs
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: vpc-admission-webhook
6+
namespace: kube-system
7+
labels:
8+
app: vpc-admission-webhook
9+
spec:
10+
ports:
11+
- port: 443
12+
targetPort: 443
13+
selector:
14+
app: vpc-admission-webhook

pkg/addons/assets/vpc-controller-metadata.yaml

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: vpc-resource-controller
6+
namespace: kube-system
7+
spec:
8+
replicas: 1
9+
selector:
10+
matchLabels:
11+
app: vpc-resource-controller
12+
tier: backend
13+
track: stable
14+
template:
15+
metadata:
16+
labels:
17+
app: vpc-resource-controller
18+
tier: backend
19+
track: stable
20+
spec:
21+
serviceAccount: vpc-resource-controller
22+
containers:
23+
- command:
24+
- /vpc-resource-controller
25+
args:
26+
- -stderrthreshold=info
27+
image: '%s.dkr.ecr.%s.%s/eks/windows-vpc-resource-controller:v0.2.6'
28+
imagePullPolicy: Always
29+
livenessProbe:
30+
failureThreshold: 5
31+
httpGet:
32+
host: 127.0.0.1
33+
path: /healthz
34+
port: 61779
35+
scheme: HTTP
36+
initialDelaySeconds: 30
37+
periodSeconds: 30
38+
timeoutSeconds: 5
39+
name: vpc-resource-controller
40+
securityContext:
41+
privileged: true
42+
hostNetwork: true
43+
affinity:
44+
nodeAffinity:
45+
requiredDuringSchedulingIgnoredDuringExecution:
46+
nodeSelectorTerms:
47+
- matchExpressions:
48+
- key: beta.kubernetes.io/os
49+
operator: In
50+
values:
51+
- linux
52+
- key: beta.kubernetes.io/arch
53+
operator: In
54+
values:
55+
- amd64
56+
- matchExpressions:
57+
- key: kubernetes.io/os
58+
operator: In
59+
values:
60+
- linux
61+
- key: kubernetes.io/arch
62+
operator: In
63+
values:
64+
- amd64

0 commit comments

Comments
 (0)