From 5b0e093433b80f8d6a7306c82baa6880bef04aba Mon Sep 17 00:00:00 2001 From: zirain Date: Tue, 4 Nov 2025 15:16:49 +0800 Subject: [PATCH 1/2] add locality label --- label/labels.gen.go | 16 ++++++++++++++++ label/labels.pb.html | 22 ++++++++++++++++++++++ label/labels.yaml | 9 +++++++++ 3 files changed, 47 insertions(+) diff --git a/label/labels.gen.go b/label/labels.gen.go index 69afb5bde5..01924a677b 100644 --- a/label/labels.gen.go +++ b/label/labels.gen.go @@ -405,6 +405,21 @@ For example, a "Pod" resource may default to the "Deployment" name. }, } + TopologyLocality = Instance { + Name: "topology.istio.io/locality", + Description: "This label is applied to a workload internally that "+ + "indicates the region/zone/subzone of an instance. It is "+ + "used to override the native registry's value. Kubernetes "+ + "labels does not support `/`, use `.` instead in "+ + "kubernetes.", + FeatureStatus: Alpha, + Hidden: false, + Deprecated: false, + Resources: []ResourceTypes{ + Pod, + }, + } + TopologyNetwork = Instance { Name: "topology.istio.io/network", Description: `A label used to identify the network for one or more pods. This is used @@ -483,6 +498,7 @@ func AllResourceLabels() []*Instance { &ServiceWorkloadName, &SidecarInject, &TopologyCluster, + &TopologyLocality, &TopologyNetwork, &TopologySubzone, } diff --git a/label/labels.pb.html b/label/labels.pb.html index f3d24f0c04..0f5874bc31 100644 --- a/label/labels.pb.html +++ b/label/labels.pb.html @@ -376,6 +376,28 @@

topology.istio.io/cluster

+

topology.istio.io/locality

+ + + + + + + + + + + + + + + + + + + +
Nametopology.istio.io/locality
Feature StatusAlpha
Resource Types[Pod]
Description

This label is applied to a workload internally that indicates the region/zone/subzone of an instance. It is used to override the native registry’s value. Kubernetes labels does not support /, use . instead in kubernetes.

+

topology.istio.io/network

diff --git a/label/labels.yaml b/label/labels.yaml index 49188dc1b6..78eed30bf7 100644 --- a/label/labels.yaml +++ b/label/labels.yaml @@ -164,6 +164,15 @@ labels: resources: - Pod + - name: topology.istio.io/locality + featureStatus: Alpha + description: This label is applied to a workload internally that indicates the region/zone/subzone of an instance. + It is used to override the native registry's value. Kubernetes labels does not support `/`, use `.` instead in kubernetes. + hidden: false + deprecated: false + resources: + - Pod + - name: sidecar.istio.io/inject featureStatus: Beta description: Specifies whether or not an Envoy sidecar should be automatically From f89ea3f912472e33853954a7fe9ef4d72a8f4e71 Mon Sep 17 00:00:00 2001 From: zirain Date: Wed, 5 Nov 2025 09:57:27 +0800 Subject: [PATCH 2/2] update example --- label/labels.gen.go | 2 +- label/labels.pb.html | 2 +- label/labels.yaml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/label/labels.gen.go b/label/labels.gen.go index 01924a677b..a4d8ff09f7 100644 --- a/label/labels.gen.go +++ b/label/labels.gen.go @@ -411,7 +411,7 @@ For example, a "Pod" resource may default to the "Deployment" name. "indicates the region/zone/subzone of an instance. It is "+ "used to override the native registry's value. Kubernetes "+ "labels does not support `/`, use `.` instead in "+ - "kubernetes.", + "kubernetes. e.g. `regionA.zoneB.subZoneC`", FeatureStatus: Alpha, Hidden: false, Deprecated: false, diff --git a/label/labels.pb.html b/label/labels.pb.html index 0f5874bc31..397761b255 100644 --- a/label/labels.pb.html +++ b/label/labels.pb.html @@ -393,7 +393,7 @@

topology.istio.io/locality

- diff --git a/label/labels.yaml b/label/labels.yaml index 78eed30bf7..c77768de34 100644 --- a/label/labels.yaml +++ b/label/labels.yaml @@ -168,6 +168,7 @@ labels: featureStatus: Alpha description: This label is applied to a workload internally that indicates the region/zone/subzone of an instance. It is used to override the native registry's value. Kubernetes labels does not support `/`, use `.` instead in kubernetes. + e.g. `regionA.zoneB.subZoneC` hidden: false deprecated: false resources:
Description

This label is applied to a workload internally that indicates the region/zone/subzone of an instance. It is used to override the native registry’s value. Kubernetes labels does not support /, use . instead in kubernetes.

+

This label is applied to a workload internally that indicates the region/zone/subzone of an instance. It is used to override the native registry’s value. Kubernetes labels does not support /, use . instead in kubernetes. e.g. regionA.zoneB.subZoneC