mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
test/e2e/storage: replace mock driver with hostpath driver
This is a first step towards removing the mock CSI driver completely from e2e testing in favor of hostpath plugin. With the recent hostpath plugin changes(PR #260, #269), it supports all the features supported by the mock csi driver. Using hostpath-plugin for testing also covers CSI persistent feature usecases.
This commit is contained in:
parent
2ac6a4121f
commit
e68c9f3dec
@ -618,10 +618,10 @@ func (m *mockCSIDriver) PrepareTest(f *framework.Framework) (*storageframework.P
|
|||||||
} else {
|
} else {
|
||||||
// When using the mock driver inside the cluster it has to be reconfigured
|
// When using the mock driver inside the cluster it has to be reconfigured
|
||||||
// via command line parameters.
|
// via command line parameters.
|
||||||
containerArgs = append(containerArgs, "--name=csi-mock-"+f.UniqueName)
|
containerArgs = append(containerArgs, "--drivername=csi-mock-"+f.UniqueName)
|
||||||
|
|
||||||
if !m.attachable {
|
if m.attachable {
|
||||||
containerArgs = append(containerArgs, "--disable-attach")
|
containerArgs = append(containerArgs, "--enable-attach")
|
||||||
}
|
}
|
||||||
|
|
||||||
if m.enableTopology {
|
if m.enableTopology {
|
||||||
|
@ -53,10 +53,13 @@ spec:
|
|||||||
- mountPath: /registration
|
- mountPath: /registration
|
||||||
name: registration-dir
|
name: registration-dir
|
||||||
- name: mock
|
- name: mock
|
||||||
image: k8s.gcr.io/sig-storage/mock-driver:v4.1.0
|
image: k8s.gcr.io/sig-storage/hostpathplugin:v1.7.3
|
||||||
args:
|
args:
|
||||||
- "--name=mock.storage.k8s.io"
|
- "--drivername=mock.storage.k8s.io"
|
||||||
- "-v=3" # enabled the gRPC call logging
|
- "--nodeid=$(KUBE_NODE_NAME)"
|
||||||
|
- "--endpoint=/csi/csi.sock"
|
||||||
|
- "--statedir=/tmp/csi-hotpath-data"
|
||||||
|
- "-v=5" # enabled the gRPC call logging
|
||||||
env:
|
env:
|
||||||
- name: CSI_ENDPOINT
|
- name: CSI_ENDPOINT
|
||||||
value: /csi/csi.sock
|
value: /csi/csi.sock
|
||||||
@ -74,6 +77,8 @@ spec:
|
|||||||
name: kubelet-pods-dir
|
name: kubelet-pods-dir
|
||||||
- mountPath: /var/lib/kubelet/plugins/kubernetes.io/csi
|
- mountPath: /var/lib/kubelet/plugins/kubernetes.io/csi
|
||||||
name: kubelet-csi-dir
|
name: kubelet-csi-dir
|
||||||
|
- mountPath: /dev
|
||||||
|
name: dev-dir
|
||||||
volumes:
|
volumes:
|
||||||
- hostPath:
|
- hostPath:
|
||||||
path: /var/lib/kubelet/plugins/csi-mock
|
path: /var/lib/kubelet/plugins/csi-mock
|
||||||
@ -93,3 +98,7 @@ spec:
|
|||||||
path: /var/lib/kubelet/plugins_registry
|
path: /var/lib/kubelet/plugins_registry
|
||||||
type: Directory
|
type: Directory
|
||||||
name: registration-dir
|
name: registration-dir
|
||||||
|
- hostPath:
|
||||||
|
path: /dev
|
||||||
|
type: Directory
|
||||||
|
name: dev-dir
|
||||||
|
@ -53,16 +53,20 @@ spec:
|
|||||||
- mountPath: /registration
|
- mountPath: /registration
|
||||||
name: registration-dir
|
name: registration-dir
|
||||||
- name: mock
|
- name: mock
|
||||||
image: k8s.gcr.io/sig-storage/mock-driver:v4.1.0
|
image: k8s.gcr.io/sig-storage/hostpathplugin:v1.7.3
|
||||||
args:
|
args:
|
||||||
# -v3 shows when connections get established. Higher log levels print information about
|
- -v=5
|
||||||
# transferred bytes, but cannot print message content (no gRPC parsing), so this is usually
|
- -nodeid=$(KUBE_NODE_NAME)
|
||||||
# not interesting.
|
- -endpoint=/csi/csi.sock
|
||||||
- -v=3
|
|
||||||
- -proxy-endpoint=tcp://:9000
|
- -proxy-endpoint=tcp://:9000
|
||||||
env:
|
env:
|
||||||
- name: CSI_ENDPOINT
|
- name: CSI_ENDPOINT
|
||||||
value: /csi/csi.sock
|
value: /csi/csi.sock
|
||||||
|
- name: KUBE_NODE_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: spec.nodeName
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 9000
|
- containerPort: 9000
|
||||||
name: socat
|
name: socat
|
||||||
|
Loading…
Reference in New Issue
Block a user