mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 18:02:01 +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 {
|
||||
// When using the mock driver inside the cluster it has to be reconfigured
|
||||
// via command line parameters.
|
||||
containerArgs = append(containerArgs, "--name=csi-mock-"+f.UniqueName)
|
||||
containerArgs = append(containerArgs, "--drivername=csi-mock-"+f.UniqueName)
|
||||
|
||||
if !m.attachable {
|
||||
containerArgs = append(containerArgs, "--disable-attach")
|
||||
if m.attachable {
|
||||
containerArgs = append(containerArgs, "--enable-attach")
|
||||
}
|
||||
|
||||
if m.enableTopology {
|
||||
|
@ -53,10 +53,13 @@ spec:
|
||||
- mountPath: /registration
|
||||
name: registration-dir
|
||||
- name: mock
|
||||
image: k8s.gcr.io/sig-storage/mock-driver:v4.1.0
|
||||
image: k8s.gcr.io/sig-storage/hostpathplugin:v1.7.3
|
||||
args:
|
||||
- "--name=mock.storage.k8s.io"
|
||||
- "-v=3" # enabled the gRPC call logging
|
||||
- "--drivername=mock.storage.k8s.io"
|
||||
- "--nodeid=$(KUBE_NODE_NAME)"
|
||||
- "--endpoint=/csi/csi.sock"
|
||||
- "--statedir=/tmp/csi-hotpath-data"
|
||||
- "-v=5" # enabled the gRPC call logging
|
||||
env:
|
||||
- name: CSI_ENDPOINT
|
||||
value: /csi/csi.sock
|
||||
@ -74,6 +77,8 @@ spec:
|
||||
name: kubelet-pods-dir
|
||||
- mountPath: /var/lib/kubelet/plugins/kubernetes.io/csi
|
||||
name: kubelet-csi-dir
|
||||
- mountPath: /dev
|
||||
name: dev-dir
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /var/lib/kubelet/plugins/csi-mock
|
||||
@ -93,3 +98,7 @@ spec:
|
||||
path: /var/lib/kubelet/plugins_registry
|
||||
type: Directory
|
||||
name: registration-dir
|
||||
- hostPath:
|
||||
path: /dev
|
||||
type: Directory
|
||||
name: dev-dir
|
||||
|
@ -53,16 +53,20 @@ spec:
|
||||
- mountPath: /registration
|
||||
name: registration-dir
|
||||
- name: mock
|
||||
image: k8s.gcr.io/sig-storage/mock-driver:v4.1.0
|
||||
image: k8s.gcr.io/sig-storage/hostpathplugin:v1.7.3
|
||||
args:
|
||||
# -v3 shows when connections get established. Higher log levels print information about
|
||||
# transferred bytes, but cannot print message content (no gRPC parsing), so this is usually
|
||||
# not interesting.
|
||||
- -v=3
|
||||
- -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
|
||||
|
Loading…
Reference in New Issue
Block a user