mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-18 07:34:12 +00:00
110 lines
3.5 KiB
YAML
110 lines
3.5 KiB
YAML
kind: StatefulSet
|
|
apiVersion: apps/v1
|
|
metadata:
|
|
name: csi-mockplugin
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: csi-mockplugin
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: csi-mockplugin
|
|
spec:
|
|
serviceAccountName: csi-mock
|
|
containers:
|
|
- name: csi-provisioner
|
|
image: registry.k8s.io/sig-storage/csi-provisioner:v3.4.0
|
|
args:
|
|
- "--csi-address=$(ADDRESS)"
|
|
# Topology support is needed for the pod rescheduling test
|
|
# ("storage capacity" in csi_mock_volume.go).
|
|
- "--feature-gates=Topology=true"
|
|
- "-v=5"
|
|
- "--timeout=1m"
|
|
# Needed for fsGroup support.
|
|
- "--default-fstype=ext4"
|
|
# We don't need much concurrency and having many gouroutines
|
|
# makes klog.Fatal during shutdown very long.
|
|
- "--worker-threads=5"
|
|
env:
|
|
- name: ADDRESS
|
|
value: /csi/csi.sock
|
|
volumeMounts:
|
|
- mountPath: /csi
|
|
name: socket-dir
|
|
- name: driver-registrar
|
|
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.5.1
|
|
args:
|
|
- --v=5
|
|
- --csi-address=/csi/csi.sock
|
|
- --kubelet-registration-path=/var/lib/kubelet/plugins/csi-mock/csi.sock
|
|
- --timeout=1m
|
|
env:
|
|
- name: KUBE_NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: spec.nodeName
|
|
volumeMounts:
|
|
- mountPath: /csi
|
|
name: socket-dir
|
|
- mountPath: /registration
|
|
name: registration-dir
|
|
- name: mock
|
|
image: registry.k8s.io/sig-storage/hostpathplugin:v1.9.0
|
|
args:
|
|
- -v=5
|
|
- -nodeid=$(KUBE_NODE_NAME)
|
|
- -endpoint=/csi/csi.sock
|
|
- -proxy-endpoint=tcp://:9000
|
|
env:
|
|
- name: CSI_ENDPOINT
|
|
value: /csi/csi.sock
|
|
- name: KUBE_NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: spec.nodeName
|
|
ports:
|
|
- containerPort: 9000
|
|
name: socat
|
|
volumeMounts:
|
|
- mountPath: /csi
|
|
name: socket-dir
|
|
# The busybox container is needed for running shell commands which
|
|
# test for directories or create them. It needs additional privileges
|
|
# for that.
|
|
- name: busybox
|
|
image: registry.k8s.io/e2e-test-images/busybox:1.29-2
|
|
securityContext:
|
|
privileged: true
|
|
command:
|
|
- sleep
|
|
- "100000"
|
|
volumeMounts:
|
|
- mountPath: /var/lib/kubelet/pods
|
|
name: kubelet-pods-dir
|
|
- mountPath: /var/lib/kubelet/plugins/kubernetes.io/csi
|
|
name: kubelet-csi-dir
|
|
volumes:
|
|
- hostPath:
|
|
path: /var/lib/kubelet/plugins/csi-mock
|
|
type: DirectoryOrCreate
|
|
name: socket-dir
|
|
- hostPath:
|
|
path: /var/lib/kubelet/pods
|
|
type: Directory
|
|
# mock driver doesn't make mounts and therefore doesn't need mount propagation.
|
|
# mountPropagation: Bidirectional
|
|
name: kubelet-pods-dir
|
|
- hostPath:
|
|
path: /var/lib/kubelet/plugins/kubernetes.io/csi
|
|
type: DirectoryOrCreate
|
|
name: kubelet-csi-dir
|
|
- hostPath:
|
|
path: /var/lib/kubelet/plugins_registry
|
|
type: Directory
|
|
name: registration-dir
|