diff --git a/driver/driver.go b/driver/driver.go index 0681199d..f26cf66b 100644 --- a/driver/driver.go +++ b/driver/driver.go @@ -1,5 +1,9 @@ package driver +import ( + apiv1 "k8s.io/api/core/v1" +) + const ( PluginName = "csi.hetzner.cloud" PluginVersion = "1.6.0" @@ -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" ) diff --git a/driver/node.go b/driver/node.go index f3ca8534..a47fd009 100644 --- a/driver/node.go +++ b/driver/node.go @@ -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, }, }, }