-
Notifications
You must be signed in to change notification settings - Fork 41.7k
Support Table and PartialObjectMetadata on watch #71548
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
Support Table and PartialObjectMetadata on watch #71548
Conversation
1ec127a to
c4b3391
Compare
|
/cc @mbohlool |
|
/cc @wenjiaswe |
|
/assign |
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response.go
Outdated
Show resolved
Hide resolved
c4b3391 to
280c346
Compare
4c86aa1 to
857504b
Compare
Clean up the code paths that lead to objects being transformed and output with negotiation.
Remove some duplicate code that was not consistent. Now, watch will respond correctly to
Table and PartialObjectMetadata requests. Add unit and integration tests.
When transforming responses to Tables, only the first watch event for a given type will
include the columns. Columns will not change unless the watch is restarted.
Add a volume attachment printer and tighten up table validation error cases.
Disable protobuf from table conversion because Tables don't have protobuf because they
use `interface{}`
857504b to
3230a0b
Compare
|
/retest |
1 similar comment
|
/retest |
|
This lgtm. I'm inclined to hold it for 1.15 at this point. |
|
/lgtm |
|
/remove-label api-review |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, smarterclayton 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 |
|
/hold cancel |
|
does this PR also fix the issue #62175 was trying to address? |
|
/retest Review the full test history for this PR. Silence the bot with an |
|
As commented on slack, there is a separate PR that resolves it that
simplifies the client code - Fix watch negotiation when using a non-default
mime type in the client
<#73938>
I want to look as well at fixing the CRD clients to bypass protobuf if the
provided object can't be encoded into protobuf on update operations, which
would allow us to default to protobuf clients.
…On Tue, Mar 19, 2019 at 11:01 PM fejta-bot ***@***.***> wrote:
/retest
This bot automatically retries jobs that failed/flaked on approved PRs
(send feedback to fejta <https://github.com/fejta>).
Review the full test history <https://gubernator.k8s.io/pr/71548> for
this PR.
Silence the bot with an /lgtm cancel or /hold comment for consistent
failures.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#71548 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABG_p2XrIDn-Ikg7hLXzkw0oigKLgb3iks5vYaR2gaJpZM4Y48S1>
.
|
The ability to watch metav1.PartialObjectMetadata (or POM) and metav1.Table was introduced in K8s 1.15. [1] This is relevant because our CRD controller attempts to fetch CRDs in the cluster efficiently by requesting the CRD in a POM object. The CRD controller does this in order to avoid requesting the full object, which may contain a large validation schema and other irrelevant fields. This is important because in large-scale environments, all agents will request all the CRDs at once which will put unnecessary load on the apiserver. However, we cannot perform this request at all on versions of K8s 1.14 and below. Therefore, we must fullback to requesting the full CRD object. Hence, this commit allows us to check whether the apiserver supports this action, so that we can efficiently request CRDs on versions that do support it. [1]: KEP: https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/20190322-server-side-get-to-ga.md#goals [1]: PR: kubernetes/kubernetes#71548 Signed-off-by: Chris Tarazi <chris@isovalent.com>
The ability to watch metav1.PartialObjectMetadata (or POM) and metav1.Table was introduced in K8s 1.15. [1] This is relevant because our CRD controller attempts to fetch CRDs in the cluster efficiently by requesting the CRD in a POM object. The CRD controller does this in order to avoid requesting the full object, which may contain a large validation schema and other irrelevant fields. This is important because in large-scale environments, all agents will request all the CRDs at once which will put unnecessary load on the apiserver. However, we cannot perform this request at all on versions of K8s 1.14 and below. Therefore, we must fullback to requesting the full CRD object. Hence, this commit allows us to check whether the apiserver supports this action, so that we can efficiently request CRDs on versions that do support it. [1]: KEP: https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/20190322-server-side-get-to-ga.md#goals [1]: PR: kubernetes/kubernetes#71548 Signed-off-by: Chris Tarazi <chris@isovalent.com>
Clean up the code paths that lead to objects being transformed and output
with negotiation. Remove some duplicate code that was not consistent. Now,
watch will respond correctly to Table and PartialObjectMetadata requests.
/kind bug
TODO