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

CRD Status subresource support get+update+patch #63619

Merged
merged 2 commits into from May 11, 2018

Conversation

@roycaihw
Member

roycaihw commented May 9, 2018

CRD Status previously only supports PUT and returns 405 on GET and PATCH

/assign @sttts
/sig api-machinery

Release note:

CustomResourceDefinitions Status subresource now supports GET and PATCH
@sttts

This comment has been minimized.

Contributor

sttts commented May 9, 2018

We need a test for that in test/integration in the apiextensions-apiserver.

@sttts

This comment has been minimized.

Contributor

sttts commented May 9, 2018

/assign @nikhita

@@ -160,12 +160,17 @@ type StatusREST struct {
store *genericregistry.Store
}
var _ = rest.Updater(&StatusREST{})
var _ = rest.Patcher(&StatusREST{})

This comment has been minimized.

@liggitt

liggitt May 9, 2018

Member

nit: keep the Updater assertion and add Patcher

This comment has been minimized.

@roycaihw

roycaihw May 9, 2018

Member

Patcher assertion implies Updater assertion

// Patcher is a storage object that supports both get and update.
type Patcher interface {
Getter
Updater
}

but we don't have a lot of Updater/Patcher assertion in our code base (grep result is 1 Updater assertion and 6 Patcher assertion), so I don't know what is good convention/style

This comment has been minimized.

@liggitt

liggitt May 10, 2018

Member

This is fine as is, then

@k8s-ci-robot k8s-ci-robot added size/L and removed size/M labels May 10, 2018

@roycaihw

This comment has been minimized.

Member

roycaihw commented May 10, 2018

Integration test added to check we expose the verbs

@roycaihw

This comment has been minimized.

Member

roycaihw commented May 10, 2018

/retest

}
// make sure we don't get 405 Method Not Allowed from Patching CRD/status subresource
_, err = apiExtensionClient.ApiextensionsV1beta1().CustomResourceDefinitions().

This comment has been minimized.

@nikhita

nikhita May 10, 2018

Member

nit: if err = ...; err != nil

Multi-line casing, so it makes sense as-is. :)

@@ -160,12 +160,17 @@ type StatusREST struct {
store *genericregistry.Store
}
var _ = rest.Updater(&StatusREST{})
var _ = rest.Patcher(&StatusREST{})

This comment has been minimized.

@nikhita

nikhita May 10, 2018

Member

Can you add this line to the custom resource StatusREST as well? It currently satisfies the Patcher interface implicitly and supports get/update/patch but I think explicitly mentioning it is nicer and safer.

Also, StatusREST for deployments, statefulsets, etc does not implement Patcher explicitly as well...but I guess we should add it at least for the custom resource.

This comment has been minimized.

@roycaihw
@nikhita

This comment has been minimized.

Member

nikhita commented May 10, 2018

/area custom-resources

@lavalamp

This comment has been minimized.

Member

lavalamp commented May 10, 2018

@liggitt

This comment has been minimized.

Member

liggitt commented May 10, 2018

/lgtm

@sttts

This comment has been minimized.

Contributor

sttts commented May 11, 2018

@roycaihw please squash. Then lgtm and approved.

@k8s-ci-robot k8s-ci-robot removed the lgtm label May 11, 2018

@roycaihw

This comment has been minimized.

Member

roycaihw commented May 11, 2018

@sttts squashed

@sttts

This comment has been minimized.

Contributor

sttts commented May 11, 2018

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm label May 11, 2018

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented May 11, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, roycaihw, sttts

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

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented May 11, 2018

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented May 11, 2018

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-merge-robot k8s-merge-robot merged commit 769b7da into kubernetes:master May 11, 2018

15 of 16 checks passed

Submit Queue Required Github CI test is not green: pull-kubernetes-e2e-gce
Details
cla/linuxfoundation roycaihw authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-local-e2e-containerized Skipped
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details

k8s-merge-robot added a commit that referenced this pull request May 24, 2018

Merge pull request #64063 from roycaihw/support-get-status
Automatic merge from submit-queue (batch tested with PRs 62756, 63862, 61419, 64015, 64063). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apiservices/status and certificatesigningrequests/status support get+update+patch

**What this PR does / why we need it**:
Fix the remaining `/status` subresources that return 405 on GET and PATCH

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref #63619

**Release note**:

```release-note
apiservices/status and certificatesigningrequests/status now support GET and PATCH
```

k8s-publishing-bot added a commit to kubernetes/kube-aggregator that referenced this pull request May 24, 2018

Merge pull request #64063 from roycaihw/support-get-status
Automatic merge from submit-queue (batch tested with PRs 62756, 63862, 61419, 64015, 64063). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apiservices/status and certificatesigningrequests/status support get+update+patch

**What this PR does / why we need it**:
Fix the remaining `/status` subresources that return 405 on GET and PATCH

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref kubernetes/kubernetes#63619

**Release note**:

```release-note
apiservices/status and certificatesigningrequests/status now support GET and PATCH
```

Kubernetes-commit: 74bcefc8b2bf88a2f5816336999b524cc48cf6c0

sttts pushed a commit to sttts/kube-aggregator that referenced this pull request Jun 8, 2018

Merge pull request #64063 from roycaihw/support-get-status
Automatic merge from submit-queue (batch tested with PRs 62756, 63862, 61419, 64015, 64063). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apiservices/status and certificatesigningrequests/status support get+update+patch

**What this PR does / why we need it**:
Fix the remaining `/status` subresources that return 405 on GET and PATCH

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref kubernetes/kubernetes#63619

**Release note**:

```release-note
apiservices/status and certificatesigningrequests/status now support GET and PATCH
```

Kubernetes-commit: 74bcefc8b2bf88a2f5816336999b524cc48cf6c0

k8s-publishing-bot added a commit to kubernetes/kube-aggregator that referenced this pull request Jun 8, 2018

Merge pull request #64063 from roycaihw/support-get-status
Automatic merge from submit-queue (batch tested with PRs 62756, 63862, 61419, 64015, 64063). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apiservices/status and certificatesigningrequests/status support get+update+patch

**What this PR does / why we need it**:
Fix the remaining `/status` subresources that return 405 on GET and PATCH

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref kubernetes/kubernetes#63619

**Release note**:

```release-note
apiservices/status and certificatesigningrequests/status now support GET and PATCH
```

Kubernetes-commit: 74bcefc8b2bf88a2f5816336999b524cc48cf6c0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment