Skip to content
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

feat: add Patch method to ScaleInterface #80699

Merged
merged 1 commit into from Aug 9, 2019

Conversation

@knight42
Copy link
Contributor

commented Jul 29, 2019

What type of PR is this?
/kind feature

What this PR does / why we need it:
Now it will fail if we want to update the scale subresource of custom resource because of missing resource version. A solution to this may be PATCHing the scale subresource rather than update it. However, we could not PATCH the scale subresource using client-go now, so I add a Patch method to ScaleInterface.

Which issue(s) this PR fixes:
Part of #80515
Fixes kubernetes/client-go#645

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Add a `Patch` method to `ScaleInterface`

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Jul 29, 2019

Hi @knight42. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knight42

This comment has been minimized.

Copy link
Contributor Author

commented Jul 29, 2019

@k8s-ci-robot k8s-ci-robot requested review from deads2k and sttts Jul 29, 2019

@knight42

This comment has been minimized.

Copy link
Contributor Author

commented Jul 29, 2019

/assign @caesarxuchao

@roycaihw

This comment has been minimized.

Copy link
Member

commented Jul 29, 2019

@k8s-ci-robot k8s-ci-robot requested a review from DirectXMan12 Jul 29, 2019

@k8s-ci-robot k8s-ci-robot added size/L and removed size/M labels Jul 30, 2019

@knight42

This comment has been minimized.

Copy link
Contributor Author

commented Jul 31, 2019

@liggitt PTAL

@liggitt

This comment has been minimized.

Copy link
Member

commented Aug 2, 2019

/ok-to-test
/approve

this looks reasonable to me, thanks!

@DirectXMan12 @caesarxuchao have lgtm

@knight42

This comment has been minimized.

Copy link
Contributor Author

commented Aug 2, 2019

/retest

// we need to set the API path based on GroupVersion (defaulting to the legacy path if none is set)
// TODO: we "cheat" here since the API path really only depends on group ATM, but this should
// *probably* take GroupVersionResource and not GroupVersionKind.
apiPath := c.client.apiPathResolverFunc(groupVer.WithKind(""))

This comment has been minimized.

Copy link
@sttts

sttts Aug 2, 2019

Contributor

can we align logic and style with the update func?

This comment has been minimized.

Copy link
@liggitt

liggitt Aug 2, 2019

Member

this already has the version (which is required for patch), so this inlined the relevant parts of pathAndVersionFor which Update calls

@knight42

This comment has been minimized.

Copy link
Contributor Author

commented Aug 5, 2019

kindly ping @DirectXMan12 @caesarxuchao to keep this on your radar 😉

@DirectXMan12

This comment has been minimized.

Copy link
Contributor

commented Aug 5, 2019

/approve

Needing to know the version here seems like it's asking the wrong question (or rather, it's not asking what you really want to know, which is the version of Scale that you're dealing with), but it's not technically incorrect (just indirect), so 🤷‍♀

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Aug 5, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DirectXMan12, knight42, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knight42 knight42 changed the title feat: patch scale subresource feat: add Patch method to ScaleInterface Aug 6, 2019

@caesarxuchao

This comment has been minimized.

Copy link
Member

commented Aug 8, 2019

lgtm. Could you squash the commits?

feat(scale): add Patch method to ScaleInterface
Signed-off-by: knight42 <anonymousknight96@gmail.com>

@knight42 knight42 force-pushed the knight42:feat/patch-scale branch from 48d26e2 to f020c91 Aug 9, 2019

@knight42

This comment has been minimized.

Copy link
Contributor Author

commented Aug 9, 2019

@caesarxuchao

This comment has been minimized.

Copy link
Member

commented Aug 9, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Aug 9, 2019

@k8s-ci-robot k8s-ci-robot merged commit 182ae7b into kubernetes:master Aug 9, 2019

23 checks passed

cla/linuxfoundation knight42 authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-csi-serial Skipped.
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gce-iscsi Skipped.
pull-kubernetes-e2e-gce-iscsi-serial Skipped.
pull-kubernetes-e2e-gce-storage-slow Skipped.
pull-kubernetes-godeps Skipped.
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details

@k8s-ci-robot k8s-ci-robot added this to the v1.16 milestone Aug 9, 2019

@knight42 knight42 deleted the knight42:feat/patch-scale branch Aug 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.