Skip to content

Commit 24e93a7

Browse files
committed
remove util.DriverName constant completely
1 parent 8d6d7c2 commit 24e93a7

File tree

5 files changed

+4
-11
lines changed

5 files changed

+4
-11
lines changed

pkg/cloud/cloud.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const (
115115
// KubernetesTagKeyPrefix is the prefix of the key value that is reserved for Kubernetes.
116116
KubernetesTagKeyPrefix = "kubernetes.io"
117117
// AwsEbsDriverTagKey is the tag to identify if a volume/snapshot is managed by ebs csi driver.
118-
AwsEbsDriverTagKey = util.DriverName + "/cluster"
118+
AwsEbsDriverTagKey = "ebs.csi.aws.com/cluster"
119119
)
120120

121121
// Batcher.

pkg/driver/constants.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ package driver
1818

1919
import (
2020
"time"
21-
22-
"github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/util"
2321
)
2422

2523
// constants of keys in PublishContext.
@@ -185,7 +183,7 @@ const (
185183
// constants for node k8s API use.
186184
const (
187185
// AgentNotReadyNodeTaintKey contains the key of taints to be removed on driver startup.
188-
AgentNotReadyNodeTaintKey = util.DriverName + "/agent-not-ready"
186+
AgentNotReadyNodeTaintKey = "ebs.csi.aws.com/agent-not-ready"
189187
)
190188

191189
type fileSystemConfig struct {

pkg/driver/identity.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@ import (
2020
"context"
2121

2222
csi "github.com/container-storage-interface/spec/lib/go/csi"
23-
"github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/util"
2423
"k8s.io/klog/v2"
2524
)
2625

2726
func (d *Driver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error) {
2827
klog.V(6).InfoS("GetPluginInfo: called", "args", req)
2928
resp := &csi.GetPluginInfoResponse{
30-
Name: util.DriverName,
29+
Name: DriverName,
3130
VendorVersion: driverVersion,
3231
}
3332

pkg/driver/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ func checkAllocatable(ctx context.Context, clientset kubernetes.Interface, nodeN
10251025
}
10261026

10271027
for _, driver := range csiNode.Spec.Drivers {
1028-
if driver.Name == util.DriverName {
1028+
if driver.Name == DriverName {
10291029
if driver.Allocatable != nil && driver.Allocatable.Count != nil {
10301030
klog.InfoS("CSINode Allocatable value is set", "nodeName", nodeName, "count", *driver.Allocatable.Count)
10311031
return nil

pkg/util/util.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ import (
3333
)
3434

3535
const (
36-
// DriverName is the domain for all EBS CSI Driver related components.
37-
// In util package to avoid cyclic dependency conflicts.
38-
DriverName = "ebs.csi.aws.com"
39-
4036
GiB = int64(1024 * 1024 * 1024)
4137
DefaultBlockSize = 4096
4238
)

0 commit comments

Comments
 (0)