You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This new field will intersect with externalTrafficPolicy in the following ways:
143
+
* if `externalTrafficPolicy=Cluster`, traffic will be routed based on `trafficPolicy` for external sources
144
+
* if `externalTrafficPolicy=Local`, `externalTrafficPolicy` will take precedent over `trafficPolicy`, but only for external sources.
145
+
138
146
Proposed changes to kube-proxy:
139
-
* when `internalTrafficPolicy=Cluster`, default to existing behavior today.
140
-
* when `internalTrafficPolicy=PreferLocal`, route to endpoints in EndpointSlice that matches the local node's topology (topology defined by `kubernetes.io/hostname`),
147
+
* when `trafficPolicy=Cluster`, default to existing behavior today.
148
+
* when `trafficPolicy=Topology`, use topology hints from EndpointSlice API.
149
+
* when `trafficPolicy=PreferLocal`, route to endpoints in EndpointSlice that matches the local node's topology (topology defined by `kubernetes.io/hostname`),
141
150
fall back to "Cluster" behavior if there are no local endpoints.
142
-
* when `internalTrafficPolicy=Local`, route to endpoints in EndpointSlice that maches the local node's topology, drop traffic if none exist.
151
+
* when `trafficPolicy=Local`, route to endpoints in EndpointSlice that maches the local node's topology, drop traffic if none exist.
143
152
144
153
### Test Plan
145
154
146
155
Unit tests:
147
-
* unit tests validating API strategy/validation for when `internalTrafficPolicy` is set on Service.
148
-
* unit tests exercising kube-proxy behavior when `internalTrafficPolicy` is set to all possible values.
156
+
* unit tests validating API strategy/validation for when `trafficPolicy` is set on Service.
157
+
* unit tests exercising kube-proxy behavior when `trafficPolicy` is set to all possible values.
149
158
150
159
E2E test:
151
-
* e2e tests validating default behavior with kube-proxy did not change when `internalTrafficPolicy` defaults to `Cluster`. Existing tests should cover this.
152
-
* e2e tests validating that traffic is preferred to local endpoints when `internalTrafficPolicy` is set to `PreferLocal`.
153
-
* e2e tests validating that traffic is only sent to node-local endpoints when `internalTrafficPolicy` is set to `Local`.
160
+
* e2e tests validating default behavior with kube-proxy did not change when `trafficPolicy` defaults to `Cluster`. Existing tests should cover this.
161
+
* e2e tests validating that traffic is preferred to local endpoints when `trafficPolicy` is set to `PreferLocal`.
162
+
* e2e tests validating that traffic is only sent to node-local endpoints when `trafficPolicy` is set to `Local`.
154
163
155
164
### Graduation Criteria
156
165
157
166
Alpha:
158
-
* feature gate `ServiceInternalTrafficPolicy`_must_ be enabled for apiserver to accept values for `spec.internalTrafficPolicy`. Otherwise field is dropped.
159
-
* kube-proxy handles traffic routing for 3 initial internal traffic policies `Cluster`, `PreferLocal` and `Local`.
167
+
* feature gate `ServiceTrafficPolicy`_must_ be enabled for apiserver to accept values for `spec.trafficPolicy`. Otherwise field is dropped.
168
+
* kube-proxy handles traffic routing for 4 initial internal traffic policies `Cluster`, `Topology`, `PreferLocal` and `Local`.
160
169
* Unit tests as defined in "Test Plan" section above. E2E tests are nice to have but not required for Alpha.
161
170
162
171
163
172
### Upgrade / Downgrade Strategy
164
173
165
-
* The `internalTrafficPolicy` field will be off by default during the alpha stage but can handle any existing Services that has the field already set.
174
+
* The `trafficPolicy` field will be off by default during the alpha stage but can handle any existing Services that has the field already set.
166
175
This ensures n-1 apiservers can handle the new field on downgrade.
167
-
* On upgrade, if the feature gate is enabled there should be no changes in the behavior since the default value for `internalTrafficPolicy` is `Cluster`.
176
+
* On upgrade, if the feature gate is enabled there should be no changes in the behavior since the default value for `trafficPolicy` is `Cluster`.
168
177
169
178
### Version Skew Strategy
170
179
@@ -178,7 +187,7 @@ _This section must be completed when targeting alpha to a release._
178
187
179
188
***How can this feature be enabled / disabled in a live cluster?**
180
189
-[X] Feature gate (also fill in values in `kep.yaml`)
0 commit comments