diff --git a/kubernetes/customresourcedefinitions.gen.yaml b/kubernetes/customresourcedefinitions.gen.yaml
index 2055db0036..70c0d5363e 100644
--- a/kubernetes/customresourcedefinitions.gen.yaml
+++ b/kubernetes/customresourcedefinitions.gen.yaml
@@ -412,6 +412,37 @@ spec:
items:
type: string
type: array
+ exportToSelectors:
+ description: A list of label selectors to dynamically select namespaces
+ to which this destination rule is exported.
+ items:
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ items:
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values.
+ type: string
+ values:
+ description: values is an array of string values.
+ items:
+ type: string
+ type: array
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ type: object
+ type: object
+ type: array
host:
description: The name of a service from the service registry.
type: string
@@ -2413,6 +2444,37 @@ spec:
items:
type: string
type: array
+ exportToSelectors:
+ description: A list of label selectors to dynamically select namespaces
+ to which this destination rule is exported.
+ items:
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ items:
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values.
+ type: string
+ values:
+ description: values is an array of string values.
+ items:
+ type: string
+ type: array
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ type: object
+ type: object
+ type: array
host:
description: The name of a service from the service registry.
type: string
@@ -4414,6 +4476,37 @@ spec:
items:
type: string
type: array
+ exportToSelectors:
+ description: A list of label selectors to dynamically select namespaces
+ to which this destination rule is exported.
+ items:
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ items:
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values.
+ type: string
+ values:
+ description: values is an array of string values.
+ items:
+ type: string
+ type: array
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ type: object
+ type: object
+ type: array
host:
description: The name of a service from the service registry.
type: string
@@ -7974,6 +8067,37 @@ spec:
items:
type: string
type: array
+ exportToSelectors:
+ description: A list of label selectors to dynamically select namespaces
+ to which this service is exported.
+ items:
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ items:
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values.
+ type: string
+ values:
+ description: values is an array of string values.
+ items:
+ type: string
+ type: array
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ type: object
+ type: object
+ type: array
hosts:
description: The hosts associated with the ServiceEntry.
items:
@@ -8273,6 +8397,37 @@ spec:
items:
type: string
type: array
+ exportToSelectors:
+ description: A list of label selectors to dynamically select namespaces
+ to which this service is exported.
+ items:
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ items:
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values.
+ type: string
+ values:
+ description: values is an array of string values.
+ items:
+ type: string
+ type: array
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ type: object
+ type: object
+ type: array
hosts:
description: The hosts associated with the ServiceEntry.
items:
@@ -8572,6 +8727,37 @@ spec:
items:
type: string
type: array
+ exportToSelectors:
+ description: A list of label selectors to dynamically select namespaces
+ to which this service is exported.
+ items:
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ items:
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values.
+ type: string
+ values:
+ description: values is an array of string values.
+ items:
+ type: string
+ type: array
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ type: object
+ type: object
+ type: array
hosts:
description: The hosts associated with the ServiceEntry.
items:
@@ -10580,6 +10766,37 @@ spec:
items:
type: string
type: array
+ exportToSelectors:
+ description: A list of label selectors to dynamically select namespaces
+ to which this virtual service is exported.
+ items:
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ items:
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values.
+ type: string
+ values:
+ description: values is an array of string values.
+ items:
+ type: string
+ type: array
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ type: object
+ type: object
+ type: array
gateways:
description: The names of gateways and sidecars that should apply
these routes.
@@ -11632,6 +11849,37 @@ spec:
items:
type: string
type: array
+ exportToSelectors:
+ description: A list of label selectors to dynamically select namespaces
+ to which this virtual service is exported.
+ items:
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ items:
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values.
+ type: string
+ values:
+ description: values is an array of string values.
+ items:
+ type: string
+ type: array
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ type: object
+ type: object
+ type: array
gateways:
description: The names of gateways and sidecars that should apply
these routes.
@@ -12684,6 +12932,37 @@ spec:
items:
type: string
type: array
+ exportToSelectors:
+ description: A list of label selectors to dynamically select namespaces
+ to which this virtual service is exported.
+ items:
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ items:
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values.
+ type: string
+ values:
+ description: values is an array of string values.
+ items:
+ type: string
+ type: array
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ type: object
+ type: object
+ type: array
gateways:
description: The names of gateways and sidecars that should apply
these routes.
diff --git a/networking/v1alpha3/destination_rule.pb.go b/networking/v1alpha3/destination_rule.pb.go
index c2a1474e78..7eabe8bce6 100644
--- a/networking/v1alpha3/destination_rule.pb.go
+++ b/networking/v1alpha3/destination_rule.pb.go
@@ -452,6 +452,40 @@ type DestinationRule struct {
// the destination rule is declared in. Similarly, the value "*" is reserved and
// defines an export to all namespaces.
ExportTo []string `protobuf:"bytes,4,rep,name=export_to,json=exportTo,proto3" json:"export_to,omitempty"`
+ // A list of label selectors to dynamically select namespaces to which this
+ // destination rule is exported. Each selector can match namespaces based on their labels.
+ // This provides a mechanism for service owners and mesh administrators to control
+ // the visibility of destination rules across namespace boundaries without knowing namespace
+ // names in advance.
+ //
+ // For example, to export to all namespaces with a specific label:
+ // ```yaml
+ // exportToSelectors:
+ // - matchLabels:
+ // mesh: enabled
+ //
+ // ```
+ //
+ // Or using match expressions for more complex selection:
+ // ```yaml
+ // exportToSelectors:
+ // - matchExpressions:
+ // - key: environment
+ // operator: In
+ // values: [production, staging]
+ //
+ // ```
+ //
+ // When both export_to and export_to_selectors are specified, the destination rule is
+ // exported to the union of all matched namespaces. If neither is specified,
+ // the destination rule is exported to all namespaces by default.
+ //
+ // **Note:** Using "*" in export_to makes export_to_selectors redundant as
+ // the destination rule would already be visible to all namespaces.
+ //
+ // **Note:** DestinationRule with workload_selector cannot use export_to_selectors
+ // and must only export to the current namespace (".").
+ ExportToSelectors []*v1beta1.LabelSelector `protobuf:"bytes,6,rep,name=export_to_selectors,json=exportToSelectors,proto3" json:"export_to_selectors,omitempty"`
// Criteria used to select the specific set of pods/VMs on which this
// `DestinationRule` configuration should be applied. If specified, the `DestinationRule`
// configuration will be applied only to the workload instances matching the workload selector
@@ -523,6 +557,13 @@ func (x *DestinationRule) GetExportTo() []string {
return nil
}
+func (x *DestinationRule) GetExportToSelectors() []*v1beta1.LabelSelector {
+ if x != nil {
+ return x.ExportToSelectors
+ }
+ return nil
+}
+
func (x *DestinationRule) GetWorkloadSelector() *v1beta1.WorkloadSelector {
if x != nil {
return x.WorkloadSelector
@@ -2816,12 +2857,13 @@ var File_networking_v1alpha3_destination_rule_proto protoreflect.FileDescriptor
const file_networking_v1alpha3_destination_rule_proto_rawDesc = "" +
"\n" +
- "*networking/v1alpha3/destination_rule.proto\x12\x19istio.networking.v1alpha3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a)networking/v1alpha3/virtual_service.proto\x1a\x1btype/v1beta1/selector.proto\"\xa9\x02\n" +
+ "*networking/v1alpha3/destination_rule.proto\x12\x19istio.networking.v1alpha3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a)networking/v1alpha3/virtual_service.proto\x1a\x1btype/v1beta1/selector.proto\"\xfc\x02\n" +
"\x0fDestinationRule\x12\x18\n" +
"\x04host\x18\x01 \x01(\tB\x04\xe2A\x01\x02R\x04host\x12O\n" +
"\x0etraffic_policy\x18\x02 \x01(\v2(.istio.networking.v1alpha3.TrafficPolicyR\rtrafficPolicy\x12;\n" +
"\asubsets\x18\x03 \x03(\v2!.istio.networking.v1alpha3.SubsetR\asubsets\x12\x1b\n" +
"\texport_to\x18\x04 \x03(\tR\bexportTo\x12Q\n" +
+ "\x13export_to_selectors\x18\x06 \x03(\v2!.istio.type.v1beta1.LabelSelectorR\x11exportToSelectors\x12Q\n" +
"\x11workload_selector\x18\x05 \x01(\v2$.istio.type.v1beta1.WorkloadSelectorR\x10workloadSelector\"\xed\v\n" +
"\rTrafficPolicy\x12T\n" +
"\rload_balancer\x18\x01 \x01(\v2/.istio.networking.v1alpha3.LoadBalancerSettingsR\floadBalancer\x12Z\n" +
@@ -3027,73 +3069,75 @@ var file_networking_v1alpha3_destination_rule_proto_goTypes = []any{
(*LocalityLoadBalancerSetting_Distribute)(nil), // 26: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute
(*LocalityLoadBalancerSetting_Failover)(nil), // 27: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover
nil, // 28: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry
- (*v1beta1.WorkloadSelector)(nil), // 29: istio.type.v1beta1.WorkloadSelector
- (*duration.Duration)(nil), // 30: google.protobuf.Duration
- (*wrappers.DoubleValue)(nil), // 31: google.protobuf.DoubleValue
- (*wrappers.UInt32Value)(nil), // 32: google.protobuf.UInt32Value
- (*wrappers.BoolValue)(nil), // 33: google.protobuf.BoolValue
- (*PortSelector)(nil), // 34: istio.networking.v1alpha3.PortSelector
+ (*v1beta1.LabelSelector)(nil), // 29: istio.type.v1beta1.LabelSelector
+ (*v1beta1.WorkloadSelector)(nil), // 30: istio.type.v1beta1.WorkloadSelector
+ (*duration.Duration)(nil), // 31: google.protobuf.Duration
+ (*wrappers.DoubleValue)(nil), // 32: google.protobuf.DoubleValue
+ (*wrappers.UInt32Value)(nil), // 33: google.protobuf.UInt32Value
+ (*wrappers.BoolValue)(nil), // 34: google.protobuf.BoolValue
+ (*PortSelector)(nil), // 35: istio.networking.v1alpha3.PortSelector
}
var file_networking_v1alpha3_destination_rule_proto_depIdxs = []int32{
5, // 0: istio.networking.v1alpha3.DestinationRule.traffic_policy:type_name -> istio.networking.v1alpha3.TrafficPolicy
6, // 1: istio.networking.v1alpha3.DestinationRule.subsets:type_name -> istio.networking.v1alpha3.Subset
- 29, // 2: istio.networking.v1alpha3.DestinationRule.workload_selector:type_name -> istio.type.v1beta1.WorkloadSelector
- 7, // 3: istio.networking.v1alpha3.TrafficPolicy.load_balancer:type_name -> istio.networking.v1alpha3.LoadBalancerSettings
- 9, // 4: istio.networking.v1alpha3.TrafficPolicy.connection_pool:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings
- 10, // 5: istio.networking.v1alpha3.TrafficPolicy.outlier_detection:type_name -> istio.networking.v1alpha3.OutlierDetection
- 11, // 6: istio.networking.v1alpha3.TrafficPolicy.tls:type_name -> istio.networking.v1alpha3.ClientTLSSettings
- 13, // 7: istio.networking.v1alpha3.TrafficPolicy.port_level_settings:type_name -> istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy
- 14, // 8: istio.networking.v1alpha3.TrafficPolicy.tunnel:type_name -> istio.networking.v1alpha3.TrafficPolicy.TunnelSettings
- 15, // 9: istio.networking.v1alpha3.TrafficPolicy.proxy_protocol:type_name -> istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol
- 16, // 10: istio.networking.v1alpha3.TrafficPolicy.retry_budget:type_name -> istio.networking.v1alpha3.TrafficPolicy.RetryBudget
- 17, // 11: istio.networking.v1alpha3.Subset.labels:type_name -> istio.networking.v1alpha3.Subset.LabelsEntry
- 5, // 12: istio.networking.v1alpha3.Subset.traffic_policy:type_name -> istio.networking.v1alpha3.TrafficPolicy
- 1, // 13: istio.networking.v1alpha3.LoadBalancerSettings.simple:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB
- 18, // 14: istio.networking.v1alpha3.LoadBalancerSettings.consistent_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB
- 12, // 15: istio.networking.v1alpha3.LoadBalancerSettings.locality_lb_setting:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting
- 30, // 16: istio.networking.v1alpha3.LoadBalancerSettings.warmup_duration_secs:type_name -> google.protobuf.Duration
- 8, // 17: istio.networking.v1alpha3.LoadBalancerSettings.warmup:type_name -> istio.networking.v1alpha3.WarmupConfiguration
- 30, // 18: istio.networking.v1alpha3.WarmupConfiguration.duration:type_name -> google.protobuf.Duration
- 31, // 19: istio.networking.v1alpha3.WarmupConfiguration.minimum_percent:type_name -> google.protobuf.DoubleValue
- 31, // 20: istio.networking.v1alpha3.WarmupConfiguration.aggression:type_name -> google.protobuf.DoubleValue
- 23, // 21: istio.networking.v1alpha3.ConnectionPoolSettings.tcp:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings
- 24, // 22: istio.networking.v1alpha3.ConnectionPoolSettings.http:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings
- 32, // 23: istio.networking.v1alpha3.OutlierDetection.consecutive_local_origin_failures:type_name -> google.protobuf.UInt32Value
- 32, // 24: istio.networking.v1alpha3.OutlierDetection.consecutive_gateway_errors:type_name -> google.protobuf.UInt32Value
- 32, // 25: istio.networking.v1alpha3.OutlierDetection.consecutive_5xx_errors:type_name -> google.protobuf.UInt32Value
- 30, // 26: istio.networking.v1alpha3.OutlierDetection.interval:type_name -> google.protobuf.Duration
- 30, // 27: istio.networking.v1alpha3.OutlierDetection.base_ejection_time:type_name -> google.protobuf.Duration
- 3, // 28: istio.networking.v1alpha3.ClientTLSSettings.mode:type_name -> istio.networking.v1alpha3.ClientTLSSettings.TLSmode
- 33, // 29: istio.networking.v1alpha3.ClientTLSSettings.insecure_skip_verify:type_name -> google.protobuf.BoolValue
- 26, // 30: istio.networking.v1alpha3.LocalityLoadBalancerSetting.distribute:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute
- 27, // 31: istio.networking.v1alpha3.LocalityLoadBalancerSetting.failover:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover
- 33, // 32: istio.networking.v1alpha3.LocalityLoadBalancerSetting.enabled:type_name -> google.protobuf.BoolValue
- 34, // 33: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.port:type_name -> istio.networking.v1alpha3.PortSelector
- 7, // 34: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.load_balancer:type_name -> istio.networking.v1alpha3.LoadBalancerSettings
- 9, // 35: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.connection_pool:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings
- 10, // 36: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.outlier_detection:type_name -> istio.networking.v1alpha3.OutlierDetection
- 11, // 37: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.tls:type_name -> istio.networking.v1alpha3.ClientTLSSettings
- 0, // 38: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.version:type_name -> istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.VERSION
- 31, // 39: istio.networking.v1alpha3.TrafficPolicy.RetryBudget.percent:type_name -> google.protobuf.DoubleValue
- 21, // 40: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.http_cookie:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie
- 19, // 41: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.ring_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.RingHash
- 20, // 42: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.maglev:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.MagLev
- 30, // 43: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.ttl:type_name -> google.protobuf.Duration
- 22, // 44: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.attributes:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Attribute
- 30, // 45: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.connect_timeout:type_name -> google.protobuf.Duration
- 25, // 46: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.tcp_keepalive:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive
- 30, // 47: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.max_connection_duration:type_name -> google.protobuf.Duration
- 30, // 48: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.idle_timeout:type_name -> google.protobuf.Duration
- 30, // 49: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.idle_timeout:type_name -> google.protobuf.Duration
- 2, // 50: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.h2_upgrade_policy:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy
- 30, // 51: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.time:type_name -> google.protobuf.Duration
- 30, // 52: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.interval:type_name -> google.protobuf.Duration
- 28, // 53: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.to:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry
- 54, // [54:54] is the sub-list for method output_type
- 54, // [54:54] is the sub-list for method input_type
- 54, // [54:54] is the sub-list for extension type_name
- 54, // [54:54] is the sub-list for extension extendee
- 0, // [0:54] is the sub-list for field type_name
+ 29, // 2: istio.networking.v1alpha3.DestinationRule.export_to_selectors:type_name -> istio.type.v1beta1.LabelSelector
+ 30, // 3: istio.networking.v1alpha3.DestinationRule.workload_selector:type_name -> istio.type.v1beta1.WorkloadSelector
+ 7, // 4: istio.networking.v1alpha3.TrafficPolicy.load_balancer:type_name -> istio.networking.v1alpha3.LoadBalancerSettings
+ 9, // 5: istio.networking.v1alpha3.TrafficPolicy.connection_pool:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings
+ 10, // 6: istio.networking.v1alpha3.TrafficPolicy.outlier_detection:type_name -> istio.networking.v1alpha3.OutlierDetection
+ 11, // 7: istio.networking.v1alpha3.TrafficPolicy.tls:type_name -> istio.networking.v1alpha3.ClientTLSSettings
+ 13, // 8: istio.networking.v1alpha3.TrafficPolicy.port_level_settings:type_name -> istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy
+ 14, // 9: istio.networking.v1alpha3.TrafficPolicy.tunnel:type_name -> istio.networking.v1alpha3.TrafficPolicy.TunnelSettings
+ 15, // 10: istio.networking.v1alpha3.TrafficPolicy.proxy_protocol:type_name -> istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol
+ 16, // 11: istio.networking.v1alpha3.TrafficPolicy.retry_budget:type_name -> istio.networking.v1alpha3.TrafficPolicy.RetryBudget
+ 17, // 12: istio.networking.v1alpha3.Subset.labels:type_name -> istio.networking.v1alpha3.Subset.LabelsEntry
+ 5, // 13: istio.networking.v1alpha3.Subset.traffic_policy:type_name -> istio.networking.v1alpha3.TrafficPolicy
+ 1, // 14: istio.networking.v1alpha3.LoadBalancerSettings.simple:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB
+ 18, // 15: istio.networking.v1alpha3.LoadBalancerSettings.consistent_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB
+ 12, // 16: istio.networking.v1alpha3.LoadBalancerSettings.locality_lb_setting:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting
+ 31, // 17: istio.networking.v1alpha3.LoadBalancerSettings.warmup_duration_secs:type_name -> google.protobuf.Duration
+ 8, // 18: istio.networking.v1alpha3.LoadBalancerSettings.warmup:type_name -> istio.networking.v1alpha3.WarmupConfiguration
+ 31, // 19: istio.networking.v1alpha3.WarmupConfiguration.duration:type_name -> google.protobuf.Duration
+ 32, // 20: istio.networking.v1alpha3.WarmupConfiguration.minimum_percent:type_name -> google.protobuf.DoubleValue
+ 32, // 21: istio.networking.v1alpha3.WarmupConfiguration.aggression:type_name -> google.protobuf.DoubleValue
+ 23, // 22: istio.networking.v1alpha3.ConnectionPoolSettings.tcp:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings
+ 24, // 23: istio.networking.v1alpha3.ConnectionPoolSettings.http:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings
+ 33, // 24: istio.networking.v1alpha3.OutlierDetection.consecutive_local_origin_failures:type_name -> google.protobuf.UInt32Value
+ 33, // 25: istio.networking.v1alpha3.OutlierDetection.consecutive_gateway_errors:type_name -> google.protobuf.UInt32Value
+ 33, // 26: istio.networking.v1alpha3.OutlierDetection.consecutive_5xx_errors:type_name -> google.protobuf.UInt32Value
+ 31, // 27: istio.networking.v1alpha3.OutlierDetection.interval:type_name -> google.protobuf.Duration
+ 31, // 28: istio.networking.v1alpha3.OutlierDetection.base_ejection_time:type_name -> google.protobuf.Duration
+ 3, // 29: istio.networking.v1alpha3.ClientTLSSettings.mode:type_name -> istio.networking.v1alpha3.ClientTLSSettings.TLSmode
+ 34, // 30: istio.networking.v1alpha3.ClientTLSSettings.insecure_skip_verify:type_name -> google.protobuf.BoolValue
+ 26, // 31: istio.networking.v1alpha3.LocalityLoadBalancerSetting.distribute:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute
+ 27, // 32: istio.networking.v1alpha3.LocalityLoadBalancerSetting.failover:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover
+ 34, // 33: istio.networking.v1alpha3.LocalityLoadBalancerSetting.enabled:type_name -> google.protobuf.BoolValue
+ 35, // 34: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.port:type_name -> istio.networking.v1alpha3.PortSelector
+ 7, // 35: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.load_balancer:type_name -> istio.networking.v1alpha3.LoadBalancerSettings
+ 9, // 36: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.connection_pool:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings
+ 10, // 37: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.outlier_detection:type_name -> istio.networking.v1alpha3.OutlierDetection
+ 11, // 38: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.tls:type_name -> istio.networking.v1alpha3.ClientTLSSettings
+ 0, // 39: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.version:type_name -> istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.VERSION
+ 32, // 40: istio.networking.v1alpha3.TrafficPolicy.RetryBudget.percent:type_name -> google.protobuf.DoubleValue
+ 21, // 41: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.http_cookie:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie
+ 19, // 42: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.ring_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.RingHash
+ 20, // 43: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.maglev:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.MagLev
+ 31, // 44: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.ttl:type_name -> google.protobuf.Duration
+ 22, // 45: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.attributes:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Attribute
+ 31, // 46: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.connect_timeout:type_name -> google.protobuf.Duration
+ 25, // 47: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.tcp_keepalive:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive
+ 31, // 48: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.max_connection_duration:type_name -> google.protobuf.Duration
+ 31, // 49: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.idle_timeout:type_name -> google.protobuf.Duration
+ 31, // 50: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.idle_timeout:type_name -> google.protobuf.Duration
+ 2, // 51: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.h2_upgrade_policy:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy
+ 31, // 52: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.time:type_name -> google.protobuf.Duration
+ 31, // 53: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.interval:type_name -> google.protobuf.Duration
+ 28, // 54: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.to:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry
+ 55, // [55:55] is the sub-list for method output_type
+ 55, // [55:55] is the sub-list for method input_type
+ 55, // [55:55] is the sub-list for extension type_name
+ 55, // [55:55] is the sub-list for extension extendee
+ 0, // [0:55] is the sub-list for field type_name
}
func init() { file_networking_v1alpha3_destination_rule_proto_init() }
diff --git a/networking/v1alpha3/destination_rule.pb.html b/networking/v1alpha3/destination_rule.pb.html
index d465b81f6a..c8f513ad26 100644
--- a/networking/v1alpha3/destination_rule.pb.html
+++ b/networking/v1alpha3/destination_rule.pb.html
@@ -166,6 +166,38 @@
DestinationRule
the destination rule is declared in. Similarly, the value “*” is reserved and
defines an export to all namespaces.
+
+
+
+ |
+
+ A list of label selectors to dynamically select namespaces to which this
+destination rule is exported. Each selector can match namespaces based on their labels.
+This provides a mechanism for service owners and mesh administrators to control
+the visibility of destination rules across namespace boundaries without knowing namespace
+names in advance.
+For example, to export to all namespaces with a specific label:
+exportToSelectors:
+- matchLabels:
+ mesh: enabled
+
+Or using match expressions for more complex selection:
+exportToSelectors:
+- matchExpressions:
+ - key: environment
+ operator: In
+ values: [production, staging]
+
+When both export_to and export_to_selectors are specified, the destination rule is
+exported to the union of all matched namespaces. If neither is specified,
+the destination rule is exported to all namespaces by default.
+Note: Using “*” in export_to makes export_to_selectors redundant as
+the destination rule would already be visible to all namespaces.
+Note: DestinationRule with workload_selector cannot use export_to_selectors
+and must only export to the current namespace (".").
+
|
diff --git a/networking/v1alpha3/destination_rule.proto b/networking/v1alpha3/destination_rule.proto
index d2589a87aa..dd63f27160 100644
--- a/networking/v1alpha3/destination_rule.proto
+++ b/networking/v1alpha3/destination_rule.proto
@@ -191,7 +191,7 @@ message DestinationRule {
// the destination rule is declared in. Similarly, the value "*" is reserved and
// defines an export to all namespaces.
repeated string export_to = 4;
- //
+
// Criteria used to select the specific set of pods/VMs on which this
// `DestinationRule` configuration should be applied. If specified, the `DestinationRule`
// configuration will be applied only to the workload instances matching the workload selector
@@ -201,6 +201,39 @@ message DestinationRule {
// of the mesh, instead of every sidecar in the mesh needing to have the
// configuration (which is the default behaviour), a workload selector can be specified.
istio.type.v1beta1.WorkloadSelector workload_selector = 5;
+
+ // A list of label selectors to dynamically select namespaces to which this
+ // destination rule is exported. Each selector can match namespaces based on their labels.
+ // This provides a mechanism for service owners and mesh administrators to control
+ // the visibility of destination rules across namespace boundaries without knowing namespace
+ // names in advance.
+ //
+ // For example, to export to all namespaces with a specific label:
+ // ```yaml
+ // exportToSelectors:
+ // - matchLabels:
+ // mesh: enabled
+ // ```
+ //
+ // Or using match expressions for more complex selection:
+ // ```yaml
+ // exportToSelectors:
+ // - matchExpressions:
+ // - key: environment
+ // operator: In
+ // values: [production, staging]
+ // ```
+ //
+ // When both export_to and export_to_selectors are specified, the destination rule is
+ // exported to the union of all matched namespaces. If neither is specified,
+ // the destination rule is exported to all namespaces by default.
+ //
+ // **Note:** Using "*" in export_to makes export_to_selectors redundant as
+ // the destination rule would already be visible to all namespaces.
+ //
+ // **Note:** DestinationRule with workload_selector cannot use export_to_selectors
+ // and must only export to the current namespace (".").
+ repeated istio.type.v1beta1.LabelSelector export_to_selectors = 6;
}
// Traffic policies to apply for a specific destination, across all
diff --git a/networking/v1alpha3/service_entry.pb.go b/networking/v1alpha3/service_entry.pb.go
index 164814714f..cf5af1485b 100644
--- a/networking/v1alpha3/service_entry.pb.go
+++ b/networking/v1alpha3/service_entry.pb.go
@@ -408,6 +408,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
v1alpha11 "istio.io/api/analysis/v1alpha1"
v1alpha1 "istio.io/api/meta/v1alpha1"
+ v1beta1 "istio.io/api/type/v1beta1"
reflect "reflect"
sync "sync"
unsafe "unsafe"
@@ -712,6 +713,39 @@ type ServiceEntry struct {
//
// **Note:** Ztunnel and Waypoint proxies not support this field and will read it at "*".
ExportTo []string `protobuf:"bytes,7,rep,name=export_to,json=exportTo,proto3" json:"export_to,omitempty"`
+ // A list of label selectors to dynamically select namespaces to which this
+ // service is exported. Each selector can match namespaces based on their labels.
+ // This provides a mechanism for service owners and mesh administrators to control
+ // the visibility of services across namespace boundaries without knowing namespace
+ // names in advance.
+ //
+ // For example, to export to all namespaces with a specific label:
+ // ```yaml
+ // exportToSelectors:
+ // - matchLabels:
+ // mesh: enabled
+ //
+ // ```
+ //
+ // Or using match expressions for more complex selection:
+ // ```yaml
+ // exportToSelectors:
+ // - matchExpressions:
+ // - key: environment
+ // operator: In
+ // values: [production, staging]
+ //
+ // ```
+ //
+ // When both export_to and export_to_selectors are specified, the service is
+ // exported to the union of all matched namespaces. If neither is specified,
+ // the service is exported to all namespaces by default.
+ //
+ // **Note:** Using "*" in export_to makes export_to_selectors redundant as
+ // the service would already be visible to all namespaces.
+ //
+ // **Note:** Ztunnel and Waypoint proxies do not support this field.
+ ExportToSelectors []*v1beta1.LabelSelector `protobuf:"bytes,10,rep,name=export_to_selectors,json=exportToSelectors,proto3" json:"export_to_selectors,omitempty"`
// If specified, the proxy will verify that the server certificate's
// subject alternate name matches one of the specified values.
//
@@ -810,6 +844,13 @@ func (x *ServiceEntry) GetExportTo() []string {
return nil
}
+func (x *ServiceEntry) GetExportToSelectors() []*v1beta1.LabelSelector {
+ if x != nil {
+ return x.ExportToSelectors
+ }
+ return nil
+}
+
func (x *ServiceEntry) GetSubjectAltNames() []string {
if x != nil {
return x.SubjectAltNames
@@ -1040,7 +1081,7 @@ var File_networking_v1alpha3_service_entry_proto protoreflect.FileDescriptor
const file_networking_v1alpha3_service_entry_proto_rawDesc = "" +
"\n" +
- "'networking/v1alpha3/service_entry.proto\x12\x19istio.networking.v1alpha3\x1a\x1fanalysis/v1alpha1/message.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1ameta/v1alpha1/status.proto\x1a!networking/v1alpha3/sidecar.proto\x1a(networking/v1alpha3/workload_entry.proto\"\x98\x05\n" +
+ "'networking/v1alpha3/service_entry.proto\x12\x19istio.networking.v1alpha3\x1a\x1fanalysis/v1alpha1/message.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1ameta/v1alpha1/status.proto\x1a!networking/v1alpha3/sidecar.proto\x1a(networking/v1alpha3/workload_entry.proto\x1a\x1btype/v1beta1/selector.proto\"\xeb\x05\n" +
"\fServiceEntry\x12\x1a\n" +
"\x05hosts\x18\x01 \x03(\tB\x04\xe2A\x01\x02R\x05hosts\x12\x1c\n" +
"\taddresses\x18\x02 \x03(\tR\taddresses\x12<\n" +
@@ -1051,7 +1092,9 @@ const file_networking_v1alpha3_service_entry_proto_rawDesc = "" +
"resolution\x12F\n" +
"\tendpoints\x18\x06 \x03(\v2(.istio.networking.v1alpha3.WorkloadEntryR\tendpoints\x12X\n" +
"\x11workload_selector\x18\t \x01(\v2+.istio.networking.v1alpha3.WorkloadSelectorR\x10workloadSelector\x12\x1b\n" +
- "\texport_to\x18\a \x03(\tR\bexportTo\x12*\n" +
+ "\texport_to\x18\a \x03(\tR\bexportTo\x12Q\n" +
+ "\x13export_to_selectors\x18\n" +
+ " \x03(\v2!.istio.type.v1beta1.LabelSelectorR\x11exportToSelectors\x12*\n" +
"\x11subject_alt_names\x18\b \x03(\tR\x0fsubjectAltNames\"0\n" +
"\bLocation\x12\x11\n" +
"\rMESH_EXTERNAL\x10\x00\x12\x11\n" +
@@ -1105,23 +1148,25 @@ var file_networking_v1alpha3_service_entry_proto_goTypes = []any{
(*ServiceEntryAddress)(nil), // 5: istio.networking.v1alpha3.ServiceEntryAddress
(*WorkloadEntry)(nil), // 6: istio.networking.v1alpha3.WorkloadEntry
(*WorkloadSelector)(nil), // 7: istio.networking.v1alpha3.WorkloadSelector
- (*v1alpha1.IstioCondition)(nil), // 8: istio.meta.v1alpha1.IstioCondition
- (*v1alpha11.AnalysisMessageBase)(nil), // 9: istio.analysis.v1alpha1.AnalysisMessageBase
+ (*v1beta1.LabelSelector)(nil), // 8: istio.type.v1beta1.LabelSelector
+ (*v1alpha1.IstioCondition)(nil), // 9: istio.meta.v1alpha1.IstioCondition
+ (*v1alpha11.AnalysisMessageBase)(nil), // 10: istio.analysis.v1alpha1.AnalysisMessageBase
}
var file_networking_v1alpha3_service_entry_proto_depIdxs = []int32{
- 3, // 0: istio.networking.v1alpha3.ServiceEntry.ports:type_name -> istio.networking.v1alpha3.ServicePort
- 0, // 1: istio.networking.v1alpha3.ServiceEntry.location:type_name -> istio.networking.v1alpha3.ServiceEntry.Location
- 1, // 2: istio.networking.v1alpha3.ServiceEntry.resolution:type_name -> istio.networking.v1alpha3.ServiceEntry.Resolution
- 6, // 3: istio.networking.v1alpha3.ServiceEntry.endpoints:type_name -> istio.networking.v1alpha3.WorkloadEntry
- 7, // 4: istio.networking.v1alpha3.ServiceEntry.workload_selector:type_name -> istio.networking.v1alpha3.WorkloadSelector
- 8, // 5: istio.networking.v1alpha3.ServiceEntryStatus.conditions:type_name -> istio.meta.v1alpha1.IstioCondition
- 9, // 6: istio.networking.v1alpha3.ServiceEntryStatus.validation_messages:type_name -> istio.analysis.v1alpha1.AnalysisMessageBase
- 5, // 7: istio.networking.v1alpha3.ServiceEntryStatus.addresses:type_name -> istio.networking.v1alpha3.ServiceEntryAddress
- 8, // [8:8] is the sub-list for method output_type
- 8, // [8:8] is the sub-list for method input_type
- 8, // [8:8] is the sub-list for extension type_name
- 8, // [8:8] is the sub-list for extension extendee
- 0, // [0:8] is the sub-list for field type_name
+ 3, // 0: istio.networking.v1alpha3.ServiceEntry.ports:type_name -> istio.networking.v1alpha3.ServicePort
+ 0, // 1: istio.networking.v1alpha3.ServiceEntry.location:type_name -> istio.networking.v1alpha3.ServiceEntry.Location
+ 1, // 2: istio.networking.v1alpha3.ServiceEntry.resolution:type_name -> istio.networking.v1alpha3.ServiceEntry.Resolution
+ 6, // 3: istio.networking.v1alpha3.ServiceEntry.endpoints:type_name -> istio.networking.v1alpha3.WorkloadEntry
+ 7, // 4: istio.networking.v1alpha3.ServiceEntry.workload_selector:type_name -> istio.networking.v1alpha3.WorkloadSelector
+ 8, // 5: istio.networking.v1alpha3.ServiceEntry.export_to_selectors:type_name -> istio.type.v1beta1.LabelSelector
+ 9, // 6: istio.networking.v1alpha3.ServiceEntryStatus.conditions:type_name -> istio.meta.v1alpha1.IstioCondition
+ 10, // 7: istio.networking.v1alpha3.ServiceEntryStatus.validation_messages:type_name -> istio.analysis.v1alpha1.AnalysisMessageBase
+ 5, // 8: istio.networking.v1alpha3.ServiceEntryStatus.addresses:type_name -> istio.networking.v1alpha3.ServiceEntryAddress
+ 9, // [9:9] is the sub-list for method output_type
+ 9, // [9:9] is the sub-list for method input_type
+ 9, // [9:9] is the sub-list for extension type_name
+ 9, // [9:9] is the sub-list for extension extendee
+ 0, // [0:9] is the sub-list for field type_name
}
func init() { file_networking_v1alpha3_service_entry_proto_init() }
diff --git a/networking/v1alpha3/service_entry.pb.html b/networking/v1alpha3/service_entry.pb.html
index 3122ef0311..9f78a99381 100644
--- a/networking/v1alpha3/service_entry.pb.html
+++ b/networking/v1alpha3/service_entry.pb.html
@@ -487,6 +487,37 @@ ServiceEntry
of namespace names.
Note: Ztunnel and Waypoint proxies not support this field and will read it at “*”.
+
+
+
+ |
+
+ A list of label selectors to dynamically select namespaces to which this
+service is exported. Each selector can match namespaces based on their labels.
+This provides a mechanism for service owners and mesh administrators to control
+the visibility of services across namespace boundaries without knowing namespace
+names in advance.
+For example, to export to all namespaces with a specific label:
+exportToSelectors:
+- matchLabels:
+ mesh: enabled
+
+Or using match expressions for more complex selection:
+exportToSelectors:
+- matchExpressions:
+ - key: environment
+ operator: In
+ values: [production, staging]
+
+When both export_to and export_to_selectors are specified, the service is
+exported to the union of all matched namespaces. If neither is specified,
+the service is exported to all namespaces by default.
+Note: Using “*” in export_to makes export_to_selectors redundant as
+the service would already be visible to all namespaces.
+Note: Ztunnel and Waypoint proxies do not support this field.
+
|
diff --git a/networking/v1alpha3/service_entry.proto b/networking/v1alpha3/service_entry.proto
index 883e74498b..816862de31 100644
--- a/networking/v1alpha3/service_entry.proto
+++ b/networking/v1alpha3/service_entry.proto
@@ -402,6 +402,7 @@ import "google/api/field_behavior.proto";
import "meta/v1alpha1/status.proto";
import "networking/v1alpha3/sidecar.proto";
import "networking/v1alpha3/workload_entry.proto";
+import "type/v1beta1/selector.proto";
option go_package = "istio.io/api/networking/v1alpha3";
@@ -593,14 +594,6 @@ message ServiceEntry {
// +kubebuilder:validation:MaxItems=4096
repeated WorkloadEntry endpoints = 6;
- // Applicable only for MESH_INTERNAL services. Only one of
- // `endpoints` or `workloadSelector` can be specified. Selects one
- // or more Kubernetes pods or VM workloads (specified using
- // `WorkloadEntry`) based on their labels. The `WorkloadEntry` object
- // representing the VMs should be defined in the same namespace as
- // the ServiceEntry.
- WorkloadSelector workload_selector = 9;
-
// A list of namespaces to which this service is exported. Exporting a service
// allows it to be used by sidecars, gateways and virtual services defined in
// other namespaces. This feature provides a mechanism for service owners
@@ -629,6 +622,46 @@ message ServiceEntry {
// to derive the additional subject alternate names that should be
// verified.
repeated string subject_alt_names = 8;
+
+ // Applicable only for MESH_INTERNAL services. Only one of
+ // `endpoints` or `workloadSelector` can be specified. Selects one
+ // or more Kubernetes pods or VM workloads (specified using
+ // `WorkloadEntry`) based on their labels. The `WorkloadEntry` object
+ // representing the VMs should be defined in the same namespace as
+ // the ServiceEntry.
+ WorkloadSelector workload_selector = 9;
+
+ // A list of label selectors to dynamically select namespaces to which this
+ // service is exported. Each selector can match namespaces based on their labels.
+ // This provides a mechanism for service owners and mesh administrators to control
+ // the visibility of services across namespace boundaries without knowing namespace
+ // names in advance.
+ //
+ // For example, to export to all namespaces with a specific label:
+ // ```yaml
+ // exportToSelectors:
+ // - matchLabels:
+ // mesh: enabled
+ // ```
+ //
+ // Or using match expressions for more complex selection:
+ // ```yaml
+ // exportToSelectors:
+ // - matchExpressions:
+ // - key: environment
+ // operator: In
+ // values: [production, staging]
+ // ```
+ //
+ // When both export_to and export_to_selectors are specified, the service is
+ // exported to the union of all matched namespaces. If neither is specified,
+ // the service is exported to all namespaces by default.
+ //
+ // **Note:** Using "*" in export_to makes export_to_selectors redundant as
+ // the service would already be visible to all namespaces.
+ //
+ // **Note:** Ztunnel and Waypoint proxies do not support this field.
+ repeated istio.type.v1beta1.LabelSelector export_to_selectors = 10;
}
// ServicePort describes the properties of a specific port of a service.
diff --git a/networking/v1alpha3/virtual_service.pb.go b/networking/v1alpha3/virtual_service.pb.go
index d4db2ab0c6..0e0056f9ad 100644
--- a/networking/v1alpha3/virtual_service.pb.go
+++ b/networking/v1alpha3/virtual_service.pb.go
@@ -124,6 +124,7 @@ import (
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ v1beta1 "istio.io/api/type/v1beta1"
reflect "reflect"
sync "sync"
unsafe "unsafe"
@@ -340,9 +341,40 @@ type VirtualService struct {
// The value "." is reserved and defines an export to the same namespace that
// the virtual service is declared in. Similarly the value "*" is reserved and
// defines an export to all namespaces.
- ExportTo []string `protobuf:"bytes,6,rep,name=export_to,json=exportTo,proto3" json:"export_to,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
+ ExportTo []string `protobuf:"bytes,6,rep,name=export_to,json=exportTo,proto3" json:"export_to,omitempty"`
+ // A list of label selectors to dynamically select namespaces to which this
+ // virtual service is exported. Each selector can match namespaces based on their labels.
+ // This provides a mechanism for service owners and mesh administrators to control
+ // the visibility of virtual services across namespace boundaries without knowing namespace
+ // names in advance.
+ //
+ // For example, to export to all namespaces with a specific label:
+ // ```yaml
+ // exportToSelectors:
+ // - matchLabels:
+ // mesh: enabled
+ //
+ // ```
+ //
+ // Or using match expressions for more complex selection:
+ // ```yaml
+ // exportToSelectors:
+ // - matchExpressions:
+ // - key: environment
+ // operator: In
+ // values: [production, staging]
+ //
+ // ```
+ //
+ // When both export_to and export_to_selectors are specified, the virtual service is
+ // exported to the union of all matched namespaces. If neither is specified,
+ // the virtual service is exported to all namespaces by default.
+ //
+ // **Note:** Using "*" in export_to makes export_to_selectors redundant as
+ // the virtual service would already be visible to all namespaces.
+ ExportToSelectors []*v1beta1.LabelSelector `protobuf:"bytes,7,rep,name=export_to_selectors,json=exportToSelectors,proto3" json:"export_to_selectors,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *VirtualService) Reset() {
@@ -417,6 +449,13 @@ func (x *VirtualService) GetExportTo() []string {
return nil
}
+func (x *VirtualService) GetExportToSelectors() []*v1beta1.LabelSelector {
+ if x != nil {
+ return x.ExportToSelectors
+ }
+ return nil
+}
+
// Destination indicates the network addressable service to which the
// request/connection will be sent after processing a routing rule. The
// destination.host should unambiguously refer to a service in the service
@@ -3514,14 +3553,15 @@ var File_networking_v1alpha3_virtual_service_proto protoreflect.FileDescriptor
const file_networking_v1alpha3_virtual_service_proto_rawDesc = "" +
"\n" +
- ")networking/v1alpha3/virtual_service.proto\x12\x19istio.networking.v1alpha3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x87\x02\n" +
+ ")networking/v1alpha3/virtual_service.proto\x12\x19istio.networking.v1alpha3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1btype/v1beta1/selector.proto\"\xda\x02\n" +
"\x0eVirtualService\x12\x14\n" +
"\x05hosts\x18\x01 \x03(\tR\x05hosts\x12\x1a\n" +
"\bgateways\x18\x02 \x03(\tR\bgateways\x128\n" +
"\x04http\x18\x03 \x03(\v2$.istio.networking.v1alpha3.HTTPRouteR\x04http\x125\n" +
"\x03tls\x18\x05 \x03(\v2#.istio.networking.v1alpha3.TLSRouteR\x03tls\x125\n" +
"\x03tcp\x18\x04 \x03(\v2#.istio.networking.v1alpha3.TCPRouteR\x03tcp\x12\x1b\n" +
- "\texport_to\x18\x06 \x03(\tR\bexportTo\"|\n" +
+ "\texport_to\x18\x06 \x03(\tR\bexportTo\x12Q\n" +
+ "\x13export_to_selectors\x18\a \x03(\v2!.istio.type.v1beta1.LabelSelectorR\x11exportToSelectors\"|\n" +
"\vDestination\x12\x18\n" +
"\x04host\x18\x01 \x01(\tB\x04\xe2A\x01\x02R\x04host\x12\x16\n" +
"\x06subset\x18\x02 \x01(\tR\x06subset\x12;\n" +
@@ -3763,78 +3803,80 @@ var file_networking_v1alpha3_virtual_service_proto_goTypes = []any{
nil, // 34: istio.networking.v1alpha3.TLSMatchAttributes.SourceLabelsEntry
(*HTTPFaultInjection_Delay)(nil), // 35: istio.networking.v1alpha3.HTTPFaultInjection.Delay
(*HTTPFaultInjection_Abort)(nil), // 36: istio.networking.v1alpha3.HTTPFaultInjection.Abort
- (*duration.Duration)(nil), // 37: google.protobuf.Duration
- (*wrappers.UInt32Value)(nil), // 38: google.protobuf.UInt32Value
- (*wrappers.BoolValue)(nil), // 39: google.protobuf.BoolValue
+ (*v1beta1.LabelSelector)(nil), // 37: istio.type.v1beta1.LabelSelector
+ (*duration.Duration)(nil), // 38: google.protobuf.Duration
+ (*wrappers.UInt32Value)(nil), // 39: google.protobuf.UInt32Value
+ (*wrappers.BoolValue)(nil), // 40: google.protobuf.BoolValue
}
var file_networking_v1alpha3_virtual_service_proto_depIdxs = []int32{
4, // 0: istio.networking.v1alpha3.VirtualService.http:type_name -> istio.networking.v1alpha3.HTTPRoute
7, // 1: istio.networking.v1alpha3.VirtualService.tls:type_name -> istio.networking.v1alpha3.TLSRoute
8, // 2: istio.networking.v1alpha3.VirtualService.tcp:type_name -> istio.networking.v1alpha3.TCPRoute
- 24, // 3: istio.networking.v1alpha3.Destination.port:type_name -> istio.networking.v1alpha3.PortSelector
- 9, // 4: istio.networking.v1alpha3.HTTPRoute.match:type_name -> istio.networking.v1alpha3.HTTPMatchRequest
- 10, // 5: istio.networking.v1alpha3.HTTPRoute.route:type_name -> istio.networking.v1alpha3.HTTPRouteDestination
- 14, // 6: istio.networking.v1alpha3.HTTPRoute.redirect:type_name -> istio.networking.v1alpha3.HTTPRedirect
- 15, // 7: istio.networking.v1alpha3.HTTPRoute.direct_response:type_name -> istio.networking.v1alpha3.HTTPDirectResponse
- 5, // 8: istio.networking.v1alpha3.HTTPRoute.delegate:type_name -> istio.networking.v1alpha3.Delegate
- 17, // 9: istio.networking.v1alpha3.HTTPRoute.rewrite:type_name -> istio.networking.v1alpha3.HTTPRewrite
- 37, // 10: istio.networking.v1alpha3.HTTPRoute.timeout:type_name -> google.protobuf.Duration
- 20, // 11: istio.networking.v1alpha3.HTTPRoute.retries:type_name -> istio.networking.v1alpha3.HTTPRetry
- 22, // 12: istio.networking.v1alpha3.HTTPRoute.fault:type_name -> istio.networking.v1alpha3.HTTPFaultInjection
- 3, // 13: istio.networking.v1alpha3.HTTPRoute.mirror:type_name -> istio.networking.v1alpha3.Destination
- 23, // 14: istio.networking.v1alpha3.HTTPRoute.mirrors:type_name -> istio.networking.v1alpha3.HTTPMirrorPolicy
- 38, // 15: istio.networking.v1alpha3.HTTPRoute.mirror_percent:type_name -> google.protobuf.UInt32Value
- 25, // 16: istio.networking.v1alpha3.HTTPRoute.mirror_percentage:type_name -> istio.networking.v1alpha3.Percent
- 21, // 17: istio.networking.v1alpha3.HTTPRoute.cors_policy:type_name -> istio.networking.v1alpha3.CorsPolicy
- 6, // 18: istio.networking.v1alpha3.HTTPRoute.headers:type_name -> istio.networking.v1alpha3.Headers
- 26, // 19: istio.networking.v1alpha3.Headers.request:type_name -> istio.networking.v1alpha3.Headers.HeaderOperations
- 26, // 20: istio.networking.v1alpha3.Headers.response:type_name -> istio.networking.v1alpha3.Headers.HeaderOperations
- 13, // 21: istio.networking.v1alpha3.TLSRoute.match:type_name -> istio.networking.v1alpha3.TLSMatchAttributes
- 11, // 22: istio.networking.v1alpha3.TLSRoute.route:type_name -> istio.networking.v1alpha3.RouteDestination
- 12, // 23: istio.networking.v1alpha3.TCPRoute.match:type_name -> istio.networking.v1alpha3.L4MatchAttributes
- 11, // 24: istio.networking.v1alpha3.TCPRoute.route:type_name -> istio.networking.v1alpha3.RouteDestination
- 19, // 25: istio.networking.v1alpha3.HTTPMatchRequest.uri:type_name -> istio.networking.v1alpha3.StringMatch
- 19, // 26: istio.networking.v1alpha3.HTTPMatchRequest.scheme:type_name -> istio.networking.v1alpha3.StringMatch
- 19, // 27: istio.networking.v1alpha3.HTTPMatchRequest.method:type_name -> istio.networking.v1alpha3.StringMatch
- 19, // 28: istio.networking.v1alpha3.HTTPMatchRequest.authority:type_name -> istio.networking.v1alpha3.StringMatch
- 29, // 29: istio.networking.v1alpha3.HTTPMatchRequest.headers:type_name -> istio.networking.v1alpha3.HTTPMatchRequest.HeadersEntry
- 30, // 30: istio.networking.v1alpha3.HTTPMatchRequest.source_labels:type_name -> istio.networking.v1alpha3.HTTPMatchRequest.SourceLabelsEntry
- 31, // 31: istio.networking.v1alpha3.HTTPMatchRequest.query_params:type_name -> istio.networking.v1alpha3.HTTPMatchRequest.QueryParamsEntry
- 32, // 32: istio.networking.v1alpha3.HTTPMatchRequest.without_headers:type_name -> istio.networking.v1alpha3.HTTPMatchRequest.WithoutHeadersEntry
- 3, // 33: istio.networking.v1alpha3.HTTPRouteDestination.destination:type_name -> istio.networking.v1alpha3.Destination
- 6, // 34: istio.networking.v1alpha3.HTTPRouteDestination.headers:type_name -> istio.networking.v1alpha3.Headers
- 3, // 35: istio.networking.v1alpha3.RouteDestination.destination:type_name -> istio.networking.v1alpha3.Destination
- 33, // 36: istio.networking.v1alpha3.L4MatchAttributes.source_labels:type_name -> istio.networking.v1alpha3.L4MatchAttributes.SourceLabelsEntry
- 34, // 37: istio.networking.v1alpha3.TLSMatchAttributes.source_labels:type_name -> istio.networking.v1alpha3.TLSMatchAttributes.SourceLabelsEntry
- 0, // 38: istio.networking.v1alpha3.HTTPRedirect.derive_port:type_name -> istio.networking.v1alpha3.HTTPRedirect.RedirectPortSelection
- 16, // 39: istio.networking.v1alpha3.HTTPDirectResponse.body:type_name -> istio.networking.v1alpha3.HTTPBody
- 18, // 40: istio.networking.v1alpha3.HTTPRewrite.uri_regex_rewrite:type_name -> istio.networking.v1alpha3.RegexRewrite
- 37, // 41: istio.networking.v1alpha3.HTTPRetry.per_try_timeout:type_name -> google.protobuf.Duration
- 39, // 42: istio.networking.v1alpha3.HTTPRetry.retry_remote_localities:type_name -> google.protobuf.BoolValue
- 39, // 43: istio.networking.v1alpha3.HTTPRetry.retry_ignore_previous_hosts:type_name -> google.protobuf.BoolValue
- 37, // 44: istio.networking.v1alpha3.HTTPRetry.backoff:type_name -> google.protobuf.Duration
- 19, // 45: istio.networking.v1alpha3.CorsPolicy.allow_origins:type_name -> istio.networking.v1alpha3.StringMatch
- 37, // 46: istio.networking.v1alpha3.CorsPolicy.max_age:type_name -> google.protobuf.Duration
- 39, // 47: istio.networking.v1alpha3.CorsPolicy.allow_credentials:type_name -> google.protobuf.BoolValue
- 1, // 48: istio.networking.v1alpha3.CorsPolicy.unmatched_preflights:type_name -> istio.networking.v1alpha3.CorsPolicy.UnmatchedPreflights
- 35, // 49: istio.networking.v1alpha3.HTTPFaultInjection.delay:type_name -> istio.networking.v1alpha3.HTTPFaultInjection.Delay
- 36, // 50: istio.networking.v1alpha3.HTTPFaultInjection.abort:type_name -> istio.networking.v1alpha3.HTTPFaultInjection.Abort
- 3, // 51: istio.networking.v1alpha3.HTTPMirrorPolicy.destination:type_name -> istio.networking.v1alpha3.Destination
- 25, // 52: istio.networking.v1alpha3.HTTPMirrorPolicy.percentage:type_name -> istio.networking.v1alpha3.Percent
- 27, // 53: istio.networking.v1alpha3.Headers.HeaderOperations.set:type_name -> istio.networking.v1alpha3.Headers.HeaderOperations.SetEntry
- 28, // 54: istio.networking.v1alpha3.Headers.HeaderOperations.add:type_name -> istio.networking.v1alpha3.Headers.HeaderOperations.AddEntry
- 19, // 55: istio.networking.v1alpha3.HTTPMatchRequest.HeadersEntry.value:type_name -> istio.networking.v1alpha3.StringMatch
- 19, // 56: istio.networking.v1alpha3.HTTPMatchRequest.QueryParamsEntry.value:type_name -> istio.networking.v1alpha3.StringMatch
- 19, // 57: istio.networking.v1alpha3.HTTPMatchRequest.WithoutHeadersEntry.value:type_name -> istio.networking.v1alpha3.StringMatch
- 37, // 58: istio.networking.v1alpha3.HTTPFaultInjection.Delay.fixed_delay:type_name -> google.protobuf.Duration
- 37, // 59: istio.networking.v1alpha3.HTTPFaultInjection.Delay.exponential_delay:type_name -> google.protobuf.Duration
- 25, // 60: istio.networking.v1alpha3.HTTPFaultInjection.Delay.percentage:type_name -> istio.networking.v1alpha3.Percent
- 25, // 61: istio.networking.v1alpha3.HTTPFaultInjection.Abort.percentage:type_name -> istio.networking.v1alpha3.Percent
- 62, // [62:62] is the sub-list for method output_type
- 62, // [62:62] is the sub-list for method input_type
- 62, // [62:62] is the sub-list for extension type_name
- 62, // [62:62] is the sub-list for extension extendee
- 0, // [0:62] is the sub-list for field type_name
+ 37, // 3: istio.networking.v1alpha3.VirtualService.export_to_selectors:type_name -> istio.type.v1beta1.LabelSelector
+ 24, // 4: istio.networking.v1alpha3.Destination.port:type_name -> istio.networking.v1alpha3.PortSelector
+ 9, // 5: istio.networking.v1alpha3.HTTPRoute.match:type_name -> istio.networking.v1alpha3.HTTPMatchRequest
+ 10, // 6: istio.networking.v1alpha3.HTTPRoute.route:type_name -> istio.networking.v1alpha3.HTTPRouteDestination
+ 14, // 7: istio.networking.v1alpha3.HTTPRoute.redirect:type_name -> istio.networking.v1alpha3.HTTPRedirect
+ 15, // 8: istio.networking.v1alpha3.HTTPRoute.direct_response:type_name -> istio.networking.v1alpha3.HTTPDirectResponse
+ 5, // 9: istio.networking.v1alpha3.HTTPRoute.delegate:type_name -> istio.networking.v1alpha3.Delegate
+ 17, // 10: istio.networking.v1alpha3.HTTPRoute.rewrite:type_name -> istio.networking.v1alpha3.HTTPRewrite
+ 38, // 11: istio.networking.v1alpha3.HTTPRoute.timeout:type_name -> google.protobuf.Duration
+ 20, // 12: istio.networking.v1alpha3.HTTPRoute.retries:type_name -> istio.networking.v1alpha3.HTTPRetry
+ 22, // 13: istio.networking.v1alpha3.HTTPRoute.fault:type_name -> istio.networking.v1alpha3.HTTPFaultInjection
+ 3, // 14: istio.networking.v1alpha3.HTTPRoute.mirror:type_name -> istio.networking.v1alpha3.Destination
+ 23, // 15: istio.networking.v1alpha3.HTTPRoute.mirrors:type_name -> istio.networking.v1alpha3.HTTPMirrorPolicy
+ 39, // 16: istio.networking.v1alpha3.HTTPRoute.mirror_percent:type_name -> google.protobuf.UInt32Value
+ 25, // 17: istio.networking.v1alpha3.HTTPRoute.mirror_percentage:type_name -> istio.networking.v1alpha3.Percent
+ 21, // 18: istio.networking.v1alpha3.HTTPRoute.cors_policy:type_name -> istio.networking.v1alpha3.CorsPolicy
+ 6, // 19: istio.networking.v1alpha3.HTTPRoute.headers:type_name -> istio.networking.v1alpha3.Headers
+ 26, // 20: istio.networking.v1alpha3.Headers.request:type_name -> istio.networking.v1alpha3.Headers.HeaderOperations
+ 26, // 21: istio.networking.v1alpha3.Headers.response:type_name -> istio.networking.v1alpha3.Headers.HeaderOperations
+ 13, // 22: istio.networking.v1alpha3.TLSRoute.match:type_name -> istio.networking.v1alpha3.TLSMatchAttributes
+ 11, // 23: istio.networking.v1alpha3.TLSRoute.route:type_name -> istio.networking.v1alpha3.RouteDestination
+ 12, // 24: istio.networking.v1alpha3.TCPRoute.match:type_name -> istio.networking.v1alpha3.L4MatchAttributes
+ 11, // 25: istio.networking.v1alpha3.TCPRoute.route:type_name -> istio.networking.v1alpha3.RouteDestination
+ 19, // 26: istio.networking.v1alpha3.HTTPMatchRequest.uri:type_name -> istio.networking.v1alpha3.StringMatch
+ 19, // 27: istio.networking.v1alpha3.HTTPMatchRequest.scheme:type_name -> istio.networking.v1alpha3.StringMatch
+ 19, // 28: istio.networking.v1alpha3.HTTPMatchRequest.method:type_name -> istio.networking.v1alpha3.StringMatch
+ 19, // 29: istio.networking.v1alpha3.HTTPMatchRequest.authority:type_name -> istio.networking.v1alpha3.StringMatch
+ 29, // 30: istio.networking.v1alpha3.HTTPMatchRequest.headers:type_name -> istio.networking.v1alpha3.HTTPMatchRequest.HeadersEntry
+ 30, // 31: istio.networking.v1alpha3.HTTPMatchRequest.source_labels:type_name -> istio.networking.v1alpha3.HTTPMatchRequest.SourceLabelsEntry
+ 31, // 32: istio.networking.v1alpha3.HTTPMatchRequest.query_params:type_name -> istio.networking.v1alpha3.HTTPMatchRequest.QueryParamsEntry
+ 32, // 33: istio.networking.v1alpha3.HTTPMatchRequest.without_headers:type_name -> istio.networking.v1alpha3.HTTPMatchRequest.WithoutHeadersEntry
+ 3, // 34: istio.networking.v1alpha3.HTTPRouteDestination.destination:type_name -> istio.networking.v1alpha3.Destination
+ 6, // 35: istio.networking.v1alpha3.HTTPRouteDestination.headers:type_name -> istio.networking.v1alpha3.Headers
+ 3, // 36: istio.networking.v1alpha3.RouteDestination.destination:type_name -> istio.networking.v1alpha3.Destination
+ 33, // 37: istio.networking.v1alpha3.L4MatchAttributes.source_labels:type_name -> istio.networking.v1alpha3.L4MatchAttributes.SourceLabelsEntry
+ 34, // 38: istio.networking.v1alpha3.TLSMatchAttributes.source_labels:type_name -> istio.networking.v1alpha3.TLSMatchAttributes.SourceLabelsEntry
+ 0, // 39: istio.networking.v1alpha3.HTTPRedirect.derive_port:type_name -> istio.networking.v1alpha3.HTTPRedirect.RedirectPortSelection
+ 16, // 40: istio.networking.v1alpha3.HTTPDirectResponse.body:type_name -> istio.networking.v1alpha3.HTTPBody
+ 18, // 41: istio.networking.v1alpha3.HTTPRewrite.uri_regex_rewrite:type_name -> istio.networking.v1alpha3.RegexRewrite
+ 38, // 42: istio.networking.v1alpha3.HTTPRetry.per_try_timeout:type_name -> google.protobuf.Duration
+ 40, // 43: istio.networking.v1alpha3.HTTPRetry.retry_remote_localities:type_name -> google.protobuf.BoolValue
+ 40, // 44: istio.networking.v1alpha3.HTTPRetry.retry_ignore_previous_hosts:type_name -> google.protobuf.BoolValue
+ 38, // 45: istio.networking.v1alpha3.HTTPRetry.backoff:type_name -> google.protobuf.Duration
+ 19, // 46: istio.networking.v1alpha3.CorsPolicy.allow_origins:type_name -> istio.networking.v1alpha3.StringMatch
+ 38, // 47: istio.networking.v1alpha3.CorsPolicy.max_age:type_name -> google.protobuf.Duration
+ 40, // 48: istio.networking.v1alpha3.CorsPolicy.allow_credentials:type_name -> google.protobuf.BoolValue
+ 1, // 49: istio.networking.v1alpha3.CorsPolicy.unmatched_preflights:type_name -> istio.networking.v1alpha3.CorsPolicy.UnmatchedPreflights
+ 35, // 50: istio.networking.v1alpha3.HTTPFaultInjection.delay:type_name -> istio.networking.v1alpha3.HTTPFaultInjection.Delay
+ 36, // 51: istio.networking.v1alpha3.HTTPFaultInjection.abort:type_name -> istio.networking.v1alpha3.HTTPFaultInjection.Abort
+ 3, // 52: istio.networking.v1alpha3.HTTPMirrorPolicy.destination:type_name -> istio.networking.v1alpha3.Destination
+ 25, // 53: istio.networking.v1alpha3.HTTPMirrorPolicy.percentage:type_name -> istio.networking.v1alpha3.Percent
+ 27, // 54: istio.networking.v1alpha3.Headers.HeaderOperations.set:type_name -> istio.networking.v1alpha3.Headers.HeaderOperations.SetEntry
+ 28, // 55: istio.networking.v1alpha3.Headers.HeaderOperations.add:type_name -> istio.networking.v1alpha3.Headers.HeaderOperations.AddEntry
+ 19, // 56: istio.networking.v1alpha3.HTTPMatchRequest.HeadersEntry.value:type_name -> istio.networking.v1alpha3.StringMatch
+ 19, // 57: istio.networking.v1alpha3.HTTPMatchRequest.QueryParamsEntry.value:type_name -> istio.networking.v1alpha3.StringMatch
+ 19, // 58: istio.networking.v1alpha3.HTTPMatchRequest.WithoutHeadersEntry.value:type_name -> istio.networking.v1alpha3.StringMatch
+ 38, // 59: istio.networking.v1alpha3.HTTPFaultInjection.Delay.fixed_delay:type_name -> google.protobuf.Duration
+ 38, // 60: istio.networking.v1alpha3.HTTPFaultInjection.Delay.exponential_delay:type_name -> google.protobuf.Duration
+ 25, // 61: istio.networking.v1alpha3.HTTPFaultInjection.Delay.percentage:type_name -> istio.networking.v1alpha3.Percent
+ 25, // 62: istio.networking.v1alpha3.HTTPFaultInjection.Abort.percentage:type_name -> istio.networking.v1alpha3.Percent
+ 63, // [63:63] is the sub-list for method output_type
+ 63, // [63:63] is the sub-list for method input_type
+ 63, // [63:63] is the sub-list for extension type_name
+ 63, // [63:63] is the sub-list for extension extendee
+ 0, // [0:63] is the sub-list for field type_name
}
func init() { file_networking_v1alpha3_virtual_service_proto_init() }
diff --git a/networking/v1alpha3/virtual_service.pb.html b/networking/v1alpha3/virtual_service.pb.html
index 637a497cc1..d01fcdf33e 100644
--- a/networking/v1alpha3/virtual_service.pb.html
+++ b/networking/v1alpha3/virtual_service.pb.html
@@ -208,6 +208,36 @@ VirtualService
the virtual service is declared in. Similarly the value “*” is reserved and
defines an export to all namespaces.
+
+
+
+ |
+
+ A list of label selectors to dynamically select namespaces to which this
+virtual service is exported. Each selector can match namespaces based on their labels.
+This provides a mechanism for service owners and mesh administrators to control
+the visibility of virtual services across namespace boundaries without knowing namespace
+names in advance.
+For example, to export to all namespaces with a specific label:
+exportToSelectors:
+- matchLabels:
+ mesh: enabled
+
+Or using match expressions for more complex selection:
+exportToSelectors:
+- matchExpressions:
+ - key: environment
+ operator: In
+ values: [production, staging]
+
+When both export_to and export_to_selectors are specified, the virtual service is
+exported to the union of all matched namespaces. If neither is specified,
+the virtual service is exported to all namespaces by default.
+Note: Using “*” in export_to makes export_to_selectors redundant as
+the virtual service would already be visible to all namespaces.
+
|
diff --git a/networking/v1alpha3/virtual_service.proto b/networking/v1alpha3/virtual_service.proto
index d81ad2d72c..3d2b573786 100644
--- a/networking/v1alpha3/virtual_service.proto
+++ b/networking/v1alpha3/virtual_service.proto
@@ -116,6 +116,7 @@ package istio.networking.v1alpha3;
import "google/api/field_behavior.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
+import "type/v1beta1/selector.proto";
option go_package = "istio.io/api/networking/v1alpha3";
@@ -228,6 +229,36 @@ message VirtualService {
// the virtual service is declared in. Similarly the value "*" is reserved and
// defines an export to all namespaces.
repeated string export_to = 6;
+
+ // A list of label selectors to dynamically select namespaces to which this
+ // virtual service is exported. Each selector can match namespaces based on their labels.
+ // This provides a mechanism for service owners and mesh administrators to control
+ // the visibility of virtual services across namespace boundaries without knowing namespace
+ // names in advance.
+ //
+ // For example, to export to all namespaces with a specific label:
+ // ```yaml
+ // exportToSelectors:
+ // - matchLabels:
+ // mesh: enabled
+ // ```
+ //
+ // Or using match expressions for more complex selection:
+ // ```yaml
+ // exportToSelectors:
+ // - matchExpressions:
+ // - key: environment
+ // operator: In
+ // values: [production, staging]
+ // ```
+ //
+ // When both export_to and export_to_selectors are specified, the virtual service is
+ // exported to the union of all matched namespaces. If neither is specified,
+ // the virtual service is exported to all namespaces by default.
+ //
+ // **Note:** Using "*" in export_to makes export_to_selectors redundant as
+ // the virtual service would already be visible to all namespaces.
+ repeated istio.type.v1beta1.LabelSelector export_to_selectors = 7;
}
// Destination indicates the network addressable service to which the
diff --git a/type/v1beta1/selector.pb.go b/type/v1beta1/selector.pb.go
index e4cc6e601c..6a51097f89 100644
--- a/type/v1beta1/selector.pb.go
+++ b/type/v1beta1/selector.pb.go
@@ -213,6 +213,140 @@ func (x *PortSelector) GetNumber() uint32 {
return 0
}
+// LabelSelector is a label query over resources.
+// It matches resources based on their labels.
+// Copied from Kubernetes to avoid expensive dependency on Kubernetes libraries.
+type LabelSelector struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ // map is equivalent to an element of matchExpressions, whose key field is "key", the
+ // operator is "In", and the values array contains only "value". The requirements are ANDed.
+ // +optional
+ MatchLabels map[string]string `protobuf:"bytes,1,rep,name=matchLabels,proto3" json:"matchLabels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ // matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ // +optional
+ MatchExpressions []*LabelSelectorRequirement `protobuf:"bytes,2,rep,name=matchExpressions,proto3" json:"matchExpressions,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *LabelSelector) Reset() {
+ *x = LabelSelector{}
+ mi := &file_type_v1beta1_selector_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *LabelSelector) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LabelSelector) ProtoMessage() {}
+
+func (x *LabelSelector) ProtoReflect() protoreflect.Message {
+ mi := &file_type_v1beta1_selector_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LabelSelector.ProtoReflect.Descriptor instead.
+func (*LabelSelector) Descriptor() ([]byte, []int) {
+ return file_type_v1beta1_selector_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *LabelSelector) GetMatchLabels() map[string]string {
+ if x != nil {
+ return x.MatchLabels
+ }
+ return nil
+}
+
+func (x *LabelSelector) GetMatchExpressions() []*LabelSelectorRequirement {
+ if x != nil {
+ return x.MatchExpressions
+ }
+ return nil
+}
+
+// A label selector requirement is a selector that contains values, a key, and an operator that
+// relates the key and values.
+// Copied from Kubernetes to avoid expensive dependency on Kubernetes libraries.
+type LabelSelectorRequirement struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // key is the label key that the selector applies to.
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ // operator represents a key's relationship to a set of values.
+ // Valid operators are In, NotIn, Exists and DoesNotExist.
+ Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"`
+ // values is an array of string values. If the operator is In or NotIn,
+ // the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ // the values array must be empty. This array is replaced during a strategic
+ // merge patch.
+ // +optional
+ Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *LabelSelectorRequirement) Reset() {
+ *x = LabelSelectorRequirement{}
+ mi := &file_type_v1beta1_selector_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *LabelSelectorRequirement) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LabelSelectorRequirement) ProtoMessage() {}
+
+func (x *LabelSelectorRequirement) ProtoReflect() protoreflect.Message {
+ mi := &file_type_v1beta1_selector_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LabelSelectorRequirement.ProtoReflect.Descriptor instead.
+func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) {
+ return file_type_v1beta1_selector_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *LabelSelectorRequirement) GetKey() string {
+ if x != nil {
+ return x.Key
+ }
+ return ""
+}
+
+func (x *LabelSelectorRequirement) GetOperator() string {
+ if x != nil {
+ return x.Operator
+ }
+ return ""
+}
+
+func (x *LabelSelectorRequirement) GetValues() []string {
+ if x != nil {
+ return x.Values
+ }
+ return nil
+}
+
// PolicyTargetReference format as defined by [GEP-2648](https://gateway-api.sigs.k8s.io/geps/gep-2648/#direct-policy-design-rules).
//
// PolicyTargetReference specifies the targeted resource which the policy
@@ -276,7 +410,7 @@ type PolicyTargetReference struct {
func (x *PolicyTargetReference) Reset() {
*x = PolicyTargetReference{}
- mi := &file_type_v1beta1_selector_proto_msgTypes[2]
+ mi := &file_type_v1beta1_selector_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -288,7 +422,7 @@ func (x *PolicyTargetReference) String() string {
func (*PolicyTargetReference) ProtoMessage() {}
func (x *PolicyTargetReference) ProtoReflect() protoreflect.Message {
- mi := &file_type_v1beta1_selector_proto_msgTypes[2]
+ mi := &file_type_v1beta1_selector_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -301,7 +435,7 @@ func (x *PolicyTargetReference) ProtoReflect() protoreflect.Message {
// Deprecated: Use PolicyTargetReference.ProtoReflect.Descriptor instead.
func (*PolicyTargetReference) Descriptor() ([]byte, []int) {
- return file_type_v1beta1_selector_proto_rawDescGZIP(), []int{2}
+ return file_type_v1beta1_selector_proto_rawDescGZIP(), []int{4}
}
func (x *PolicyTargetReference) GetGroup() string {
@@ -343,7 +477,17 @@ const file_type_v1beta1_selector_proto_rawDesc = "" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\",\n" +
"\fPortSelector\x12\x1c\n" +
- "\x06number\x18\x01 \x01(\rB\x04\xe2A\x01\x02R\x06number\"\x7f\n" +
+ "\x06number\x18\x01 \x01(\rB\x04\xe2A\x01\x02R\x06number\"\xff\x01\n" +
+ "\rLabelSelector\x12T\n" +
+ "\vmatchLabels\x18\x01 \x03(\v22.istio.type.v1beta1.LabelSelector.MatchLabelsEntryR\vmatchLabels\x12X\n" +
+ "\x10matchExpressions\x18\x02 \x03(\v2,.istio.type.v1beta1.LabelSelectorRequirementR\x10matchExpressions\x1a>\n" +
+ "\x10MatchLabelsEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
+ "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"`\n" +
+ "\x18LabelSelectorRequirement\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12\x1a\n" +
+ "\boperator\x18\x02 \x01(\tR\boperator\x12\x16\n" +
+ "\x06values\x18\x03 \x03(\tR\x06values\"\x7f\n" +
"\x15PolicyTargetReference\x12\x14\n" +
"\x05group\x18\x01 \x01(\tR\x05group\x12\x18\n" +
"\x04kind\x18\x02 \x01(\tB\x04\xe2A\x01\x02R\x04kind\x12\x18\n" +
@@ -370,21 +514,26 @@ func file_type_v1beta1_selector_proto_rawDescGZIP() []byte {
}
var file_type_v1beta1_selector_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_type_v1beta1_selector_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_type_v1beta1_selector_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_type_v1beta1_selector_proto_goTypes = []any{
- (WorkloadMode)(0), // 0: istio.type.v1beta1.WorkloadMode
- (*WorkloadSelector)(nil), // 1: istio.type.v1beta1.WorkloadSelector
- (*PortSelector)(nil), // 2: istio.type.v1beta1.PortSelector
- (*PolicyTargetReference)(nil), // 3: istio.type.v1beta1.PolicyTargetReference
- nil, // 4: istio.type.v1beta1.WorkloadSelector.MatchLabelsEntry
+ (WorkloadMode)(0), // 0: istio.type.v1beta1.WorkloadMode
+ (*WorkloadSelector)(nil), // 1: istio.type.v1beta1.WorkloadSelector
+ (*PortSelector)(nil), // 2: istio.type.v1beta1.PortSelector
+ (*LabelSelector)(nil), // 3: istio.type.v1beta1.LabelSelector
+ (*LabelSelectorRequirement)(nil), // 4: istio.type.v1beta1.LabelSelectorRequirement
+ (*PolicyTargetReference)(nil), // 5: istio.type.v1beta1.PolicyTargetReference
+ nil, // 6: istio.type.v1beta1.WorkloadSelector.MatchLabelsEntry
+ nil, // 7: istio.type.v1beta1.LabelSelector.MatchLabelsEntry
}
var file_type_v1beta1_selector_proto_depIdxs = []int32{
- 4, // 0: istio.type.v1beta1.WorkloadSelector.match_labels:type_name -> istio.type.v1beta1.WorkloadSelector.MatchLabelsEntry
- 1, // [1:1] is the sub-list for method output_type
- 1, // [1:1] is the sub-list for method input_type
- 1, // [1:1] is the sub-list for extension type_name
- 1, // [1:1] is the sub-list for extension extendee
- 0, // [0:1] is the sub-list for field type_name
+ 6, // 0: istio.type.v1beta1.WorkloadSelector.match_labels:type_name -> istio.type.v1beta1.WorkloadSelector.MatchLabelsEntry
+ 7, // 1: istio.type.v1beta1.LabelSelector.matchLabels:type_name -> istio.type.v1beta1.LabelSelector.MatchLabelsEntry
+ 4, // 2: istio.type.v1beta1.LabelSelector.matchExpressions:type_name -> istio.type.v1beta1.LabelSelectorRequirement
+ 3, // [3:3] is the sub-list for method output_type
+ 3, // [3:3] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
}
func init() { file_type_v1beta1_selector_proto_init() }
@@ -398,7 +547,7 @@ func file_type_v1beta1_selector_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_type_v1beta1_selector_proto_rawDesc), len(file_type_v1beta1_selector_proto_rawDesc)),
NumEnums: 1,
- NumMessages: 4,
+ NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/type/v1beta1/selector.pb.html b/type/v1beta1/selector.pb.html
index 7caf080ba4..d113e41a15 100644
--- a/type/v1beta1/selector.pb.html
+++ b/type/v1beta1/selector.pb.html
@@ -4,7 +4,7 @@
location: https://istio.io/docs/reference/config/type/workload-selector.html
layout: protoc-gen-docs
generator: protoc-gen-docs
-number_of_entries: 4
+number_of_entries: 6
---
WorkloadSelector
@@ -58,6 +58,91 @@ PortSelector
Port number
+ |
+
+
+
+
+LabelSelector
+
+LabelSelector is a label query over resources.
+It matches resources based on their labels.
+Copied from Kubernetes to avoid expensive dependency on Kubernetes libraries.
+
+
+
+
+| Field |
+Description |
+
+
+
+
+ |
+
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+map is equivalent to an element of matchExpressions, whose key field is “key”, the
+operator is “In”, and the values array contains only “value”. The requirements are ANDed.
+
+ |
+
+
+ |
+
+ matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
+ |
+
+
+
+
+LabelSelectorRequirement
+
+A label selector requirement is a selector that contains values, a key, and an operator that
+relates the key and values.
+Copied from Kubernetes to avoid expensive dependency on Kubernetes libraries.
+
+
+
+
+| Field |
+Description |
+
+
+
+
+ |
+
+ key is the label key that the selector applies to.
+
+ |
+
+
+ |
+
+ operator represents a key’s relationship to a set of values.
+Valid operators are In, NotIn, Exists and DoesNotExist.
+
+ |
+
+
+ |
+
+ values is an array of string values. If the operator is In or NotIn,
+the values array must be non-empty. If the operator is Exists or DoesNotExist,
+the values array must be empty. This array is replaced during a strategic
+merge patch.
+
|
diff --git a/type/v1beta1/selector.proto b/type/v1beta1/selector.proto
index 1e5a791440..7494d14ae7 100644
--- a/type/v1beta1/selector.proto
+++ b/type/v1beta1/selector.proto
@@ -74,6 +74,42 @@ enum WorkloadMode {
CLIENT_AND_SERVER = 3;
}
+// LabelSelector is a label query over resources.
+// It matches resources based on their labels.
+// Copied from Kubernetes to avoid expensive dependency on Kubernetes libraries.
+message LabelSelector {
+ // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ // map is equivalent to an element of matchExpressions, whose key field is "key", the
+ // operator is "In", and the values array contains only "value". The requirements are ANDed.
+ // +optional
+ map matchLabels = 1;
+
+ // matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ // +optional
+ repeated LabelSelectorRequirement matchExpressions = 2;
+}
+
+// A label selector requirement is a selector that contains values, a key, and an operator that
+// relates the key and values.
+// Copied from Kubernetes to avoid expensive dependency on Kubernetes libraries.
+message LabelSelectorRequirement {
+ // key is the label key that the selector applies to.
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ string key = 1;
+
+ // operator represents a key's relationship to a set of values.
+ // Valid operators are In, NotIn, Exists and DoesNotExist.
+ string operator = 2;
+
+ // values is an array of string values. If the operator is In or NotIn,
+ // the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ // the values array must be empty. This array is replaced during a strategic
+ // merge patch.
+ // +optional
+ repeated string values = 3;
+}
+
// PolicyTargetReference format as defined by [GEP-2648](https://gateway-api.sigs.k8s.io/geps/gep-2648/#direct-policy-design-rules).
//
// PolicyTargetReference specifies the targeted resource which the policy
diff --git a/type/v1beta1/selector_deepcopy.gen.go b/type/v1beta1/selector_deepcopy.gen.go
index d9ebb472c1..653d1e7769 100644
--- a/type/v1beta1/selector_deepcopy.gen.go
+++ b/type/v1beta1/selector_deepcopy.gen.go
@@ -47,6 +47,48 @@ func (in *PortSelector) DeepCopyInterface() interface{} {
return in.DeepCopy()
}
+// DeepCopyInto supports using LabelSelector within kubernetes types, where deepcopy-gen is used.
+func (in *LabelSelector) DeepCopyInto(out *LabelSelector) {
+ p := proto.Clone(in).(*LabelSelector)
+ *out = *p
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelector. Required by controller-gen.
+func (in *LabelSelector) DeepCopy() *LabelSelector {
+ if in == nil {
+ return nil
+ }
+ out := new(LabelSelector)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelector. Required by controller-gen.
+func (in *LabelSelector) DeepCopyInterface() interface{} {
+ return in.DeepCopy()
+}
+
+// DeepCopyInto supports using LabelSelectorRequirement within kubernetes types, where deepcopy-gen is used.
+func (in *LabelSelectorRequirement) DeepCopyInto(out *LabelSelectorRequirement) {
+ p := proto.Clone(in).(*LabelSelectorRequirement)
+ *out = *p
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelectorRequirement. Required by controller-gen.
+func (in *LabelSelectorRequirement) DeepCopy() *LabelSelectorRequirement {
+ if in == nil {
+ return nil
+ }
+ out := new(LabelSelectorRequirement)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelectorRequirement. Required by controller-gen.
+func (in *LabelSelectorRequirement) DeepCopyInterface() interface{} {
+ return in.DeepCopy()
+}
+
// DeepCopyInto supports using PolicyTargetReference within kubernetes types, where deepcopy-gen is used.
func (in *PolicyTargetReference) DeepCopyInto(out *PolicyTargetReference) {
p := proto.Clone(in).(*PolicyTargetReference)
diff --git a/type/v1beta1/selector_json.gen.go b/type/v1beta1/selector_json.gen.go
index 8b29ef9895..f68ae6d2cb 100644
--- a/type/v1beta1/selector_json.gen.go
+++ b/type/v1beta1/selector_json.gen.go
@@ -28,6 +28,28 @@ func (this *PortSelector) UnmarshalJSON(b []byte) error {
return SelectorUnmarshaler.Unmarshal(bytes.NewReader(b), this)
}
+// MarshalJSON is a custom marshaler for LabelSelector
+func (this *LabelSelector) MarshalJSON() ([]byte, error) {
+ str, err := SelectorMarshaler.MarshalToString(this)
+ return []byte(str), err
+}
+
+// UnmarshalJSON is a custom unmarshaler for LabelSelector
+func (this *LabelSelector) UnmarshalJSON(b []byte) error {
+ return SelectorUnmarshaler.Unmarshal(bytes.NewReader(b), this)
+}
+
+// MarshalJSON is a custom marshaler for LabelSelectorRequirement
+func (this *LabelSelectorRequirement) MarshalJSON() ([]byte, error) {
+ str, err := SelectorMarshaler.MarshalToString(this)
+ return []byte(str), err
+}
+
+// UnmarshalJSON is a custom unmarshaler for LabelSelectorRequirement
+func (this *LabelSelectorRequirement) UnmarshalJSON(b []byte) error {
+ return SelectorUnmarshaler.Unmarshal(bytes.NewReader(b), this)
+}
+
// MarshalJSON is a custom marshaler for PolicyTargetReference
func (this *PolicyTargetReference) MarshalJSON() ([]byte, error) {
str, err := SelectorMarshaler.MarshalToString(this)