...
1kind: StatefulSet
2apiVersion: apps/v1
3metadata:
4 name: csi-mockplugin
5spec:
6 selector:
7 matchLabels:
8 app: csi-mockplugin
9 replicas: 1
10 template:
11 metadata:
12 labels:
13 app: csi-mockplugin
14 spec:
15 serviceAccountName: csi-mock
16 containers:
17 - name: csi-provisioner
18 image: registry.k8s.io/sig-storage/csi-provisioner:v4.0.0
19 args:
20 - "--csi-address=$(ADDRESS)"
21 # Topology support is needed for the pod rescheduling test
22 # ("storage capacity" in csi_mock_volume.go).
23 - "--feature-gates=Topology=true"
24 - "-v=5"
25 - "--timeout=1m"
26 # Needed for fsGroup support.
27 - "--default-fstype=ext4"
28 # We don't need much concurrency and having many gouroutines
29 # makes klog.Fatal during shutdown very long.
30 - "--worker-threads=5"
31 env:
32 - name: ADDRESS
33 value: /csi/csi.sock
34 volumeMounts:
35 - mountPath: /csi
36 name: socket-dir
37 - name: driver-registrar
38 image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.0
39 args:
40 - --v=5
41 - --csi-address=/csi/csi.sock
42 - --kubelet-registration-path=/var/lib/kubelet/plugins/csi-mock/csi.sock
43 - --timeout=1m
44 env:
45 - name: KUBE_NODE_NAME
46 valueFrom:
47 fieldRef:
48 apiVersion: v1
49 fieldPath: spec.nodeName
50 volumeMounts:
51 - mountPath: /csi
52 name: socket-dir
53 - mountPath: /registration
54 name: registration-dir
55 - name: mock
56 image: registry.k8s.io/sig-storage/hostpathplugin:v1.13.0
57 args:
58 - -v=5
59 - -nodeid=$(KUBE_NODE_NAME)
60 - -endpoint=/csi/csi.sock
61 - -proxy-endpoint=tcp://:9000
62 env:
63 - name: CSI_ENDPOINT
64 value: /csi/csi.sock
65 - name: KUBE_NODE_NAME
66 valueFrom:
67 fieldRef:
68 apiVersion: v1
69 fieldPath: spec.nodeName
70 ports:
71 - containerPort: 9000
72 name: socat
73 volumeMounts:
74 - mountPath: /csi
75 name: socket-dir
76 # The busybox container is needed for running shell commands which
77 # test for directories or create them. It needs additional privileges
78 # for that.
79 - name: busybox
80 image: registry.k8s.io/e2e-test-images/busybox:1.29-2
81 securityContext:
82 privileged: true
83 command:
84 - sleep
85 - "100000"
86 volumeMounts:
87 - mountPath: /var/lib/kubelet/pods
88 name: kubelet-pods-dir
89 - mountPath: /var/lib/kubelet/plugins/kubernetes.io/csi
90 name: kubelet-csi-dir
91 volumes:
92 - hostPath:
93 path: /var/lib/kubelet/plugins/csi-mock
94 type: DirectoryOrCreate
95 name: socket-dir
96 - hostPath:
97 path: /var/lib/kubelet/pods
98 type: Directory
99 # mock driver doesn't make mounts and therefore doesn't need mount propagation.
100 # mountPropagation: Bidirectional
101 name: kubelet-pods-dir
102 - hostPath:
103 path: /var/lib/kubelet/plugins/kubernetes.io/csi
104 type: DirectoryOrCreate
105 name: kubelet-csi-dir
106 - hostPath:
107 path: /var/lib/kubelet/plugins_registry
108 type: Directory
109 name: registration-dir
View as plain text