Skip to content

Commit

Permalink
VolumeLabels for unmanaged clusters (#87)
Browse files Browse the repository at this point in the history
* VolumeLabels for unmanaged clusters

* VolumeLabels for unmanaged clusters and user_tags property support for createVolume VPC API
  • Loading branch information
sameshai authored Jun 22, 2022
1 parent 152d452 commit f9de8c3
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 22 deletions.
11 changes: 6 additions & 5 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ func init() {
}

var (
endpoint = flag.String("endpoint", "unix:/tmp/csi.sock", "CSI endpoint")
metricsAddress = flag.String("metrics-address", "0.0.0.0:9080", "Metrics address")
vendorVersion string
logger *zap.Logger
endpoint = flag.String("endpoint", "unix:/tmp/csi.sock", "CSI endpoint")
metricsAddress = flag.String("metrics-address", "0.0.0.0:9080", "Metrics address")
extraVolumeLabelsStr = flag.String("extra-labels", "", "Extra labels to tag all volumes created by driver. It is a comma separated list of key value pairs like '<key1>:<value1>,<key2>:<value2>'.")
vendorVersion string
logger *zap.Logger
)

const (
Expand Down Expand Up @@ -91,7 +92,7 @@ func handle(logger *zap.Logger) {
logger.Info("Controller Mutex Lock enabled", zap.Bool("LockEnabled", *utils.LockEnabled))
// Setup Cloud Provider
configPath := filepath.Join(config.GetConfPathDir(), configFileName)
ibmcloudProvider, err := cloudProvider.NewIBMCloudStorageProvider(configPath, logger)
ibmcloudProvider, err := cloudProvider.NewIBMCloudStorageProvider(configPath, *extraVolumeLabelsStr, logger)
if err != nil {
logger.Fatal("Failed to instantiate IKS-Storage provider", zap.Error(err))
}
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/kubernetes-sigs/ibm-vpc-block-csi-driver
go 1.16

require (
github.com/IBM/ibm-csi-common v1.0.1-beta5
github.com/IBM/ibmcloud-volume-interface v1.0.1-beta4
github.com/IBM/ibmcloud-volume-vpc v1.0.1-beta5
github.com/IBM/ibm-csi-common v1.0.1-beta7
github.com/IBM/ibmcloud-volume-interface v1.0.1-beta5
github.com/IBM/ibmcloud-volume-vpc v1.0.1-beta7
github.com/container-storage-interface/spec v1.5.0
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/google/uuid v1.1.2
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ github.com/IBM-Cloud/ibm-cloud-cli-sdk v0.6.7 h1:eHgfQl6IeSmzWUyiSi13CvoFYsovoyq
github.com/IBM-Cloud/ibm-cloud-cli-sdk v0.6.7/go.mod h1:RiUvKuHKTBmBApDMUQzBL14pQUGKcx/IioKQPIcRQjs=
github.com/IBM/go-sdk-core/v5 v5.9.1 h1:06pXbD9Rgmqqe2HA5YAeQbB4eYRRFgIoOT+Kh3cp1zo=
github.com/IBM/go-sdk-core/v5 v5.9.1/go.mod h1:axE2JrRq79gIJTjKPBwV6gWHswvVptBjbcvvCPIxARM=
github.com/IBM/ibm-csi-common v1.0.1-beta5 h1:QjgaIDPa1OPQXetDh+ZbgnboR06s8Ybmwo+ZJZscVDM=
github.com/IBM/ibm-csi-common v1.0.1-beta5/go.mod h1:wRzyBmb6yGf3d1TTcrIt9xlLK6NK3QWNOd9KzRG1/pU=
github.com/IBM/ibmcloud-volume-interface v1.0.1-beta4 h1:h5vUOeIitxpLTV/iD6F8OvuxHvvHoMDaZu3VXcUMfjw=
github.com/IBM/ibmcloud-volume-interface v1.0.1-beta4/go.mod h1:v1aT8G3Tib8pCwdr9VweNFYa94GejBuqIVTysoaVI0g=
github.com/IBM/ibmcloud-volume-vpc v1.0.1-beta5 h1:FJk99J6Bk5WFI/EOmlVtxX2JXJMURlkezPJLjvS6+A0=
github.com/IBM/ibmcloud-volume-vpc v1.0.1-beta5/go.mod h1:nB0Pk0f7Prvl99DtQRUfpkQdAzFXv34Dd1lkCQrlJyQ=
github.com/IBM/ibm-csi-common v1.0.1-beta7 h1:phljcQfBBKtG6F2Q/hiqayrWJC+w0EtNvUWCXGsiox0=
github.com/IBM/ibm-csi-common v1.0.1-beta7/go.mod h1:k6IHdSHGnsnGOxzqir3n9kczW+ttL+KcRZh/chLyyuk=
github.com/IBM/ibmcloud-volume-interface v1.0.1-beta5 h1:XPNIrp4g7oEx7QOy6eB98jZs7n1tB6DTsUjEigOhouM=
github.com/IBM/ibmcloud-volume-interface v1.0.1-beta5/go.mod h1:v1aT8G3Tib8pCwdr9VweNFYa94GejBuqIVTysoaVI0g=
github.com/IBM/ibmcloud-volume-vpc v1.0.1-beta7 h1:3cQCvlTx9fQhBDYm2bn51nebRrLgZGwfAzLu7Zp/gvc=
github.com/IBM/ibmcloud-volume-vpc v1.0.1-beta7/go.mod h1:CFBvpt4SKwf0mQg3u53qkZ5SxZH9gZSfdhWBa8GIP3Y=
github.com/IBM/secret-common-lib v1.0.3 h1:rhhAtAE1ANSuxhA8Nulzzc2IbXWHGE8reoRSr98rRi8=
github.com/IBM/secret-common-lib v1.0.3/go.mod h1:uoYY5M9G1nJVT8ytPIicdTUujcBXKldBw7ijWolU0yU=
github.com/IBM/secret-utils-lib v1.0.2 h1:AdhKHo/bMmFLMz7+ZjnqSUHuU22CMQsG5meddvwKaV8=
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ github.com/BurntSushi/toml/internal
github.com/IBM-Cloud/ibm-cloud-cli-sdk/common/rest
# github.com/IBM/go-sdk-core/v5 v5.9.1
github.com/IBM/go-sdk-core/v5/core
# github.com/IBM/ibm-csi-common v1.0.1-beta5
# github.com/IBM/ibm-csi-common v1.0.1-beta7
## explicit
github.com/IBM/ibm-csi-common/pkg/ibmcloudprovider
github.com/IBM/ibm-csi-common/pkg/messages
Expand All @@ -14,7 +14,7 @@ github.com/IBM/ibm-csi-common/pkg/metrics
github.com/IBM/ibm-csi-common/pkg/mountmanager
github.com/IBM/ibm-csi-common/pkg/utils
github.com/IBM/ibm-csi-common/pkg/watcher
# github.com/IBM/ibmcloud-volume-interface v1.0.1-beta4
# github.com/IBM/ibmcloud-volume-interface v1.0.1-beta5
## explicit
github.com/IBM/ibmcloud-volume-interface/config
github.com/IBM/ibmcloud-volume-interface/lib/metrics
Expand All @@ -25,7 +25,7 @@ github.com/IBM/ibmcloud-volume-interface/lib/utils/reasoncode
github.com/IBM/ibmcloud-volume-interface/provider/auth
github.com/IBM/ibmcloud-volume-interface/provider/iam
github.com/IBM/ibmcloud-volume-interface/provider/local
# github.com/IBM/ibmcloud-volume-vpc v1.0.1-beta5
# github.com/IBM/ibmcloud-volume-vpc v1.0.1-beta7
## explicit
github.com/IBM/ibmcloud-volume-vpc/block/provider
github.com/IBM/ibmcloud-volume-vpc/block/utils
Expand Down

0 comments on commit f9de8c3

Please sign in to comment.