Merge branch 'master' into nfs

This commit is contained in:
Luis Pabón 2018-03-14 14:57:55 -04:00 committed by GitHub
commit db37f4e656
2 changed files with 11 additions and 5 deletions

View File

@ -51,6 +51,10 @@ func NewDriver(nodeID, endpoint string) *driver {
csiDriver := csicommon.NewCSIDriver(driverName, version, nodeID) csiDriver := csicommon.NewCSIDriver(driverName, version, nodeID)
csiDriver.AddVolumeCapabilityAccessModes([]csi.VolumeCapability_AccessMode_Mode{csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER}) csiDriver.AddVolumeCapabilityAccessModes([]csi.VolumeCapability_AccessMode_Mode{csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER})
// NFS plugin does not support ControllerServiceCapability now.
// If support is added, it should set to appropriate
// ControllerServiceCapability RPC types.
csiDriver.AddControllerServiceCapabilities([]csi.ControllerServiceCapability_RPC_Type{csi.ControllerServiceCapability_RPC_UNKNOWN})
d.csiDriver = csiDriver d.csiDriver = csiDriver
@ -67,7 +71,8 @@ func (d *driver) Run() {
s := csicommon.NewNonBlockingGRPCServer() s := csicommon.NewNonBlockingGRPCServer()
s.Start(d.endpoint, s.Start(d.endpoint,
csicommon.NewDefaultIdentityServer(d.csiDriver), csicommon.NewDefaultIdentityServer(d.csiDriver),
csicommon.NewDefaultControllerServer(d.csiDriver), // NFS plugin has not implemented ControllerServer.
nil,
NewNodeServer(d)) NewNodeServer(d))
s.Wait() s.Wait()
} }

View File

@ -4,16 +4,17 @@ metadata:
name: data-nfsplugin name: data-nfsplugin
labels: labels:
name: data-nfsplugin name: data-nfsplugin
annotations:
csi.volume.kubernetes.io/volume-attributes: '{"server": "10.10.10.10", "share": "share"}'
spec: spec:
accessModes: accessModes:
- ReadWriteOnce - ReadWriteMany
capacity: capacity:
storage: 100Gi storage: 100Gi
csi: csi:
driver: csi-nfsplugin driver: csi-nfsplugin
volumeHandle: data-id volumeHandle: data-id
volumeAttributes:
server: 127.0.0.1
share: /export
--- ---
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
@ -21,7 +22,7 @@ metadata:
name: data-nfsplugin name: data-nfsplugin
spec: spec:
accessModes: accessModes:
- ReadWriteOnce - ReadWriteMany
resources: resources:
requests: requests:
storage: 100Gi storage: 100Gi