Enhancements: Subresources for Custom Resources

Created on 1 Jun 2018  Â·  43Comments  Â·  Source: kubernetes/enhancements

Feature Description


Originally a part of the main features issue for CRDs: https://github.com/kubernetes/features/issues/95
Design Proposal PR: https://github.com/kubernetes/community/pull/913
Implementation PR (alpha): https://github.com/kubernetes/kubernetes/pull/55168
Docs PR (alpha): https://github.com/kubernetes/website/pull/7439
Implementation PR (beta): https://github.com/kubernetes/kubernetes/pull/63598
Docs PR (beta): https://github.com/kubernetes/website/pull/8519

/kind feature
/sig api-machinery
/stage beta

kinfeature siapi-machinery stagstable

Most helpful comment

This feature is going to remain in beta for 1.12. Listing changes to this feature between 1.11 and 1.12 so that it's easier to track for anyone following along (will update this list if anything else comes up):

All 43 comments

/cc @idvoretskyi @justaugustus

@idvoretskyi since you asked for a new issue to be created (and for it not to be a part of https://github.com/kubernetes/features/issues/95).

Not sure how to add the stage label. /stage beta didn't work.

Have updated the feature tracking spreadsheet to include this.

Thanks for adding this, @nikhita!

@nikhita - for release team purposes, would you mind giving a summary of current completion criteria for this issue? :)

There's a bit of a k/test-infra rabbit hole on this and it's unclear which PRs are necessary to fix this bug, and which ones arose in context.

current completion criteria for this issue

@guineveresaenger I'm confused. :) can you elaborate on what you mean by completion criteria? is it things required to be done for this to be stable?

There's a bit of a k/test-infra rabbit hole on this and it's unclear which PRs are necessary to fix this bug, and which ones arose in context.

I'm still confused :) do you mean PRs that were implemented for this feature?

Apologies for being unclear - yes, I would like to have a summary of the work currently underway that will implement this feature, since some of them aren't tagged with a 1.11 milestone, and there's a bunch of them. :)

@guineveresaenger :)

For 1.11, this feature was promoted to beta. Along with it moving to beta, there has been one bug fix and one feature addition. The feature addition is split between 2 PRs.

Trying something for automation.

/remove-stage beta

/remove-stage beta

/stage beta

@idvoretskyi @justaugustus for 1.12 tracking purposes: there will be some small additions and maybe bug fixes but this will remain in beta for 1.12 (so no change from the features perspective).

@nikhita This feature was worked on in the previous milestone, so we'd like to check in and see if there are any plans for this to graduate stages in Kubernetes 1.12. If not, confirm this will remain in beta for 1.12.


Please note that the Features Freeze is July 31st, after which any incomplete Feature issues will require an Exception request to be accepted into the milestone.

In addition, please be aware of the following relevant deadlines:

  • Docs deadline (open placeholder PRs): 8/21
  • Test case freeze: 8/28

Please make sure all PRs for features have relevant release notes included as well.

Happy shipping!

If not, confirm this will remain in beta for 1.12.

Yes, this will remain in beta for 1.12.

Thanks for the update, @nikhita!

This feature is going to remain in beta for 1.12. Listing changes to this feature between 1.11 and 1.12 so that it's easier to track for anyone following along (will update this list if anything else comes up):

@nikhita is this remaining in beta for 1.13 as well?

This release is targeted to be more ‘stable’ and will have an aggressive timeline. Please only include this enhancement if there is a high level of confidence it will meet the following deadlines:
Docs (open placeholder PRs): 11/8
Code Slush: 11/9
Code Freeze Begins: 11/15
Docs Complete and Reviewed: 11/27

@nikhita is this remaining in beta for 1.13 as well?

Yes, this is remaining in beta for 1.13 too.

This feature is going to remain in beta for 1.13. Listing changes to this feature between 1.12 and 1.13 so that it's easier to track for anyone following along (will update this list if anything else comes up):

  1. The behaviour of how the .metadata.generation value of a custom resource is incremented has been changed in https://github.com/kubernetes/kubernetes/pull/69059. https://github.com/kubernetes/website/pull/10705 is the docs PR. Now, the behaviour is as follows:

    • A custom resource is considered to participate in the spec/status convention if and only if the CustomResourceSubresources feature gate is enabled and the CRD has the field .spec.subresources.status={} (this is same as before).

    • If the custom resource participates in the spec/status convention, the .metadata.generation value is incremented for all changes, except for changes to .metadata or .status (before, it was only incremented if .spec changed).

    • If the custom resource does _not_ participate in the spec/status convention, the .metadata.generation value is incremented for all changes, except for changes to .metadata (before, it did not increment at all and was initialized to the value 1).

