@@ -231,9 +231,14 @@ func (n *hetznerNodeGroup) TemplateNodeInfo() (*schedulerframework.NodeInfo, err
231231 },
232232 }
233233 node .Status .Allocatable = node .Status .Capacity
234- node .Labels = cloudprovider .JoinStringMaps (node .Labels , buildNodeGroupLabels (n ))
235234 node .Status .Conditions = cloudprovider .BuildReadyConditions ()
236235
236+ nodeGroupLabels , err := buildNodeGroupLabels (n )
237+ if err != nil {
238+ return nil , err
239+ }
240+ node .Labels = cloudprovider .JoinStringMaps (node .Labels , nodeGroupLabels )
241+
237242 nodeInfo := schedulerframework .NewNodeInfo (cloudprovider .BuildKubeProxy (n .id ))
238243 nodeInfo .SetNode (& node )
239244
@@ -313,13 +318,19 @@ func newNodeName(n *hetznerNodeGroup) string {
313318 return fmt .Sprintf ("%s-%x" , n .id , rand .Int63 ())
314319}
315320
316- func buildNodeGroupLabels (n * hetznerNodeGroup ) map [string ]string {
321+ func buildNodeGroupLabels (n * hetznerNodeGroup ) (map [string ]string , error ) {
322+ archLabel , err := instanceTypeArch (n .manager , n .instanceType )
323+ if err != nil {
324+ return nil , err
325+ }
326+
317327 return map [string ]string {
318328 apiv1 .LabelInstanceType : n .instanceType ,
319- apiv1 .LabelZoneRegionStable : n .region ,
329+ apiv1 .LabelTopologyRegion : n .region ,
330+ apiv1 .LabelArchStable : archLabel ,
320331 "csi.hetzner.cloud/location" : n .region ,
321332 nodeGroupLabel : n .id ,
322- }
333+ }, nil
323334}
324335
325336func getMachineTypeResourceList (m * hetznerManager , instanceType string ) (apiv1.ResourceList , error ) {
@@ -352,6 +363,22 @@ func serverTypeAvailable(manager *hetznerManager, instanceType string, region st
352363 return false , nil
353364}
354365
366+ func instanceTypeArch (manager * hetznerManager , instanceType string ) (string , error ) {
367+ serverType , err := manager .cachedServerType .getServerType (instanceType )
368+ if err != nil {
369+ return "" , err
370+ }
371+
372+ switch serverType .Architecture {
373+ case hcloud .ArchitectureARM :
374+ return "arm64" , nil
375+ case hcloud .ArchitectureX86 :
376+ return "amd64" , nil
377+ default :
378+ return "amd64" , nil
379+ }
380+ }
381+
355382func createServer (n * hetznerNodeGroup ) error {
356383 StartAfterCreate := true
357384 opts := hcloud.ServerCreateOpts {
0 commit comments