New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove/Withdraw NetworkPolicy Status #115843
Conversation
/sig network |
28ab43e
to
efb8a6f
Compare
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
For the changelog, do we actually mean: Changed NetworkPolicy to always have an empty `.status` field or something similar? Maybe we'd also mention that the feature gate is now deprecated and doesn't work, and that NetworkPolicies never have a |
/remove-sig api-machinery |
They should persist when we're intentionally removing the ability to round trip all data known to previously released types, like we are here. The after_roundtrip files make visible the fact that current type definitions drop (or alter!!!) data which type definitions in previous releases serialized. They should be ~rare, and really only occur when we knowingly intentionally drop fields. The diff shows the only thing getting dropped is the status stanza which we never allowed to persist in etcd because of the alpha feature: diff -u \
<(tail -c +5 networking.k8s.io.v1.NetworkPolicy.pb | protoc --decode_raw) \
<(tail -c +5 networking.k8s.io.v1.NetworkPolicy.after_roundtrip.pb | protoc --decode_raw) --- /dev/fd/63 2023-05-01 19:46:54
+++ /dev/fd/62 2023-05-01 19:46:54
@@ -144,23 +144,6 @@
}
4: "policyTypesValue"
}
- 3 {
- 1 {
- 1: "typeValue"
- 2 {
- 14 {
- }
- 12: 0x65756c6156737574
- }
- 3: 3
- 4 {
- 1: 1072918861
- 2: 0
- }
- 5: "reasonValue"
- 6: "messageValue"
- }
- }
}
3: ""
4: "" diff networking.k8s.io.v1.NetworkPolicy{,.after_roundtrip}.yaml 98,105d97
< status:
< conditions:
< - lastTransitionTime: "2004-01-01T01:01:01Z"
< message: messageValue
< observedGeneration: 3
< reason: reasonValue
< status: statusValue
< type: typeValue diff networking.k8s.io.v1.NetworkPolicy{,.after_roundtrip}.json 162,173d161
< },
< "status": {
< "conditions": [
< {
< "type": "typeValue",
< "status": "statusValue",
< "observedGeneration": 3,
< "lastTransitionTime": "2004-01-01T01:01:01Z",
< "reason": "reasonValue",
< "message": "messageValue"
< }
< ] |
Status NetworkPolicyStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` | ||
// Status is tombstoned to show why 3 is a reserved protobuf tag. | ||
// This commented field should remain, so in the future if we decide to reimplement | ||
// NetworkPolicyStatus a different protobuf name and tag SHOULD be used! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the tombstone is good, though FYI, if we reimplement NetworkPolicyStatus in a future release, the type will have to be compatible with the current type, since the json field name of status
would overlap for clients linked to API types that had the status field
/hold cancel |
/cc @dims @johnbelamaric |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dims, rikatz, thockin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/triage accepted |
Feature has been removed in Kubernetes 1.28: kubernetes/kubernetes#115843
Feature has been removed in Kubernetes 1.28: kubernetes/kubernetes#115843
Feature has been removed in Kubernetes 1.28: kubernetes/kubernetes#115843
Feature has been removed in Kubernetes 1.28: kubernetes/kubernetes#115843
Feature has been removed in Kubernetes 1.28: kubernetes/kubernetes#115843
Feature has been removed in Kubernetes 1.28: kubernetes/kubernetes#115843
What type of PR is this?
/kind cleanup
/kind feature
/kind deprecation
What this PR does / why we need it:
sig-network has decided to not move forward with NetworkPolicyStatus feature. This PR removes the feature implemented in #107963
Which issue(s) this PR fixes:
Fixes kubernetes/enhancements#2943
Special notes for your reviewer:
I've added the comment with the previous protobuf name, lmk if this is fine :)
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: