From 1ba846ce4e98a3b1a8c0f59899f479803b050cbe Mon Sep 17 00:00:00 2001 From: wisererik Date: Wed, 25 Apr 2018 14:57:04 +0800 Subject: [PATCH] Update kubernetes deploy script of CSI plugin --- .../kubernetes/csi-nodeplugin-opensdsplugin.yaml | 10 +++++----- csi/server/plugin/opensds/controller.go | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/csi/server/deploy/kubernetes/csi-nodeplugin-opensdsplugin.yaml b/csi/server/deploy/kubernetes/csi-nodeplugin-opensdsplugin.yaml index 044d92c33..f60934e24 100644 --- a/csi/server/deploy/kubernetes/csi-nodeplugin-opensdsplugin.yaml +++ b/csi/server/deploy/kubernetes/csi-nodeplugin-opensdsplugin.yaml @@ -24,14 +24,14 @@ spec: - "--csi-address=$(ADDRESS)" env: - name: ADDRESS - value: /csi/csi.sock + value: /var/lib/kubelet/plugins/csi-opensdsplugin/csi.sock - name: KUBE_NODE_NAME valueFrom: fieldRef: fieldPath: spec.nodeName volumeMounts: - name: socket-dir - mountPath: /csi + mountPath: /var/lib/kubelet/plugins/csi-opensdsplugin - name: opensds securityContext: privileged: true @@ -44,7 +44,7 @@ spec: - "--opensdsEndpoint=$(OPENSDS_ENDPOINT)" env: - name: CSI_ENDPOINT - value: unix://csi/csi.sock + value: unix://var/lib/kubelet/plugins/csi-opensdsplugin/csi.sock - name: OPENSDS_ENDPOINT valueFrom: configMapKeyRef: @@ -53,7 +53,7 @@ spec: imagePullPolicy: "IfNotPresent" volumeMounts: - name: socket-dir - mountPath: /csi + mountPath: /var/lib/kubelet/plugins/csi-opensdsplugin - name: pods-mount-dir mountPath: /var/lib/kubelet/pods mountPropagation: "Bidirectional" @@ -67,7 +67,7 @@ spec: volumes: - name: socket-dir hostPath: - path: /csi + path: /var/lib/kubelet/plugins/csi-opensdsplugin type: DirectoryOrCreate - name: pods-mount-dir hostPath: diff --git a/csi/server/plugin/opensds/controller.go b/csi/server/plugin/opensds/controller.go index 43f1c64fa..dbc1fc5a6 100644 --- a/csi/server/plugin/opensds/controller.go +++ b/csi/server/plugin/opensds/controller.go @@ -8,7 +8,6 @@ import ( "fmt" csi "github.com/container-storage-interface/spec/lib/go/csi/v0" - "github.com/opensds/nbp/client/iscsi" sdscontroller "github.com/opensds/nbp/client/opensds" "github.com/opensds/opensds/pkg/model" "golang.org/x/net/context" @@ -163,7 +162,6 @@ func (p *Plugin) ControllerPublishVolume( Host: req.NodeId, Platform: runtime.GOARCH, OsType: runtime.GOOS, - Ip: iscsi.GetHostIp(), Initiator: localIqn, }, Metadata: req.VolumeAttributes,