Skip to content

Commit

Permalink
NVMe Doc Based changes (#65)
Browse files Browse the repository at this point in the history
* NVMe Doc Based Changes

* Secret Changes

* Secret Changes
  • Loading branch information
harshitap26 authored Mar 3, 2022
1 parent 1a790e3 commit 1e3e234
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 124 deletions.
2 changes: 1 addition & 1 deletion pkg/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const (
// PublishContextNVMETargetsPrefix indicates publish context NVMe targets prefix
PublishContextNVMETargetsPrefix = "NVMETARGET"
// NVMETransport indicates that NVMe is chosen as a transport protocol
NVMETransport TransportType = "NVME"
NVMETransport TransportType = "NVMETCP"
// PublishContextFCWWPNPrefix indicates publish context FC WWPN prefix
PublishContextFCWWPNPrefix = "FCWWPN"
// WWNPrefix indicates WWN prefix
Expand Down
2 changes: 1 addition & 1 deletion pkg/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ func (s *Service) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest)
for _, target := range nvmeTargets {
err = s.nvmeLib.NVMeConnect(target)
if err == nil {
log.Error("NVMe connection successful")
log.Infof("NVMe connection successful")
}
}
}
Expand Down
149 changes: 75 additions & 74 deletions samples/secret/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,74 +1,75 @@
# You can apply current config to Kubernetes cluster by running following command:
#
# kubectl create secret generic powerstore-config -n csi-powerstore --from-file=config=secret.yaml
#
arrays:
# endpoint: full URL path to the PowerStore API
# Allowed Values: https://*.*.*.*/api/rest
# Default Value: None
- endpoint: "https://10.0.0.1/api/rest"

# globalID: unique id of the PowerStore array
# Allowed Values: string
# Default Value: None
globalID: "unique"

# username: username for connecting to API
# Allowed Values: string
# Default Value: None
username: "user"

# password: password for connecting to API
# Allowed Values: string
# Default Value: None
password: "password"

# skipCertificateValidation: indicates if client side validation of (management)server's certificate can be skipped
# Allowed Values:
# true: client side validation of (management)server's certificate will be skipped
# false: client side validation of (management)server's certificate will not be skipped
# Default Value: None
skipCertificateValidation: true

# isDefault: treat current array as a default
# Allowed Values:
# true: would be used by storage classes without arrayID parameter
# false: would not be used by default
# Default Value: false
isDefault: true

# blockProtocol: what SCSI transport protocol use on node side (FC, ISCSI, None, or auto)
# Allowed Values:
# FC: FC protocol will be used
# ISCSI: iSCSI protocol will be used
# None: No block protocol can be used
# auto: FC or iSCSI protocol will be used
# Default Value: None
blockProtocol: "auto"

# nasName: what NAS should be used for NFS volumes
# Allowed Values: string - (name of NAS server)
# Default Value: None
nasName: "nas-server"

# nfsAcls: enables setting permissions on NFS mount directory
# This value will be used if a storage class does not have the NFS ACL (nfsAcls) parameter specified
# Permissions can be specified in two formats:
# 1) Unix mode (NFSv3)
# 2) NFSv4 ACLs (NFSv4)
# NFSv4 ACLs are supported on NFSv4 share only.
# Allowed values:
# 1) Unix mode: valid octal mode number
# Examples: "0777", "777", "0755"
# 2) NFSv4 acls: valid NFSv4 acls, seperated by comma
# Examples: "A::OWNER@:RWX,A::GROUP@:RWX", "A::OWNER@:rxtncy"
# Optional: true
# Default value: "0777"
# nfsAcls: "0777"

- endpoint: "https://11.0.0.1/api/rest"
globalID: "unique"
username: "user"
password: "password"
skipCertificateValidation: true
blockProtocol: "FC"
# You can apply current config to Kubernetes cluster by running following command:
#
# kubectl create secret generic powerstore-config -n csi-powerstore --from-file=config=secret.yaml
#
arrays:
# endpoint: full URL path to the PowerStore API
# Allowed Values: https://*.*.*.*/api/rest
# Default Value: None
- endpoint: "https://10.0.0.1/api/rest"

# globalID: unique id of the PowerStore array
# Allowed Values: string
# Default Value: None
globalID: "unique"

# username: username for connecting to API
# Allowed Values: string
# Default Value: None
username: "user"

# password: password for connecting to API
# Allowed Values: string
# Default Value: None
password: "password"

# skipCertificateValidation: indicates if client side validation of (management)server's certificate can be skipped
# Allowed Values:
# true: client side validation of (management)server's certificate will be skipped
# false: client side validation of (management)server's certificate will not be skipped
# Default Value: None
skipCertificateValidation: true

# isDefault: treat current array as a default
# Allowed Values:
# true: would be used by storage classes without arrayID parameter
# false: would not be used by default
# Default Value: false
isDefault: true

