Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Nfs-support branch into main #215

Merged
merged 32 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d9a363c
Add CheckNFS functionality to check the NFS support for given powerfl…
VamsiSiddu-7 Apr 17, 2023
43a666a
Added new storageclass for NFS support (#181)
KshitijaKakde Apr 17, 2023
5aa5499
helm chart update for nfs support (#183)
khareRajshree Apr 18, 2023
aa6ba28
Check nfs (#185)
khareRajshree Apr 25, 2023
d385858
Add helm tests for nfs feature (#188)
VamsiSiddu-7 May 2, 2023
1da78c4
making one signed commit (#187)
ashleyvjoy May 2, 2023
4be7c48
Create NFS volume (#189)
khareRajshree May 11, 2023
2492d61
Nfs controller publish Changes (#190)
VamsiSiddu-7 May 12, 2023
7c0ce7c
Update NodePublish Volume for nfs. (#193)
VamsiSiddu-7 May 16, 2023
8ed7afa
update nodeunpublish volume for nfs changes. (#211)
VamsiSiddu-7 Jun 27, 2023
3420779
added delete filesystem support in deletevolume (#212)
ashleyvjoy Jun 27, 2023
43606b3
controller unpublish changes added (#214)
KshitijaKakde Jun 27, 2023
cb278e5
Merge branch 'main' of https://github.com/dell/csi-powerflex into nfs…
VamsiSiddu-7 Jul 5, 2023
133fda7
update build_ubi_micro.sh to include nfs-utils.
VamsiSiddu-7 Jul 5, 2023
05c8a78
fix lint and unit-test failures.
VamsiSiddu-7 Jul 5, 2023
f4f4212
fixed the gosec failures.
VamsiSiddu-7 Jul 5, 2023
6d102f1
fix replication unit test failure.
VamsiSiddu-7 Jul 5, 2023
92606b4
add unit tests for nfs.
VamsiSiddu-7 Jul 8, 2023
303523b
fixed the unit test failure.
VamsiSiddu-7 Jul 9, 2023
e4a0e16
add induced errors to get handler.
VamsiSiddu-7 Jul 9, 2023
8faa254
add unit tests for delete control node publish unpublish fns.
VamsiSiddu-7 Jul 9, 2023
8e0773a
fixed the unit test failures.
VamsiSiddu-7 Jul 9, 2023
b78bad5
add more unit tests.
VamsiSiddu-7 Jul 9, 2023
f970ba6
NFS: expand volume operation added (#216)
khareRajshree Jul 13, 2023
1b65da4
linting errors resolved
khareRajshree Jul 14, 2023
74b7b36
unit tests added for expand NFS volume
khareRajshree Jul 14, 2023
1332dc5
unit tests added for expand NFS volume
khareRajshree Jul 14, 2023
72cc00f
unit tests added for expand NFS volume
khareRajshree Jul 14, 2023
5d9e846
add more unit-test.
VamsiSiddu-7 Jul 16, 2023
108ea07
add more unit tests.
VamsiSiddu-7 Jul 18, 2023
b0a1e3f
add more unit tests for coverage.
VamsiSiddu-7 Jul 20, 2023
74f4482
addressed review comments.
VamsiSiddu-7 Jul 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/dell/dell-csi-extensions/volumeGroupSnapshot v1.2.3-0.20230517135918-9920e636bff1
github.com/dell/gocsi v1.7.0
github.com/dell/gofsutil v1.12.0
github.com/dell/goscaleio v1.10.0
github.com/dell/goscaleio v1.11.1-0.20230707063208-b67372e0f8d0
github.com/fsnotify/fsnotify v1.5.1
github.com/golang/protobuf v1.5.3
github.com/google/uuid v1.3.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ github.com/dell/gocsi v1.7.0 h1:fMQO2zwAXCaIsUoPCcnnuPMwfQMoaI1/0aqkQVndlxU=
github.com/dell/gocsi v1.7.0/go.mod h1:X/8Ll8qqKAKCenmd1gPJMUvUmgY8cK0LiS8Pck12UaU=
github.com/dell/gofsutil v1.12.0 h1:oo2YHfGFKHvHS1urtqjOIKpaHwcdyqacwKHLXzUg33M=
github.com/dell/gofsutil v1.12.0/go.mod h1:mGMN5grVDtHv2imNw5+gFr2RmCqeyYgBFBldUbHtV78=
github.com/dell/goscaleio v1.10.0 h1:XCEI9j+IlbqNPY7uvBjNNlT0Nt2PMXlnyxUavmennVY=
github.com/dell/goscaleio v1.10.0/go.mod h1:Zh2iQ44Jd8FMqU2h+rT5x1K6mdPMKQ15lkFxojU4z3w=
github.com/dell/goscaleio v1.11.1-0.20230707063208-b67372e0f8d0 h1:3GqvTjqCAAG6y8FDUtKRR9q/Uj5lKD1hFD6w7FTzhww=
github.com/dell/goscaleio v1.11.1-0.20230707063208-b67372e0f8d0/go.mod h1:dMTrHnXSsPus+Kd9mrs0JuyrCndoKvFP/bbEdc21Bi8=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
Expand Down
8 changes: 8 additions & 0 deletions helm/csi-vxflexos/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,14 @@ spec:
value: "{{ .Values.controller.healthMonitor.enabled }}"
{{- end }}
{{- end }}
{{- if hasKey .Values "nfsAcls" }}
- name: X_CSI_NFS_ACLS
value: "{{ .Values.nfsAcls }}"
{{- end }}
{{- if hasKey .Values "externalAccess" }}
- name: X_CSI_POWERFLEX_EXTERNAL_ACCESS
value: "{{ .Values.externalAccess }}"
{{- end }}
volumeMounts:
- name: socket-dir
mountPath: /var/run/csi
Expand Down
20 changes: 20 additions & 0 deletions helm/csi-vxflexos/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ kubeletConfigDir: /var/lib/kubelet
# Default value: none
defaultFsType: ext4

# externalAccess: allows to specify additional entries for host to access NFS volumes. Both single IP address and subnet are valid entries.
# Allowed Values: x.x.x.x/xx or x.x.x.x
# Default Value: None
externalAccess:

# imagePullPolicy: Policy to determine if the image should be pulled prior to starting the container.
# Allowed values:
# Always: Always pull the image.
Expand All @@ -46,6 +51,21 @@ defaultFsType: ext4
# Default value: None
imagePullPolicy: IfNotPresent

# nfsAcls: enables setting permissions on NFS mount directory
# This value acts as default value for NFS ACL (nfsAcls), if not specified for an array config in secret
# 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"

# "enablesnapshotcgdelete"- a boolean that, when enabled, will delete all snapshots in a consistency group
# everytime a snap in the group is deleted
# Allowed values: true, false
Expand Down
22 changes: 22 additions & 0 deletions samples/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,28 @@
# defines the MDM(s) that SDC should register with on start.
# Allowed values: a list of IP addresses or hostnames separated by comma.
# Default value: none

# NFS is only supported on arrays >= 4.0
# 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"

mdm: "10.0.0.1,10.0.0.2"
- username: "admin"
password: "Password123"
Expand Down
97 changes: 97 additions & 0 deletions samples/storageclass/storageclass-nfs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: vxflexos-nfs
provisioner: csi-vxflexos.dellemc.com
# 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
parameters:
# Storage pool to use on system
# Optional: false
storagepool: <STORAGE_POOL> # Insert Storage pool
# Protection domain that storage pool above belongs to
# Needed if array has two storagepools that share the same name, but belong to different protection domains
# Optional: true
# Uncomment the line below if you want to use protectiondomain
# protectiondomain: # Insert Protection domain name
# System you would like this storage class to use
# Allowed values: one string for system ID
# Optional: false
systemID: <SYSTEM_ID> # Insert System ID
# format options to pass to mkfs
# Allowed values: A string dictating the fs options you want passed
# Optional: true
# Uncomment the line below if you want to use mkfsFormatOption
# mkfsFormatOption: "<mkfs_format_option>" # Insert file system format option
# Filesytem type for volumes created by storageclass
# Default value: None if defaultFsType is not mentioned in values.yaml
# Else defaultFsType value mentioned in values.yaml
# will be used as default value
csi.storage.k8s.io/fstype: nfs
# Limit the volume network bandwidth
# Value is a positive number in granularity of 1024 Kbps; 0 = unlimited
# Allowed values: one string for bandwidth limit in Kbps
# Optional: false
# Uncomment the line below if you want to use bandwidthLimitInKbps
# bandwidthLimitInKbps: <BANDWIDTH_LIMIT_IN_KBPS> # Insert bandwidth limit in Kbps
# Limit the volume IOPS
# The number of IOPS must be greater than 10; 0 = unlimited
# Allowed values: one string for iops limit
# Optional: false
# Uncomment the line below if you want to use iopsLimit
# iopsLimit: <IOPS_LIMIT> # Insert iops limit

# nasName: NAS server's name. If not specified, value from secret.yaml will be used
# Allowed values: string
# Optional: true
# Default value: None
nasName: "nas-server"

# allowRoot: enables or disables root squashing (valid only for NFS)
# Allowed values:
# true: will allow root users to use their privileges
# false: will prevent root users on NFS clients from exercising root privileges on the NFS server
# Optional: true
# Default value: false
allowRoot: "false"

# nfsAcls: enables setting permissions on NFS mount directory
# This value overrides the NFS ACL (nfsAcls) attribute of corresponding array config in secret, if present
# 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"

# volumeBindingMode determines how volume binding and dynamic provisioning should occur
# Allowed values:
# Immediate: volume binding and dynamic provisioning occurs once PVC is created
# WaitForFirstConsumer: delay the binding and provisioning of PV until a pod using the PVC is created.
# Optional: false
# Default value: WaitForFirstConsumer (required for topology section below)
volumeBindingMode: WaitForFirstConsumer
# allowedTopologies helps scheduling pods on worker nodes which match all of below expressions.
allowedTopologies:
- matchLabelExpressions:
- key: csi-vxflexos.dellemc.com/<SYSTEM_ID>-nfs # Insert System ID
values:
- "true"
2 changes: 1 addition & 1 deletion scripts/build_ubi_micro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

microcontainer=$(buildah from $1)
micromount=$(buildah mount $microcontainer)
dnf install --installroot $micromount --releasever=8 --nodocs --setopt install_weak_deps=false --setopt=reposdir=/etc/yum.repos.d/ e4fsprogs xfsprogs libaio kmod numactl util-linux -y
dnf install --installroot $micromount --releasever=8 --nodocs --setopt install_weak_deps=false --setopt=reposdir=/etc/yum.repos.d/ e4fsprogs xfsprogs libaio kmod numactl util-linux nfs-utils -y
dnf clean all --installroot $micromount
buildah umount $microcontainer
buildah commit $microcontainer csipowerflex-ubimicro
Loading