Skip to content

Commit 6e20db5

Browse files
authored
Merge pull request #2012 from marosset/windows-csi-proxy
Installing csi-proxy in some windows clusters
2 parents 71f1710 + 52f8f9d commit 6e20db5

15 files changed

+273
-0
lines changed

Tiltfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ def create_crs():
234234
local(kubectl_cmd + " delete configmaps calico-ipv6-addon --ignore-not-found=true")
235235
local(kubectl_cmd + " create configmap calico-ipv6-addon --from-file=templates/addons/calico-ipv6.yaml")
236236
local(kubectl_cmd + " delete configmaps flannel-windows-addon --ignore-not-found=true")
237+
local(kubectl_cmd + " delete configmaps csi-proxy-addon --ignore-not-found=true")
238+
local(kubectl_cmd + " create configmap csi-proxy-addon --from-file=templates/addons/windows/csi-proxy/csi-proxy.yaml")
237239

238240
# need to set version for kube-proxy on windows.
239241
os.putenv("KUBERNETES_VERSION", settings.get("kubernetes_version", {}))
@@ -243,6 +245,7 @@ def create_crs():
243245
# set up crs
244246
local(kubectl_cmd + " apply -f templates/addons/calico-resource-set.yaml")
245247
local(kubectl_cmd + " apply -f templates/addons/flannel-resource-set.yaml")
248+
local(kubectl_cmd + " apply -f templates/addons/windows/csi-proxy/csi-proxy-resource-set.yaml")
246249

247250
# create flavor resources from cluster-template files in the templates directory
248251
def flavors():
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: addons.cluster.x-k8s.io/v1beta1
3+
kind: ClusterResourceSet
4+
metadata:
5+
name: csi-proxy
6+
namespace: default
7+
spec:
8+
clusterSelector:
9+
matchLabels:
10+
csi-proxy: enabled
11+
resources:
12+
- kind: ConfigMap
13+
name: csi-proxy-addon
14+
strategy: ApplyOnce
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apiVersion: apps/v1
2+
kind: DaemonSet
3+
metadata:
4+
labels:
5+
k8s-app: csi-proxy
6+
name: csi-proxy
7+
namespace: kube-system
8+
spec:
9+
selector:
10+
matchLabels:
11+
k8s-app: csi-proxy
12+
template:
13+
metadata:
14+
labels:
15+
k8s-app: csi-proxy
16+
spec:
17+
nodeSelector:
18+
"kubernetes.io/os": windows
19+
securityContext:
20+
windowsOptions:
21+
hostProcess: true
22+
runAsUserName: "NT AUTHORITY\\SYSTEM"
23+
hostNetwork: true
24+
containers:
25+
- name: csi-proxy
26+
image: ghcr.io/kubernetes-sigs/sig-windows/csi-proxy:v1.0.2

templates/cluster-template-machinepool-windows-containerd.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ kind: Cluster
33
metadata:
44
labels:
55
cni: calico
6+
csi-proxy: enabled
67
windows: enabled
78
name: ${CLUSTER_NAME}
89
namespace: default

templates/cluster-template-windows-containerd.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ kind: Cluster
33
metadata:
44
labels:
55
cni: calico
6+
csi-proxy: enabled
67
windows: enabled
78
name: ${CLUSTER_NAME}
89
namespace: default

templates/flavors/base-windows-containerd/cluster.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ kind: Cluster
44
metadata:
55
name: ${CLUSTER_NAME}
66
labels:
7+
csi-proxy: enabled
78
windows: enabled