# blockProtocol: what SCSI transport protocol use on node side (FC, ISCSI, NVMeTCP, None, or auto)
# Allowed Values:
# FC: FC protocol will be used
# ISCSI: iSCSI protocol will be used
# NVMeTCP: NVMe/TCP protocol will be used
# None: No block protocol can be used
# auto: FC, iSCSI or NVMe/TCP protocol will be used
# Default Value: None
blockProtocol: "auto"

# nasName: what NAS should be used for NFS volumes
# Allowed Values: string - (name of NAS server)
# Default Value: None
nasName: "nas-server"

# nfsAcls: enables setting permissions on NFS mount directory
# This value will be used if a storage class does not have the NFS ACL (nfsAcls) parameter specified
# Permissions can be specified in two formats:
# 1) Unix mode (NFSv3)
# 2) NFSv4 ACLs (NFSv4)
# NFSv4 ACLs are supported on NFSv4 share only.
# Allowed values:
# 1) Unix mode: valid octal mode number
# Examples: "0777", "777", "0755"
# 2) NFSv4 acls: valid NFSv4 acls, seperated by comma
# Examples: "A::OWNER@:RWX,A::GROUP@:RWX", "A::OWNER@:rxtncy"
# Optional: true
# Default value: "0777"
# nfsAcls: "0777"

- endpoint: "https://11.0.0.1/api/rest"
globalID: "unique"
username: "user"
password: "password"
skipCertificateValidation: true
blockProtocol: "FC"
96 changes: 48 additions & 48 deletions samples/storageclass/powerstore-topology.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
# topology can be used with any other SC as well
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: "powerstore-topology"
provisioner: "csi-powerstore.dellemc.com"
parameters:
# arrayID: id of array to be used for volumes
# Allowed values: arrayID corresponding to array's globalID specified in secret.yaml
# Optional: false
# Default value: None
arrayID: "Unique"

# reclaimPolicy: PVs that are dynamically created by a StorageClass will have the reclaim policy specified here
# Allowed values:
# Reclaim: retain the PV after PVC deletion
# Delete: delete the PV after PVC deletion
# Optional: true
# Default value: Delete
reclaimPolicy: Delete

# allowVolumeExpansion: allows the users to resize the volume by editing the corresponding PVC object
# Allowed values:
# true: allow users to resize the PVC
# false: does not allow users to resize the PVC
# Optional: true
# Default value: false
allowVolumeExpansion: true

# volumeBindingMode controls when volume binding and dynamic provisioning should occur.
# Allowed values:
# Immediate: indicates that volume binding and dynamic provisioning occurs once the
# PersistentVolumeClaim is created
# WaitForFirstConsumer: will delay the binding and provisioning of a PersistentVolume (must use this with topology)
# until a Pod using the PersistentVolumeClaim is created
# Optional: true
# Default value: Immediate
volumeBindingMode: WaitForFirstConsumer

# allowedTopologies: helps scheduling pods on worker nodes which match all of below expressions.
# replace "-iscsi" with "-fc" or "-nfs" at the end to use FC or NFS enabled hosts
# replace "12.34.56.78" with PowerStore endpoint IP
# Optional: true
allowedTopologies:
- matchLabelExpressions:
- key: "csi-powerstore.dellemc.com/12.34.56.78-iscsi"
values:
- "true"
# topology can be used with any other SC as well
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: "powerstore-topology"
provisioner: "csi-powerstore.dellemc.com"
parameters:
# arrayID: id of array to be used for volumes
# Allowed values: arrayID corresponding to array's globalID specified in secret.yaml
# Optional: false
# Default value: None
arrayID: "Unique"

# reclaimPolicy: PVs that are dynamically created by a StorageClass will have the reclaim policy specified here
# Allowed values:
# Reclaim: retain the PV after PVC deletion
# Delete: delete the PV after PVC deletion
# Optional: true
# Default value: Delete
reclaimPolicy: Delete

# allowVolumeExpansion: allows the users to resize the volume by editing the corresponding PVC object
# Allowed values:
# true: allow users to resize the PVC
# false: does not allow users to resize the PVC
# Optional: true
# Default value: false
allowVolumeExpansion: true

# volumeBindingMode controls when volume binding and dynamic provisioning should occur.
# Allowed values:
# Immediate: indicates that volume binding and dynamic provisioning occurs once the
# PersistentVolumeClaim is created
# WaitForFirstConsumer: will delay the binding and provisioning of a PersistentVolume (must use this with topology)
# until a Pod using the PersistentVolumeClaim is created
# Optional: true
# Default value: Immediate
volumeBindingMode: WaitForFirstConsumer

# allowedTopologies: helps scheduling pods on worker nodes which match all of below expressions.
# replace "-iscsi" with "-fc", "-nvme", or "-nfs" at the end to use FC, NVME, or NFS enabled hosts
# replace "12.34.56.78" with PowerStore endpoint IP
# Optional: true
allowedTopologies:
- matchLabelExpressions:
- key: "csi-powerstore.dellemc.com/12.34.56.78-iscsi"
values:
- "true"

0 comments on commit 1e3e234

Please sign in to comment.