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
@@ -261,6 +265,38 @@ Unit, integration and E2E tests cover the existing StatefulSet mechanics.
261
265
Additionally, unit and integration tests will be added to cover the
262
266
API validation, behavioral change of StatefulSet with feature gate enabled and disabled.
263
267
268
+
#### Prerequisite testing updates
269
+
270
+
[x] I/we understand the owners of the involved components may require updates to existing tests to make this code solid enough prior to committing the changes necessary to implement this enhancement.
271
+
272
+
##### Unit tests
273
+
274
+
```
275
+
`k8s.io/kubernetes/pkg/apis/apps/validation` `06/07/2022`: `90.6% of statements` `The tests added for the current feature in this package touches the statefulSet Spec and Status fields. No new tests are needed for promotion to GA`
276
+
`k8s.io/kubernetes/pkg/apis/apps/validation/validation.go:93`: `06/07/2022`: `93.1% of statements`
277
+
`k8s.io/kubernetes/pkg/apis/apps/validation/validation.go:162`: `06/07/2022`: `100% of statements`
278
+
`k8s.io/kubernetes/pkg/apis/apps/validation/validation.go:169`: `06/07/2022`: `94.1% of statements`
279
+
`k8s.io/kubernetes/pkg/apis/apps/validation/validation.go:199`: `06/07/2022`: `100% of statements`
280
+
`k8s.io/kubernetes/pkg/controller/statefulset`: `06/07/2022`: `85.5% of statements` `The tests added for the current feature in this package touches the statefulSet upgrade strategies. No new tests are needed for promotion to GA`
281
+
`k8s.io/kubernetes/pkg/registry/apps/statefulset`: `06/07/2022`: `76.7% of statements` `The tests added for the current feature in this package makes sure that the kubernetes version upgrades won't have any impact on the new fields to the statefulset api when persisting to etcd. No new tests are needed for promotion to GA`
282
+
`k8s.io/kubernetes/pkg/registry/apps/statefulset/strategy.go:95`: `06/07/2022`: `100.0% of statements`
283
+
`k8s.io/kubernetes/pkg/registry/apps/statefulset/strategy.go:139`: `06/07/2022`: `100.0% of statements`
284
+
`k8s.io/kubernetes/pkg/registry/apps/statefulset/strategy.go:223`: `06/07/2022`: `100.0% of statements`
285
+
`k8s.io/kubernetes/pkg/registry/apps/statefulset/strategy.go:118`: `06/07/2022`: `100.0% of statements`
286
+
```
287
+
288
+
##### Integration tests
289
+
290
+
Added integration tests to test availabile replicas when minReadySeconds is set on the statefulset spec.
- StatefulSet MinReadySeconds should be honored when enabled: [test grid](https://storage.googleapis.com/k8s-triage/index.html?sig=apps&test=statefulset)
298
+
- StatefulSet AvailableReplicas should get updated accordingly when MinReadySeconds is enabled: [test grid](https://storage.googleapis.com/k8s-triage/index.html?sig=apps&test=statefulset)
299
+
264
300
### Graduation Criteria
265
301
266
302
#### Alpha
@@ -273,6 +309,9 @@ API validation, behavioral change of StatefulSet with feature gate enabled and d
273
309
274
310
#### Beta -> GA Graduation
275
311
- 2 examples of end users using this field
312
+
- The latest version of [OpenShift](https://github.com/openshift/cluster-monitoring-operator/blob/3ff846fbf36f68ff9aa2145b86ba5fc485398a6b/manifests/0000_50_cluster-monitoring-operator_00_0thanosruler-custom-resource-definition.yaml#L3607) is using this field for cluster monitoring operator
313
+
-[Prometheus-operator alert manager](https://github.com/prometheus-operator/prometheus-operator/blob/e45574036f4282c519b64f458d296ca82f455a45/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml#L3549) uses this field
314
+
- Other users requesting for this feature can be found in the [github issue](https://github.com/kubernetes/kubernetes/issues/65098)
276
315
277
316
<!--
278
317
**Note:** *Not required until targeted at a release.*
@@ -320,11 +359,12 @@ in back-to-back releases.
320
359
- Downgrades
321
360
When downgrading from a release with this feature, to a release without
322
361
`minReadySeconds`, there are two cases
323
-
- If `minReadySeconds` is greater than 0 -- in this case kube-apiserver
324
-
clears the `minReadySeconds` and the existing StatefulSets wouldn't honor
325
-
`minReadySeconds` which is expected. The same is the case with `AvailableReplicas`
326
-
- If `minReadySeconds` is equal to 0 -- in this case user wont see any
327
-
difference in behavior
362
+
- If `minReadySeconds` is greater than 0 -- the StatefulSet controller wouldn't honor
363
+
`minReadySeconds` which is expected. The `AvailableReplicas` will be set to `ReadyReplicas`
364
+
by StatefulSet controller
365
+
- If `minReadySeconds` is equal to 0 -- in this case user won't see any
366
+
difference in behavior. The `AvailableReplicas` will be set to `ReadyReplicas`
367
+
by StatefulSet controller
328
368
329
369
We will ensure that the minReadySeconds field is properly validated
330
370
before persisting. The validation includes checking for positive number
@@ -389,7 +429,7 @@ The StatefulSet controller starts respecting the `minReadySeconds` again
389
429
390
430
###### Are there any tests for feature enablement/disablement?
391
431
392
-
Yes, unit and integration tests for feature enabled, disabled
432
+
Yes, unit and integration tests for feature on, off. Please look at test plan [section](#test-plan)
393
433
394
434
### Rollout, Upgrade and Rollback Planning
395
435
@@ -419,7 +459,7 @@ this metric to track the problems. If the value is immediately equal to the valu
419
459
420
460
###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?
421
461
Manually tested. No issues were found when we enabled the feature gate -> disabled it ->
422
-
re-enabled the feature gate. We still need to test upgrade -> downgrade -> upgrade scenario.
462
+
re-enabled the feature gate. Upgrade -> downgrade -> upgrade scenario has been manually tested.
423
463
<!--
424
464
Describe manual testing that was done and the outcomes.
425
465
Longer term, we may want to require automated upgrade/rollback tests, but we
0 commit comments