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
finish removal of exportoptions #98312
finish removal of exportoptions #98312
Conversation
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.
also address in Accept
header content type negotiation?
kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go
Lines 214 to 218 in 64baf0f
// if specified, the server should transform the returned | |
// output and remove fields that are always server specified, | |
// or which fit the default behavior. | |
case "export": | |
options.Export = v == "1" |
kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go
Lines 161 to 163 in 64baf0f
// export is true if the representation requested should exclude fields the server | |
// has set | |
Export bool |
staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go
Outdated
Show resolved
Hide resolved
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. |
6c9d254
to
0c6f407
Compare
0c6f407
to
77a3625
Compare
/triage accepted |
77a3625
to
3f0f38e
Compare
hmmm.... /retest ? |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, liggitt 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 |
This type was removed in Kubernetes v1.21.0 (see kubernetes/kubernetes#98312). Signed-off-by: Matt Moyer <moyerm@vmware.com>
This type was removed in Kubernetes v1.21.0 (see kubernetes/kubernetes#98312). Signed-off-by: Matt Moyer <moyerm@vmware.com>
This type was removed in Kubernetes v1.21.0 (see kubernetes/kubernetes#98312). Signed-off-by: Matt Moyer <moyerm@vmware.com>
* Remove sample controller + dependency on controller-runtime (it was unused, leftover from original codegen; will hopefully help avoid conflicts downstream) * Remove `rest.Exporter` which was fully removed in K8s v1.21 (see kubernetes/kubernetes#98312)
Reiterating the reasons from #73783
fixes #98289
Export has fundamental issues with handling multiple use cases. As we discussed with @liggitt and bgrant0607 in #24855 and #49497, this can't be solved server-side. Avoiding export and instead just getting the resource as it exists today, the transformations could then be done client-side and at some later date. Doing it this way allows a single retrieval to be used for different purposes and allows an "export" to be done before deciding how you may later use it.
Since then, kubectl has also been updated to remove the option: #88649 and we are now ready to finish the removal.
To ensure no unexpected values are returned if some old clients are still lingering, we detect when the export query parameter is set and return a 400 to indicate an error. This prevents an old client that wasn't updated from receiving unexpected data and misbehaviing.
/kind cleanup
/priority important-soon
/assign @liggitt
@kubernetes/sig-api-machinery-api-reviews