Skip to content
This repository was archived by the owner on Jun 4, 2021. It is now read-only.

Conversation

@grantr
Copy link
Contributor

@grantr grantr commented Nov 14, 2018

Now that GKE has 1.11 available we can use the status subresource for CRDs. This eliminates the need to manipulate Spec.Generation, which is good because eventing-sources doesn't do that yet.

Proposed Changes

  • Add status subresource to all source CRDs
  • Use status subresource to update KubernetesEventSource status

Release Note

CRDs now enable the status subresource, and controllers use it to update status when possible.

Uses the kubebuilder:subresource:status annotation.
The SDK can't use the status subresource because it doesn't know at time
of update if finalizers have changed. Added a TODO to refactor update so
if finalizers didn't change, the status subresource is used instead.
@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 14, 2018
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 14, 2018
@grantr grantr changed the title [WIP] Use Status subresource Use Status subresource Nov 14, 2018
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 14, 2018
@vaikas
Copy link
Contributor

vaikas commented Nov 15, 2018

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 15, 2018
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: grantr, vaikas-google

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [grantr,vaikas-google]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot merged commit 8bd4fe5 into knative:master Nov 15, 2018
@grantr grantr deleted the status-subresource branch November 15, 2018 17:22
@grantr
Copy link
Contributor Author

grantr commented Nov 15, 2018

This may have caused test failures in eventing. The evidence I used to confirm that GKE supported the status subresource was knative/serving#786, which may not have been quite as authoritative as it should have been 😄 @dprotaso do you know the state of GKE's support for CRD subresources?

@grantr
Copy link
Contributor Author

grantr commented Nov 15, 2018

After some more research I think the feature is actually enabled, so false alarm there. More details in #114.

grantr added a commit to grantr/eventing-contrib that referenced this pull request Nov 15, 2018
knative-prow-robot pushed a commit that referenced this pull request Nov 15, 2018
@dprotaso
Copy link
Member

@grantr It's beta in 1.11 so it's on by default. Thus you can 'enable' the status subresource on your CRDs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants