Skip to content

Commit 52f8f9d

Browse files
committed
Installing csi-proxy in some windows clusters
Adding csi-proxy to windows-containerd dev template Moving csi-proxy addon to cluster-template-prow.yaml since that is what azure-disk/file tests use in CI Signed-off-by: Mark Rossetti <[email protected]>
1 parent a16ce1c commit 52f8f9d

15 files changed

+273
-0
lines changed

Tiltfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ def create_crs():
218218
local(kubectl_cmd + " delete configmaps calico-ipv6-addon --ignore-not-found=true")
219219
local(kubectl_cmd + " create configmap calico-ipv6-addon --from-file=templates/addons/calico-ipv6.yaml")
220220
local(kubectl_cmd + " delete configmaps flannel-windows-addon --ignore-not-found=true")
221+
local(kubectl_cmd + " delete configmaps csi-proxy-addon --ignore-not-found=true")
222+
local(kubectl_cmd + " create configmap csi-proxy-addon --from-file=templates/addons/windows/csi-proxy/csi-proxy.yaml")
221223

222224
# need to set version for kube-proxy on windows.
223225
os.putenv("KUBERNETES_VERSION", settings.get("kubernetes_version", {}))
@@ -227,6 +229,7 @@ def create_crs():
227229
# set up crs
228230
local(kubectl_cmd + " apply -f templates/addons/calico-resource-set.yaml")
229231
local(kubectl_cmd + " apply -f templates/addons/flannel-resource-set.yaml")
232+
local(kubectl_cmd + " apply -f templates/addons/windows/csi-proxy/csi-proxy-resource-set.yaml")
230233

231234
# create flavor resources from cluster-template files in the templates directory
232235
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: |-
@@ -3111,6 +3126,44 @@ metadata:
31113126
name: cni-${CLUSTER_NAME}-calico
31123127
namespace: default
31133128
---
3129+
apiVersion: v1
3130+
data:
3131+
csi-proxy: |
3132+
apiVersion: apps/v1
3133+
kind: DaemonSet
3134+
metadata:
3135+
labels:
3136+
k8s-app: csi-proxy
3137+
name: csi-proxy
3138+
namespace: kube-system
3139+
spec:
3140+
selector:
3141+
matchLabels:
3142+
k8s-app: csi-proxy
3143+
template:
3144+
metadata:
3145+
labels:
3146+
k8s-app: csi-proxy
3147+
spec:
3148+
nodeSelector:
3149+
"kubernetes.io/os": windows
3150+
securityContext:
3151+
windowsOptions:
3152+
hostProcess: true
3153+
runAsUserName: "NT AUTHORITY\\SYSTEM"
3154+
hostNetwork: true
3155+
containers:
3156+
- name: csi-proxy
3157+
image: ghcr.io/kubernetes-sigs/sig-windows/csi-proxy:v1.0.2
3158+
kind: ConfigMap
3159+
metadata:
3160+
annotations:
3161+
note: generated
3162+
labels:
3163+
type: generated
3164+
name: csi-proxy-addon
3165+
namespace: default
3166+
---
31143167
apiVersion: addons.cluster.x-k8s.io/v1beta1
31153168
kind: ClusterResourceSet
31163169
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: |-
@@ -3111,6 +3126,44 @@ metadata:
31113126
name: cni-${CLUSTER_NAME}-calico
31123127
namespace: default
31133128
---
3129+
apiVersion: v1
3130+
data:
3131+
csi-proxy: |
3132+
apiVersion: apps/v1
3133+
kind: DaemonSet
3134+
metadata:
3135+
labels:
3136+
k8s-app: csi-proxy
3137+
name: csi-proxy
3138+
namespace: kube-system
3139+
spec:
3140+
selector:
3141+
matchLabels:
3142+
k8s-app: csi-proxy
3143+
template:
3144+
metadata:
3145+
labels:
3146+
k8s-app: csi-proxy
3147+
spec:
3148+
nodeSelector:
3149+
"kubernetes.io/os": windows
3150+
securityContext:
3151+
windowsOptions:
3152+
hostProcess: true
3153+
runAsUserName: "NT AUTHORITY\\SYSTEM"
3154+
hostNetwork: true
3155+
containers:
3156+
- name: csi-proxy
3157+
image: ghcr.io/kubernetes-sigs/sig-windows/csi-proxy:v1.0.2
3158+
kind: ConfigMap
3159+
metadata:
3160+
annotations:
3161+
note: generated
3162+
labels:
3163+
type: generated
3164+
name: csi-proxy-addon
3165+
namespace: default
3166+
---
31143167
apiVersion: addons.cluster.x-k8s.io/v1beta1
31153168
kind: ClusterResourceSet
31163169
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)