Skip to content

Commit 50533ae

Browse files
Address review comments
1 parent efed96c commit 50533ae

File tree

2 files changed

+102
-7
lines changed

2 files changed

+102
-7
lines changed

keps/prod-readiness/sig-network/2433.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ alpha:
44
beta:
55
approver: "@wojtek-t"
66
stable:
7-
approver: "@wojtek-t" # TODO(gauravkghildiyal): Change if someone else is reviewing.
7+
approver: "@wojtek-t"

keps/sig-network/2433-topology-aware-hints/README.md

Lines changed: 101 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -701,8 +701,9 @@ enabled even if the annotation has been set on the Service.
701701
Tests.)](https://github.com/kubernetes/kubernetes/blob/468ce5918377ab4d4e3180b4fd33fdd2bdb16ec9/pkg/controller/endpointslice/reconciler_test.go#L1641-L1907)
702702
* Hints field is dropped when feature gate is off. [(Strategy Unit
703703
Tests.)](https://github.com/kubernetes/kubernetes/blob/468ce5918377ab4d4e3180b4fd33fdd2bdb16ec9/pkg/registry/discovery/endpointslice/strategy_test.go)
704-
* TODO before GA: Test coverage in EndpointSlice controller for the transition
705-
from enabled to disabled.
704+
* Manual testing of feature gate enabling, disabling, upgrades, and rollbacks
705+
was conducted, as detailed in the "Were upgrade and rollback tested? Was the
706+
upgrade->downgrade->upgrade path tested?" section.
706707

707708
### Rollout, Upgrade and Rollback Planning
708709

@@ -719,10 +720,91 @@ enabled even if the annotation has been set on the Service.
719720
with before the feature was enabled.
720721

721722
* **Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?**
722-
Per-Service enablement/disablement is covered in depth and feature gate
723-
enablement and disablement will be covered before the feature graduates to GA.
724-
In addition, manual testing covering combinations of
725-
upgrade->downgrade->upgrade cycles will be completed prior to GA graduation.
723+
724+
The `TopologyAwareHints` feature and the corresponding feature-gate has existed
725+
since k8s v1.21, with the feature being enabled by default since k8s 1.24 (~3
726+
years ago). That is one useful data point showing that there have not been any
727+
issues with `TopologyAwareHints` and the upgrade/rollback stories.
728+
729+
In addition, manual testing was performed using the following steps:
730+
731+
1. Create a v1.21.1 Kind cluster with the `TopologyAwareHints` feature-gate.
732+
733+
```bash
734+
kind create cluster --name=topology-hints --config=<(cat <<EOF
735+
kind: Cluster
736+
apiVersion: kind.x-k8s.io/v1alpha4
737+
featureGates:
738+
TopologyAwareHints: true
739+
nodes:
740+
- role: control-plane
741+
image: kindest/node:v1.21.1
742+
- role: worker
743+
image: kindest/node:v1.21.1
744+
EOF
745+
)
746+
```
747+
748+
2. Create an EndpointSlice within the `Hints` field configured:
749+
750+
```bash
751+
cat <<EOF | kubectl apply -f -
752+
apiVersion: discovery.k8s.io/v1
753+
kind: EndpointSlice
754+
metadata:
755+
name: topology-hints
756+
addressType: IPv4
757+
ports:
758+
- name: http
759+
protocol: TCP
760+
port: 80
761+
endpoints:
762+
- addresses:
763+
- "10.0.0.1"
764+
hints:
765+
forZones:
766+
- name: "zone-a"
767+
EOF
768+
```
769+
770+
3. Verify that the EndpointSlice was created successfully and has the `Hints`
771+
field populated.
772+
773+
```bash
774+
kubectl get endpointslice topology-hints -o yaml
775+
```
776+
777+
4. Rollback kube-apiserver to v1.20.0 (which has `TopologyAwareHints` feature
778+
gate disabled by default)
779+
780+
```bash
781+
docker exec -it topology-hints-control-plane /bin/bash
782+
783+
# Edit file /etc/kubernetes/manifests/kube-apiserver.yaml, remove feature flag
784+
# and downgrade image to v1.20.0
785+
```
786+
787+
5. Verify that the endpointslice is still there but no longer has the `Hints` field:
788+
789+
```bash
790+
kubectl get endpointslice topology-hints -o yaml
791+
```
792+
793+
6. Rollback kube-apiserver to v1.21.1 and re-enable `TopologyAwareHints` feature-gate.
794+
795+
```bash
796+
docker exec -it topology-hints-control-plane /bin/bash
797+
798+
# Edit file /etc/kubernetes/manifests/kube-apiserver.yaml, add feature flag and
799+
# upgrade image to v1.21.1
800+
```
801+
802+
7. Verify that the EndpointSlice has the `Hints` field visible again (since it
803+
was persisted in etcd).
804+
805+
```bash
806+
kubectl get endpointslice topology-hints -o yaml
807+
```
726808

727809
* **Is the rollout accompanied by any deprecations and/or removals of features,
728810
APIs, fields of API types, flags, etc.?**
@@ -735,6 +817,14 @@ enabled even if the annotation has been set on the Service.
735817
If the `endpointslices_changed_per_sync` metric has a non-zero value for the
736818
`auto` approach, this feature is in use.
737819

820+
* **How can someone using this feature know that it is working for their
821+
instance?**
822+
823+
With the new [reduced scope](#important-scope-reduction-feb-2025), the part
824+
being classified as "having graduated to GA" only involves an API field
825+
addition. Users can verify its functionality by describing an EndpointSlice
826+
and checking if the `Hints` field is configured.
827+
738828
* **What are the SLIs (Service Level Indicators) an operator can use to
739829
determine the health of the service?**
740830
- [x] Metrics
@@ -799,6 +889,11 @@ enabled even if the annotation has been set on the Service.
799889
(specifically the EndpointSlice controller). Profiling will be performed to
800890
ensure that this increase is minimal.
801891

892+
* **Can enabling / using this feature result in resource exhaustion of some node
893+
resources (PIDs, sockets, inodes, etc.)?**
894+
895+
No.
896+
802897
### Troubleshooting
803898

804899
* **How does this feature react if the API server and/or etcd is unavailable?**

0 commit comments

Comments
 (0)