Update trafficDistribution API spec docs for GA graduation

This commit is contained in:
Gaurav Ghildiyal 2025-03-09 14:35:03 -07:00
parent 0f2bde7745
commit 0d0b81b937
2 changed files with 22 additions and 27 deletions

View File

@ -4550,13 +4550,11 @@ const (
// These are valid values for the TrafficDistribution field of a Service. // These are valid values for the TrafficDistribution field of a Service.
const ( const (
// Indicates a preference for routing traffic to endpoints that are // Indicates a preference for routing traffic to endpoints that are in the
// topologically proximate to the client. The interpretation of "topologically // same zone as the client. Setting this value gives implementations
// proximate" may vary across implementations and could encompass endpoints // permission to make different tradeoffs, e.g. optimizing for proximity
// within the same node, rack, zone, or even region. Setting this value gives // rather than equal distribution of load. Users should not set this value
// implementations permission to make different tradeoffs, e.g. optimizing for // if such tradeoffs are not acceptable.
// proximity rather than equal distribution of load. Users should not set this
// value if such tradeoffs are not acceptable.
ServiceTrafficDistributionPreferClose = "PreferClose" ServiceTrafficDistributionPreferClose = "PreferClose"
) )
@ -4824,12 +4822,12 @@ type ServiceSpec struct {
// +optional // +optional
InternalTrafficPolicy *ServiceInternalTrafficPolicy InternalTrafficPolicy *ServiceInternalTrafficPolicy
// TrafficDistribution offers a way to express preferences for how traffic is // TrafficDistribution offers a way to express preferences for how traffic
// distributed to Service endpoints. Implementations can use this field as a // is distributed to Service endpoints. Implementations can use this field
// hint, but are not required to guarantee strict adherence. If the field is // as a hint, but are not required to guarantee strict adherence. If the
// not set, the implementation will apply its default routing strategy. If set // field is not set, the implementation will apply its default routing
// to "PreferClose", implementations should prioritize endpoints that are // strategy. If set to "PreferClose", implementations should prioritize
// topologically close (e.g., same zone). // endpoints that are in the same zone.
// +optional // +optional
TrafficDistribution *string TrafficDistribution *string
} }

View File

@ -5344,13 +5344,11 @@ const (
// These are valid values for the TrafficDistribution field of a Service. // These are valid values for the TrafficDistribution field of a Service.
const ( const (
// Indicates a preference for routing traffic to endpoints that are // Indicates a preference for routing traffic to endpoints that are in the
// topologically proximate to the client. The interpretation of "topologically // same zone as the client. Setting this value gives implementations
// proximate" may vary across implementations and could encompass endpoints // permission to make different tradeoffs, e.g. optimizing for proximity
// within the same node, rack, zone, or even region. Setting this value gives // rather than equal distribution of load. Users should not set this value
// implementations permission to make different tradeoffs, e.g. optimizing for // if such tradeoffs are not acceptable.
// proximity rather than equal distribution of load. Users should not set this
// value if such tradeoffs are not acceptable.
ServiceTrafficDistributionPreferClose = "PreferClose" ServiceTrafficDistributionPreferClose = "PreferClose"
) )
@ -5699,13 +5697,12 @@ type ServiceSpec struct {
// +optional // +optional
InternalTrafficPolicy *ServiceInternalTrafficPolicy `json:"internalTrafficPolicy,omitempty" protobuf:"bytes,22,opt,name=internalTrafficPolicy"` InternalTrafficPolicy *ServiceInternalTrafficPolicy `json:"internalTrafficPolicy,omitempty" protobuf:"bytes,22,opt,name=internalTrafficPolicy"`
// TrafficDistribution offers a way to express preferences for how traffic is // TrafficDistribution offers a way to express preferences for how traffic
// distributed to Service endpoints. Implementations can use this field as a // is distributed to Service endpoints. Implementations can use this field
// hint, but are not required to guarantee strict adherence. If the field is // as a hint, but are not required to guarantee strict adherence. If the
// not set, the implementation will apply its default routing strategy. If set // field is not set, the implementation will apply its default routing
// to "PreferClose", implementations should prioritize endpoints that are // strategy. If set to "PreferClose", implementations should prioritize
// topologically close (e.g., same zone). // endpoints that are in the same zone.
// This is a beta field and requires enabling ServiceTrafficDistribution feature.
// +featureGate=ServiceTrafficDistribution // +featureGate=ServiceTrafficDistribution
// +optional // +optional
TrafficDistribution *string `json:"trafficDistribution,omitempty" protobuf:"bytes,23,opt,name=trafficDistribution"` TrafficDistribution *string `json:"trafficDistribution,omitempty" protobuf:"bytes,23,opt,name=trafficDistribution"`