CSI e2e test: driver registrar updates for moving PluginWatcher to beta

This commit is contained in:
Cheng Xing 2018-09-04 18:10:31 -07:00 committed by Renaud Gaubert
parent a92bb07ab1
commit add6e0d7bb
2 changed files with 25 additions and 2 deletions

View File

@ -41,7 +41,7 @@ var csiImageVersions = map[string]string{
"hostpathplugin": "v0.2.0", "hostpathplugin": "v0.2.0",
"csi-attacher": "v0.2.0", "csi-attacher": "v0.2.0",
"csi-provisioner": "v0.2.1", "csi-provisioner": "v0.2.1",
"driver-registrar": "v0.2.0", "driver-registrar": "v0.3.0",
} }
func csiContainerImage(image string) string { func csiContainerImage(image string) string {
@ -239,6 +239,7 @@ func csiHostPathPod(
Args: []string{ Args: []string{
"--v=5", "--v=5",
"--csi-address=/csi/csi.sock", "--csi-address=/csi/csi.sock",
"--kubelet-registration-path=/var/lib/kubelet/plugins/csi-hostpath/csi.sock",
}, },
Env: []v1.EnvVar{ Env: []v1.EnvVar{
{ {
@ -255,6 +256,10 @@ func csiHostPathPod(
Name: "socket-dir", Name: "socket-dir",
MountPath: "/csi", MountPath: "/csi",
}, },
{
Name: "registration-dir",
MountPath: "/registration",
},
}, },
}, },
{ {
@ -327,6 +332,15 @@ func csiHostPathPod(
}, },
}, },
}, },
{
Name: "registration-dir",
VolumeSource: v1.VolumeSource{
HostPath: &v1.HostPathVolumeSource{
Path: "/var/lib/kubelet/plugins",
Type: &hostPathType,
},
},
},
{ {
Name: "mountpoint-dir", Name: "mountpoint-dir",
VolumeSource: v1.VolumeSource{ VolumeSource: v1.VolumeSource{

View File

@ -16,13 +16,16 @@ spec:
containers: containers:
- name: csi-driver-registrar - name: csi-driver-registrar
imagePullPolicy: Always imagePullPolicy: Always
image: quay.io/k8scsi/driver-registrar:v0.2.0 image: quay.io/k8scsi/driver-registrar:v0.3.0
args: args:
- "--v=5" - "--v=5"
- "--csi-address=$(ADDRESS)" - "--csi-address=$(ADDRESS)"
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
env: env:
- name: ADDRESS - name: ADDRESS
value: /csi/csi.sock value: /csi/csi.sock
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/com.google.csi.gcepd/csi.sock
- name: KUBE_NODE_NAME - name: KUBE_NODE_NAME
valueFrom: valueFrom:
fieldRef: fieldRef:
@ -30,6 +33,8 @@ spec:
volumeMounts: volumeMounts:
- name: plugin-dir - name: plugin-dir
mountPath: /csi mountPath: /csi
- name: registration-dir
mountPath: /registration
- name: gce-driver - name: gce-driver
securityContext: securityContext:
privileged: true privileged: true
@ -63,6 +68,10 @@ spec:
hostPath: hostPath:
path: /var/lib/kubelet/plugins/com.google.csi.gcepd/ path: /var/lib/kubelet/plugins/com.google.csi.gcepd/
type: DirectoryOrCreate type: DirectoryOrCreate
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins/
type: Directory
- name: device-dir - name: device-dir
hostPath: hostPath:
path: /dev path: /dev