Skip to content

Commit

Permalink
autoscaler topology label
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Paskal <[email protected]>
  • Loading branch information
maksim-paskal committed Nov 16, 2022
1 parent b89386d commit 8c1e101
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion driver/driver.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package driver

import (
apiv1 "k8s.io/api/core/v1"
)

const (
PluginName = "csi.hetzner.cloud"
PluginVersion = "1.6.0"
Expand All @@ -8,5 +12,9 @@ const (
MinVolumeSize = 10 // GB
DefaultVolumeSize = MinVolumeSize

TopologySegmentLocation = PluginName + "/location"
TopologySegmentLocation = apiv1.LabelZoneRegionStable

// this label will be deprecated in next releases
// label is needed to backward compatibility with older versions of the CSI driver
TopologySegmentLocationLegacy = PluginName + "/location"
)
2 changes: 1 addition & 1 deletion driver/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func (s *NodeService) NodeGetInfo(context.Context, *proto.NodeGetInfoRequest) (*
MaxVolumesPerNode: MaxVolumesPerNode,
AccessibleTopology: &proto.Topology{
Segments: map[string]string{
TopologySegmentLocation: s.serverLocation,
TopologySegmentLocationLegacy: s.serverLocation,
},
},
}
Expand Down

0 comments on commit 8c1e101

Please sign in to comment.