templates/test/ci/cluster-template-prow-ci-version-windows-containerd-2022.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
labels:
55
cni: ${CLUSTER_NAME}-calico
66
containerd-logger: enabled
7+
csi-proxy: enabled
78
metrics-server: enabled
89
name: ${CLUSTER_NAME}
910
namespace: default
@@ -545,6 +546,20 @@ spec:
545546
tenantID: ${AZURE_TENANT_ID}
546547
type: ServicePrincipal
547548
---
549+
apiVersion: addons.cluster.x-k8s.io/v1beta1
550+
kind: ClusterResourceSet
551+
metadata:
552+
name: csi-proxy
553+
namespace: default
554+
spec:
555+
clusterSelector:
556+
matchLabels:
557+
csi-proxy: enabled
558+
resources:
559+
- kind: ConfigMap
560+
name: csi-proxy-addon
561+
strategy: ApplyOnce
562+
---
548563
apiVersion: v1
549564
data:
550565
kube-proxy-patch: |-
@@ -4654,6 +4669,44 @@ metadata:
46544669
name: cni-${CLUSTER_NAME}-calico
46554670
namespace: default
46564671
---
4672+
apiVersion: v1
4673+
data:
4674+
csi-proxy: |
4675+
apiVersion: apps/v1
4676+
kind: DaemonSet
4677+
metadata:
4678+
labels:
4679+
k8s-app: csi-proxy
4680+
name: csi-proxy
4681+
namespace: kube-system
4682+
spec:
4683+
selector:
4684+
matchLabels:
4685+
k8s-app: csi-proxy
4686+
template:
4687+
metadata:
4688+
labels:
4689+
k8s-app: csi-proxy
4690+
spec:
4691+
nodeSelector:
4692+
"kubernetes.io/os": windows
4693+
securityContext:
4694+
windowsOptions:
4695+
hostProcess: true
4696+
runAsUserName: "NT AUTHORITY\\SYSTEM"
4697+
hostNetwork: true
4698+
containers:
4699+
- name: csi-proxy
4700+
image: ghcr.io/kubernetes-sigs/sig-windows/csi-proxy:v1.0.2
4701+
kind: ConfigMap
4702+
metadata:
4703+
annotations:
4704+
note: generated
4705+
labels:
4706+
type: generated
4707+
name: csi-proxy-addon
4708+
namespace: default
4709+
---
46574710
apiVersion: addons.cluster.x-k8s.io/v1beta1
46584711
kind: ClusterResourceSet
46594712
metadata:

templates/test/ci/cluster-template-prow-ci-version.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
labels:
55
cni: ${CLUSTER_NAME}-calico
66
containerd-logger: enabled
7+
csi-proxy: enabled
78
metrics-server: enabled
89
name: ${CLUSTER_NAME}
910
namespace: default
@@ -545,6 +546,20 @@ spec:
545546
tenantID: ${AZURE_TENANT_ID}
546547
type: ServicePrincipal
547548
---
549+
apiVersion: addons.cluster.x-k8s.io/v1beta1
550+
kind: ClusterResourceSet
551+
metadata:
552+
name: csi-proxy
553+
namespace: default
554+
spec:
555+
clusterSelector:
556+
matchLabels:
557+
csi-proxy: enabled
558+
resources:
559+
- kind: ConfigMap
560+
name: csi-proxy-addon
561+
strategy: ApplyOnce
562+
---
548563
apiVersion: v1
549564
data:
550565
kube-proxy-patch: |-
@@ -4654,6 +4669,44 @@ metadata:
46544669
name: cni-${CLUSTER_NAME}-calico
46554670
namespace: default
46564671
---
4672+
apiVersion: v1
4673+
data:
4674+
csi-proxy: |
4675+
apiVersion: apps/v1
4676+
kind: DaemonSet
4677+
metadata:
4678+
labels:
4679+
k8s-app: csi-proxy
4680+
name: csi-proxy
4681+
namespace: kube-system
4682+
spec:
4683+
selector:
4684+
matchLabels:
4685+
k8s-app: csi-proxy
4686+
template:
4687+
metadata:
4688+
labels:
4689+
k8s-app: csi-proxy
4690+
spec:
4691+
nodeSelector:
4692+
"kubernetes.io/os": windows
4693+
securityContext:
4694+
windowsOptions:
4695+
hostProcess: true
4696+
runAsUserName: "NT AUTHORITY\\SYSTEM"
4697+
hostNetwork: true
4698+
containers:
4699+
- name: csi-proxy
4700+
image: ghcr.io/kubernetes-sigs/sig-windows/csi-proxy:v1.0.2
4701+
kind: ConfigMap
4702+
metadata:
4703+
annotations:
4704+
note: generated
4705+
labels:
4706+
type: generated
4707+
name: csi-proxy-addon
4708+
namespace: default
4709+
---
46574710
apiVersion: addons.cluster.x-k8s.io/v1beta1
46584711
kind: ClusterResourceSet
46594712
metadata:

templates/test/ci/cluster-template-prow-machine-pool-ci-version.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ kind: Cluster
33
metadata:
44
labels:
55
cni: ${CLUSTER_NAME}-calico
6+
csi-proxy: enabled
67
windows: enabled
78
name: ${CLUSTER_NAME}
89
namespace: default

templates/test/ci/cluster-template-prow-machine-pool.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ kind: Cluster
33
metadata:
44
labels:
55
cni: ${CLUSTER_NAME}-calico
6+
csi-proxy: enabled
67
windows: enabled
78
name: ${CLUSTER_NAME}
89
namespace: default

0 commit comments

Comments
 (0)