Skip to content
Snippets Groups Projects
Commit 278ab0df authored by osher.elmakaies's avatar osher.elmakaies Committed by Derek Su
Browse files

fix: fixing annotation key to be const

(cherry picked from commit 3a342254)
parent 63cf06e4
No related branches found
No related tags found
No related merge requests found
...@@ -48,6 +48,10 @@ const ( ...@@ -48,6 +48,10 @@ const (
defaultVolumeType = "hostPath" defaultVolumeType = "hostPath"
) )
const (
nodeNameAnnotationKey = "local.path.provisioner/selected-node"
)
var ( var (
ConfigFileCheckInterval = 30 * time.Second ConfigFileCheckInterval = 30 * time.Second
...@@ -343,7 +347,7 @@ func (p *LocalPathProvisioner) Provision(ctx context.Context, opts pvController. ...@@ -343,7 +347,7 @@ func (p *LocalPathProvisioner) Provision(ctx context.Context, opts pvController.
return &v1.PersistentVolume{ return &v1.PersistentVolume{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: name, Name: name,
Annotations: map[string]string{"local.path.provisioner/selected-node": nodeName}, Annotations: map[string]string{nodeNameAnnotationKey: nodeName},
}, },
Spec: v1.PersistentVolumeSpec{ Spec: v1.PersistentVolumeSpec{
PersistentVolumeReclaimPolicy: *opts.StorageClass.ReclaimPolicy, PersistentVolumeReclaimPolicy: *opts.StorageClass.ReclaimPolicy,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment