Skip to content

Commit acf1ae2

Browse files
address PRR comments
1 parent cd11e0b commit acf1ae2

File tree

1 file changed

+42
-14
lines changed

1 file changed

+42
-14
lines changed

keps/sig-apps/4017-pod-index-label/README.md

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,7 @@ Consider including folks who also work outside the SIG or subproject.
286286
One thing that must be considered is how enabling this new feature will interact with existing workloads. There are a couple of options:
287287

288288
1. Only inject the label on *newly created pods*, so an existing StatefulSet/Indexed Jobs may include pods with the label and some without it.
289-
This means for the user to utilize the label via the downward API, or to use the label for pod selection, they will need to recreate
290-
the StatefulSet so the label is present on all pods.
289+
This means for the user to utilize the label via the downward API, or to use the label for pod selection, they will need to recreate the StatefulSet so the label is present on all pods.
291290

292291
2. Inject the label only on pods for *newly created StatefulSets/Indexed Jobs*. We can track this by annotating newly created StatefulSets/Indexed Jobs
293292
to distinguish existing ones from newly created ones. Using this strategy, for a given StatefulSet/IndexedJob, either none of the pods have this label, or all
@@ -406,8 +405,10 @@ We will release the feature directly in Beta state since there is no benefit in
406405
existing label which other things may depend on, for example).
407406

408407
#### Beta
409-
Feature implemented behind the `PodIndexLabel` feature gate.
410-
Unit and integration tests passing.
408+
- Feature implemented behind the `PodIndexLabel` feature gate.
409+
- Unit and integration tests passing.
410+
- Docs are clear that it is managed by the workload controller(s), and it is NOT guaranteed for every pod.
411+
- Docs are clear about what happens if two pods get the same value (it is set by workload controllers, nothing in the API system will prevent collisions from happening).
411412

412413
#### GA
413414
Fix any potentially reported bugs.
@@ -444,7 +445,9 @@ enhancement:
444445
cluster required to make on upgrade, in order to make use of the enhancement?
445446
-->
446447

447-
No changes required to existing cluster to use this feature.
448+
After a user upgrades their cluster to a version which supports this feature (and has the feature gate
449+
enabled) the user will need to redeploy their StatefulSets / Indexed Jobs so that all pods have the pod index label,
450+
since after the upgrade only newly created pods will have this pod index label added.
448451

449452
### Version Skew Strategy
450453

@@ -512,6 +515,8 @@ well as the [existing list] of feature gates.
512515
- [X] Feature gate (also fill in values in `kep.yaml`)
513516
- Feature gate name: PodIndexLabel
514517
- Components depending on the feature gate:
518+
- StatefulSet controller
519+
- Job controller
515520
- [ ] Other
516521
- Describe the mechanism:
517522
- Will enabling / disabling the feature require downtime of the control
@@ -525,7 +530,7 @@ well as the [existing list] of feature gates.
525530
Any change of default behavior may be surprising to users or break existing
526531
automations, so be extremely careful here.
527532
-->
528-
No.
533+
Yes - when we start setting a new label, if someone is doing deep-equal comparison, those will start failing.
529534

530535
###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?
531536

@@ -591,6 +596,18 @@ that might indicate a serious problem?
591596
-->
592597
- Users can monitor queue related metrics (e.g., queue depth and work duration) to make sure they aren't growing.
593598
- For Indexed Jobs, users can also monitor `job_sync_duration_seconds`.
599+
- For StatefulSets: the `kube_statefulset_status_replicas` metric can be monitored against the
600+
`kube_statefulset_replicas` metric to check the expected number of replicas to
601+
the actual number of pods matched by this StatefulSet's selector. If there is
602+
a divergence between these fields during steady state operations, this can
603+
indicate that the number of replicas being created by the StatefulSet do not
604+
match the expected number of replicas.
605+
606+
On a large scale (across a large number of StatefulSets) the distribution of the
607+
ratio of these two metrics should not change when enabling this feature. If this
608+
ratio changes significantly after enabling this feature, it could indicate a problem
609+
and could indicate a rollback is necessary.
610+
594611

595612
###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?
596613

@@ -664,21 +681,32 @@ high level (needs more precise definitions) those may be things like:
664681
665682
These goals will help you determine what you need to measure (SLIs) in the next question.
666683
-->
667-
- 99% percentile over day for Job syncs is <= 15s for a client-side 50 QPS
684+
- Jobs: 99% percentile over day for Job syncs is <= 15s for a client-side 50 QPS
668685
limit.
686+
- StatefulSets: the ratio of `kube_statefulset_status_replicas`/`kube_statefulset_replicas` should be near 1.0, although as unhealthy replicas are often an application error rather than a problem with the stateful set controller, this will need to be tuned by an operator on a per-cluster basis.
669687

670688
###### What are the SLIs (Service Level Indicators) an operator can use to determine the health of the service?
671689

672690
<!--
673691
Pick one more of these and delete the rest.
674692
-->
675-
676-
- [] Metrics
677-
- Metric name:
678-
- [Optional] Aggregation method:
679-
- Components exposing the metric:
680-
- [ ] Other (treat as last resort)
681-
- Details:
693+
Jobs:
694+
- Metric name: `job_sync_duration_seconds`, `job_sync_total`.
695+
- Components exposing the metric: `kube-controller-manager`
696+
697+
StatefulSets:
698+
- Metric name: `statefulset_reconcile_delay`
699+
- [Optional] Aggregation method: `quantile`
700+
- Components exposing the metric: `pkg/controller/statefulset`
701+
- Metric name: `kube_statefulset_replicas`
702+
- [Optional] Aggregation method: `gauge`
703+
- Components exposing the metric: `pkg/controller/statefulset`
704+
- Metric name: `kube_statefulset_status_replicas`
705+
- [Optional] Aggregation method: `gauge`
706+
- Components exposing the metric: `pkg/controller/statefulset`
707+
- Metric name: `kube_statefulset_ordinals_start`
708+
- [Optional] Aggregation method: `gauge`
709+
- Components exposing the metric: `pkg/controller/statefulset`
682710

683711
###### Are there any missing metrics that would be useful to have to improve observability of this feature?
684712

0 commit comments

Comments
 (0)