Skip to content

Commit

Permalink
added clusterName hash as label to newly created disks
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanenkoDenys committed Apr 22, 2024
1 parent a67256b commit f68e8b5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion driver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ const (
// to create a volume that is larger than what we support
maximumVolumeSizeInBytes int64 = 4398046511104

// createdByYandex is used to tag volumes that are created by this CSI plugin
createdByYandex = "Created by Yandex CSI driver"

// defaultVolumeSizeInBytes is used when the user did not provide a size or
// the size they provided did not satisfy our requirements
defaultVolumeSizeInBytes int64 = 5 * giB
Expand Down Expand Up @@ -169,7 +172,8 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
diskCreateRequest := &compute.CreateDiskRequest{
FolderId: d.folderID,
Name: volumeName,
Description: d.clusterName,
Description: createdByYandex,
Labels: map[string]string{"cluster": d.clusterName},
TypeId: typeID,
ZoneId: zone,
Size: size,
Expand Down

0 comments on commit f68e8b5

Please # to comment.