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
@@ -132,20 +132,20 @@ checklist items _must_ be updated for the enhancement to be released.
132
132
133
133
Items marked with (R) are required *prior to targeting to a milestone / release*.
134
134
135
-
-[] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
136
-
-[] (R) KEP approvers have approved the KEP status as `implementable`
135
+
-[x] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
136
+
-[x] (R) KEP approvers have approved the KEP status as `implementable`
137
137
-[X] (R) Design details are appropriately documented
138
138
-[X] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
139
-
-[] e2e Tests for all Beta API Operations (endpoints)
140
-
-[] (R) Ensure GA e2e tests meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
141
-
-[] (R) Minimum Two Week Window for GA e2e tests to prove flake free
139
+
-[x] e2e Tests for all Beta API Operations (endpoints)
140
+
-[x] (R) Ensure GA e2e tests meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
141
+
-[x] (R) Minimum Two Week Window for GA e2e tests to prove flake free
142
142
-[X] (R) Graduation criteria is in place
143
-
-[] (R) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
144
-
-[] (R) Production readiness review completed
145
-
-[] (R) Production readiness review approved
146
-
-[] "Implementation History" section is up-to-date for milestone
147
-
-[] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
148
-
-[] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
143
+
-[x] (R) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
144
+
-[x] (R) Production readiness review completed
145
+
-[x] (R) Production readiness review approved
146
+
-[x] "Implementation History" section is up-to-date for milestone
147
+
-[x] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
148
+
-[x] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
149
149
150
150
<!--
151
151
**Note:** This checklist is iterative and should be reviewed and updated every time this enhancement is being considered for a milestone.
@@ -238,8 +238,8 @@ At a high level, the proposal is to modify the StatefulSet and Job controllers t
238
238
as a pod label at pod creation time (for jobs, this would only apply to jobs in
239
239
Indexed completion mode). The details of this are outlined in the Design Details section below.
240
240
241
-
StatefulSet pod label: `statefulset.kubernetes.io/pod-index`
242
-
Indexed Job pod label: `batch.kubernetes.io/job-completion-index` (same as existing annotation)
241
+
-StatefulSet pod label: `apps.kubernetes.io/pod-index`
242
+
- IndexedJob pod label: `batch.kubernetes.io/job-completion-index` (same as existing annotation)
243
243
244
244
### User Stories (Optional)
245
245
@@ -256,7 +256,7 @@ As a user, I would like to lookup a job's pod logs by its index.
256
256
257
257
#### Story 2
258
258
As a user, I would like to target traffic to a specific pod index (e.g., index 0) in a StatefulSet
259
-
or Indexed Job. Instead of creating a service which matche an entire Job, I'd like to create a
259
+
or Indexed Job. Instead of creating a service which matches an entire Job, I'd like to create a
260
260
service which matches only the "head" pod, which will be more performant, especially for a large
261
261
number of pods.
262
262
@@ -311,7 +311,7 @@ change are understandable. This may include API specs (though not always
311
311
required) or even code snippets. If there's any ambiguity about HOW your
312
312
proposal will be implemented, this is the place to discuss them.
313
313
-->
314
-
The StatefulSet controller will only need a minor update to the [newStatefulSetPod](https://github.com/kubernetes/kubernetes/blob/fb5e9ef3b2a6f2136d54868187431c345e59f55f/pkg/controller/statefulset/stateful_set_utils.go#L458) function, to set the pod ordinal as the label `statefulset.kubernetes.io/pod-index`. This call is downstream from the [newVersionedStatefulSetPod](https://github.com/kubernetes/kubernetes/blob/release-1.27/pkg/controller/statefulset/stateful_set_control.go#LL416C7-L416C7) call, which generates
314
+
The StatefulSet controller will only need a minor update to the [newStatefulSetPod](https://github.com/kubernetes/kubernetes/blob/fb5e9ef3b2a6f2136d54868187431c345e59f55f/pkg/controller/statefulset/stateful_set_utils.go#L458) function, to set the pod ordinal as the label `apps.kubernetes.io/pod-index`. This call is downstream from the [newVersionedStatefulSetPod](https://github.com/kubernetes/kubernetes/blob/release-1.27/pkg/controller/statefulset/stateful_set_control.go#LL416C7-L416C7) call, which generates
315
315
the StatefulSet pods before creating them as necessary in [CreateStatefulPod](https://github.com/kubernetes/kubernetes/blob/release-1.27/pkg/controller/statefulset/stateful_set_control.go#L433).
316
316
317
317
Similarly, the Job controller would need to add the completion index as a label [here](https://github.com/kubernetes/kubernetes/blob/release-1.27/pkg/controller/job/job_controller.go#L1480)
We expect no non-infra related flakes in the last month as a GA graduation criteria.
397
396
-->
398
397
399
-
E2E tests will not provide any additional coverage that isn't already covered by unit + integration tests,
400
-
since we are simply adding a label, so no e2e tests will be necessary for this change.
398
+
The e2e test check for value of the label: https://github.com/kubernetes/kubernetes/blob/d9c46d8ecb1ede9be30545c9803e17682fcc4b50/test/e2e/apps/job.go#L435-L467
401
399
402
400
### Graduation Criteria
403
401
@@ -411,7 +409,9 @@ existing label which other things may depend on, for example).
411
409
- 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).
412
410
413
411
#### GA
414
-
Fix any potentially reported bugs.
412
+
- the PodIndexLabel feature-gate will be locked and the code will ignore it
413
+
- Add integration/e2e test for StatefulSet controller, `PodIndexLabel` feature
414
+
- Update existing integration test for IndexedJob to validate the label value
415
415
416
416
<!--
417
417
**Note:** Generally we also wait at least two releases between beta and
@@ -467,7 +467,7 @@ enhancement:
467
467
N/A. This feature doesn't require coordination between control plane components,
468
468
the changes to each controller are self-contained.
469
469
470
-
If there were version skew between the control plane components and the node components, where the control plane components were at version N where this feature exists, and the node componets were at version N-1 where this feature does not exist, there would be no adverse affects, the new label would simply be added to StatefulSet/Indexed Job pods.
470
+
If there were version skew between the control plane components and the node components, where the control plane components were at version N where this feature exists, and the node components were at version N-1 where this feature does not exist, there would be no adverse affects, the new label would simply be added to StatefulSet/Indexed Job pods.
471
471
472
472
## Production Readiness Review Questionnaire
473
473
@@ -529,7 +529,7 @@ well as the [existing list] of feature gates.
529
529
Any change of default behavior may be surprising to users or break existing
530
530
automations, so be extremely careful here.
531
531
-->
532
-
Yes, a new label is added to pods created for StatefulSet (statefulset.kubernetes.io/pod-index) and Indexed Jobs (batch.kubernetes.io/job-completion-index)
532
+
Yes, a new label is added to pods created for StatefulSet (apps.kubernetes.io/pod-index) and Indexed Jobs (batch.kubernetes.io/job-completion-index)
533
533
534
534
###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?
535
535
@@ -615,7 +615,189 @@ Describe manual testing that was done and the outcomes.
615
615
Longer term, we may want to require automated upgrade/rollback tests, but we
616
616
are missing a bunch of machinery and tooling and can't do that now.
I1008 21:12:30.602829 1 controllermanager.go:749] "Controller is disabled by a feature gate" controller="storageversion-garbage-collector-controller" requiredFeatureGates=["APIServerIdentity","StorageVersionAPI"]
643
+
I1008 21:12:30.653581 1 controllermanager.go:749] "Controller is disabled by a feature gate" controller="service-cidr-controller" requiredFeatureGates=["MultiCIDRServiceAllocator"]
644
+
```
645
+
The controller did not re-write the pod labels, as expected
646
+
```
647
+
# k get pods -oyaml | grep ' name: example-statefulset-\|index'
648
+
apps.kubernetes.io/pod-index: "0"
649
+
name: example-statefulset-0
650
+
apps.kubernetes.io/pod-index: "1"
651
+
name: example-statefulset-1
652
+
apps.kubernetes.io/pod-index: "2"
653
+
name: example-statefulset-2
654
+
```
655
+
4. The statefulset was deleted and re-created, pods were created without the index label
656
+
```
657
+
# k get pods -oyaml | grep ' name: example-statefulset-\|index'
658
+
name: example-statefulset-0
659
+
name: example-statefulset-1
660
+
name: example-statefulset-2
661
+
```
662
+
5. The controller-manager yaml was modified to enable the feature gate, for testing upgrade
663
+
```
664
+
# k logs -f -n kube-system kube-controller-manager-kind-1.31-dra-control-plane | grep feature
0 commit comments