Skip to content

Commit

Permalink
Merge pull request #308 from msau42/example
Browse files Browse the repository at this point in the history
Add kubelet directories to mock driver manifest
  • Loading branch information
k8s-ci-robot authored Feb 23, 2021
2 parents 1085a56 + 671f8fc commit 6eaeb93
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 17 additions & 2 deletions mock/example/deploy/csi-mock-driver-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ spec:
securityContext:
privileged: true
- name: mock-driver
image: k8s.gcr.io/sig-storage/mock-driver:v3.1.0
image: k8s.gcr.io/sig-storage/mock-driver:v4.1.0
args:
- "--attach-limit=50"
# Required for e2e test log parsing
- "--v=5"
env:
- name: CSI_ENDPOINT
value: /csi/csi.sock
Expand All @@ -98,6 +100,10 @@ spec:
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: kubelet-pods-dir
mountPath: /var/lib/kubelet/pods
- name: kubelet-csi-dir
mountPath: /var/lib/kubelet/plugins/kubernetes.io/csi
volumes:
- name: socket-dir
hostPath:
Expand All @@ -107,7 +113,16 @@ spec:
hostPath:
path: /var/lib/kubelet/plugins_registry
type: Directory

- name: kubelet-pods-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-csi-dir
hostPath:
path: /var/lib/kubelet/plugins/kubernetes.io/csi
type: DirectoryOrCreate
---
apiVersion: storage.k8s.io/v1
kind: CSIDriver
Expand Down
2 changes: 1 addition & 1 deletion mock/service/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (s *service) NodeStageVolume(
return nil, status.Error(codes.Internal, err.Error())
}
if !exists {
status.Errorf(codes.Internal, "staging target path %s does not exist", req.StagingTargetPath)
return nil, status.Errorf(codes.Internal, "staging target path %s does not exist", req.StagingTargetPath)
}

s.volsRWL.Lock()
Expand Down

0 comments on commit 6eaeb93

Please sign in to comment.