Skip to content

Commit

Permalink
Add Multi-Availability Zone Support (#383)
Browse files Browse the repository at this point in the history
* Add availability zone secret and struct (#352)

* add availability zone secret and struct

* Add multi availability zone storage class (#353)

* Add Multi-Available Zone Functionality (#354)

* Add create volume processing for multi-az

* Adjust multi-az secret processing

* Rework secret processing

* Iterate through all topologies for a zone

* Test signing commit

* Cleanup secret retrieval and backwards compatibility of storage classes

* adapt to use new secret struct

* Add multi-az unit tests

* Fix golangci-lint issue

* Cleanup code logs

* Make zone take precendence during NodeGetInfo

* Update unit tests credentials

---------

Co-authored-by: Lau, Luke <[email protected]>

* Unit tests for Node Topologies (#358)

* Adding Unit tests

* fixing formatting issues

* Use generic zone labels (#360)

* Add zone volume creation integration tests (#359)

* Add zone volume creation integration tests

* Fix golangci-lint issue

* Create e2e zone tests

* Adjust indentation of template yaml files

* Adjust indentation of template yaml files

* Update e2e file names

* Format e2e files for golangci-lint

* Update e2e test scenarios

* Update pod templates

* Address PR comments

* Add README to e2e tests

* Update sts templates

* Added Integration tests for NodeGetInfo

* fixing linting checks

* Renaming function arguments

* Add Snapshot and Clone Support for Multi-Available Zone (#365)

* Add snapshot check and topology add during zone volume creation

* Add topology checks for clones

* Add zone snapshot and restore e2e test

* Address failed PR checks

* Update README

* Added e2e tests for clones

* Add snap and clone test (#371)

* Address PR comments

---------

Co-authored-by: Trevor Dawe <[email protected]>
Co-authored-by: Bharath Sreekanth <[email protected]>

* Driver Node should only ping arrays within the zone on which the pod is scheduled (#378)

* configure driver node service to only ping arrays in the same zone as the service.

Co-authored-by: Fernando Alfaro Campos <[email protected]>
Co-authored-by: Trevor Dawe <[email protected]>

* Fix rebase issues

* Address PR comments

* Address PR comments

* Address PR comments

---------

Co-authored-by: lukeatdell <[email protected]>
Co-authored-by: Lau, Luke <[email protected]>
Co-authored-by: Harshita Pandey <[email protected]>
Co-authored-by: Trevor Dawe <[email protected]>
Co-authored-by: Harshita Pandey <[email protected]>
Co-authored-by: Bharath Sreekanth <[email protected]>
  • Loading branch information
7 people authored Dec 19, 2024
1 parent b4f7dac commit 200b918
Show file tree
Hide file tree
Showing 44 changed files with 2,810 additions and 373 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ unit-test:

# Linux only; populate env.sh with the hardware parameters
integration-test:
( cd test/integration; sh run.sh )
( cd test/integration; sh run.sh TestIntegration )

check:
@scripts/check.sh ./provider/ ./service/
Expand Down
4 changes: 4 additions & 0 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@ export NFS_STORAGE_POOL=""
export SDC_GUID=$(/bin/emc/scaleio/drv_cfg --query_guid)
# Alternate GUID is for another system for testing expose volume to multiple hosts
export ALT_GUID=
export X_CSI_POWERFLEX_KUBE_NODE_NAME="node1"

# Interface variables
export NODE_INTERFACES="nodeName:interfaceName"

# Node Label variables
export ZONE_LABEL_KEY=""

#Debug variables for goscaleio library
export GOSCALEIO_SHOWHTTP="true"

Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module github.com/dell/csi-vxflexos/v2
go 1.23

require (
github.com/akutz/memconn v0.1.0
github.com/apparentlymart/go-cidr v1.1.0
github.com/container-storage-interface/spec v1.6.0
github.com/cucumber/godog v0.15.0
Expand All @@ -16,7 +15,7 @@ require (
github.com/dell/dell-csi-extensions/volumeGroupSnapshot v1.7.0
github.com/dell/gocsi v1.12.0
github.com/dell/gofsutil v1.17.0
github.com/dell/goscaleio v1.17.1
github.com/dell/goscaleio v1.17.2-0.20241218182509-936b677c46d5
github.com/fsnotify/fsnotify v1.8.0
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.1
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/akutz/gosync v0.1.0 h1:naxPT/aDYDh79PMwM3XmencmNQeYmpNFSZy4ZE9zIW0=
github.com/akutz/gosync v0.1.0/go.mod h1:I8I4aiqJI1nqaeYOOB1WS+CgRJVVPqhct9Y4njywM84=
github.com/akutz/memconn v0.1.0 h1:NawI0TORU4hcOMsMr11g7vwlCdkYeLKXBcxWu2W/P8A=
github.com/akutz/memconn v0.1.0/go.mod h1:Jo8rI7m0NieZyLI5e2CDlRdRqRRB4S7Xp77ukDjH+Fw=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
Expand Down Expand Up @@ -108,8 +106,8 @@ github.com/dell/gocsi v1.12.0 h1:Dn/8f2BLovo57T/aC5pP/4Eqz4h6WX8SbX+hxT5NlvQ=
github.com/dell/gocsi v1.12.0/go.mod h1:hJURrmDrXDGW4xVtgi5Kx6zUsU3ht9l+nlreNx33rf0=
github.com/dell/gofsutil v1.17.0 h1:QA6gUb1mz8kXNEN4eEx47OHCz8nSqZrrCnaDUYmV5EY=
github.com/dell/gofsutil v1.17.0/go.mod h1:PN2hWl/pVLQiTsFR0X1x+GfhfOrfW8pGgH5xGcGMeFs=
github.com/dell/goscaleio v1.17.1 h1:0gwR1c55ij3xVu/ARDWQNxBKCRlxMmg61n+5gKBX3v8=
github.com/dell/goscaleio v1.17.1/go.mod h1:7bX3rL8JWMmdifGr/UeD/Ju9wbkHUqvKDrbdu7XyGm8=
github.com/dell/goscaleio v1.17.2-0.20241218182509-936b677c46d5 h1:d7DwHvp7/hESR742f4iurtH3nHHSGPvnMadujZA2hsU=
github.com/dell/goscaleio v1.17.2-0.20241218182509-936b677c46d5/go.mod h1:2BsR92dYYnSmbZ34ixYdsucfyoQBDlbhbUUKnv6WalQ=
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/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
Expand Down
35 changes: 34 additions & 1 deletion samples/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,43 @@
# Default value: ""
# This is an optional field from v2.10.0 onwards for PowerFlex storage system >=4.0.x
nasName: "nas-server"
# # To add more PowerFlex systems, uncomment the following lines and provide the required values

# # zone: A cluster availability zone to which the PowerFlex system should be bound.
# # The mapping is one-to-one - the PowerFlex system cannot belong to more than one zone.
# # Ideally, the PowerFlex system and cluster nodes that define the availability zone would be
# # geographically co-located.
# # Optional: true
# # Default value: none
# zone:
# # name: The name of the container orchestrator's availability zone to which the PowerFlex system
# # should be mapped.
# name: "zoneA"
# # labelKey: The name of the label used for the availability zone to which the PowerFlex system
# # should be mapped.
# labelKey: "topology.kubernetes.io/zone"
# # protectionDomains: A list of the protection domains and their associated pools, defined in
# # the PowerFlex system.
# # Currently, csi-powerflex only supports one protection domain per zone.
# protectionDomains:
# # pools: A list of pools that belong to a single protection defined in the PowerFlex system.
# # Currently, csi-powerflex only supports one pool per protection domain.
# - pools:
# - <STORAGE_POOL>
# # name: The name of the protection domain in the PowerFlex system.
# # Optional: true
# # name is required if storage pool names are not unique across protection domains.
# name: <DOMAIN_NAME>
# To add more PowerFlex systems, uncomment the following lines and provide the required values
# - username: "admin"
# password: "password"
# systemID: "2b11bb111111bb1b"
# endpoint: "https://127.0.0.2"
# skipCertificateValidation: true
# mdm: "10.0.0.3,10.0.0.4"
# zone:
# name: "zoneB"
# labelKey: "topology.kubernetes.io/zone"
# protectionDomains:
# - name: <DOMAIN_NAME>
# pools:
# - <STORAGE_POOL>
53 changes: 53 additions & 0 deletions samples/storageclass/storageclass-az.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: vxflexos-az
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:
# 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: xfs
# 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
# 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.
# by providing the zone key, the scheduler can make sure that pods are scheduled on the same zone.
# Note: The node must have the same label value with the key and a single associated zone.
allowedTopologies:
- matchLabelExpressions:
- key: topology.kubernetes.io/zone
values:
- zoneA
- zoneB
Loading

0 comments on commit 200b918

Please sign in to comment.