Hey @nikhita! Firstly thank you for all the work you've been doing on this. It's really great to see how fast custom resource definitions are being developed, especially as they provide so much power to developers who use the kubernetes platform.

One thing that was really useful to see in the scope of your proposal were the non-goals, specifically:

Allow defining arbitrary subresources i.e. subresources except /status and /scale.

I reckon doing this was absolutely the right first step, and probably chunked the work into something much more achievable.

I was wondering though, is the community keen to extend CRDs in future to allow arbitrary custom subresources? Opening the definition up to provide a more generic subresource, especially given how that would integrate with the cluster's RBAC rules would solve several problems for us.

I have a suspicion this isn't the place to ask, but I didn't know where else to put my question. If you could help me figure out where to get more information about my query I'd really appreciate the help. Thanks!

I was wondering though, is the community keen to extend CRDs in future to allow arbitrary custom subresources?

@lawrencejones I don't think we intended to support custom subresources (the idea is to use an aggregated apiserver if someone needs to use it). Having said that, we don't really have a formal consensus from the community at this point. I have created https://github.com/kubernetes/kubernetes/issues/72637 for discussing this.

Thanks @nikhita, I'll track this in the thread you've created 🤲

@nikhita Hello - I’m the enhancement’s lead for 1.14 and I’m checking in on this issue to see what work (if any) is being planned for the 1.14 release. Enhancements freeze is Jan 29th and I want to remind that all enhancements must have a KEP

I’m checking in on this issue to see what work (if any) is being planned for the 1.14 release.

@claurence None, this feature will remain in beta for 1.14 as well.

@nikhita anything targeted for 1.15 here? KEP still needed here to progress as well.

@nikhita anything targeted for 1.15 here?

No, this will remain in beta.

No, this will remain in beta.

I actually expected this to graduate so that it was not separately feature-gated. I'm not aware of any outstanding requirements for GA for this

Discussed about this in the #sig-api-machinery channel on Slack: https://kubernetes.slack.com/archives/C0EG7JC6T/p1555344911023900

This will remain in beta until the main CRD API graduates to GA i.e. this will remain in beta for 1.15.

cc @roycaihw

Docs PR for 1.15 (change that scale subresource can be under .spec): https://github.com/kubernetes/website/pull/14583

@nikhita can you update the issue description?

/milestone v1.16
/stage stable

Hey @sttts / @nikhita - From looking at labels it seems that the plan is for this feature to go stable in 1.16, is that right? If yes, I'll go ahead and add it to the 1.16 Tracking Spreadsheet.

If I've got this wrong and it's not graduating, please let me know I will remove it from the milestone.

Also, please list any remaining k/k PRs in this issue so they can be tracked properly.

As a reminder, 1.16 milestone dates: Enhancement Freeze 7/30 and Code Freeze 8/29.

Thanks!

...and one last thing: friendly reminder that there's no KEP linked to the feature, and it will need one to go GA.

cc @nikhita @sttts @liggitt

friendly reminder that there's no KEP linked to the feature, and it will need one to go GA.

added

Hey, @sttts @nikhita I'm the v1.16 docs release lead.

Does this enhancement (or the work planned for v1.16) require any new docs (or modifications)?

Just a friendly reminder we're looking for a PR against k/website (branch dev-1.16) due by Friday,August 23rd. It would be great if it's the start of the full documentation, but even a placeholder PR is acceptable. Let me know if you have any questions!

@nikhita @sttts @liggitt Enhancement Freeze is tomorrow and the KEP is currently in a Provisional state. Anyway to get this modified to Implementable for 1.16 release?

Anyway to get this modified to _Implementable_ for 1.16 release?

Yes, that is getting finalized today.

@sttts @liggitt @nikhita code freeze for 1.16 is on Thursday 8/29. Are there any outstanding k/k PRs that still need to be merged for this to go Stable?

@sttts @liggitt @nikhita today is code freeze. are there any outstanding PRs? If I do not receive a response this will be dropped from v1.16

there are no outstanding PRs

Released as stable in v1.16.0

Post-GA work tracked in https://github.com/orgs/kubernetes/projects/28

/close

@liggitt: Closing this issue.

In response to this:

Released as stable in v1.16.0

Post-GA work tracked in https://github.com/orgs/kubernetes/projects/28

/close

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robscott picture robscott  Â·  11Comments

povsister picture povsister  Â·  5Comments

wlan0 picture wlan0  Â·  9Comments

saschagrunert picture saschagrunert  Â·  6Comments

prameshj picture prameshj  Â·  9Comments