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

Plan for supporting lots of versions in a single CRD #2687

Closed
matthchr opened this issue Jan 19, 2023 · 6 comments · Fixed by #4443
Closed

Plan for supporting lots of versions in a single CRD #2687

matthchr opened this issue Jan 19, 2023 · 6 comments · Fixed by #4443
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@matthchr
Copy link
Member

Some services release API versions very frequently. AKS for example ships a new API version nearly every month. Each version often supports a few new features which might be interesting to a small subset of customers.

We don't currently automatically generate a new CRD version for each API version. Regardless, as time goes on the number of CRD versions we support for ManagedCluster will increase without bound. At some point, we will reach the limit on CRD size and be forced to deprecate some versions (even if the service itself has not deprecated that particular API version yet).

We should define how this deprecation will happen and which APIs will be chosen to remove

For example, we could say that certain API versions every year are LTS (meaning we'll keep them for 3+ years):
20200101 == LTS (supported for 3 years)
20200301 == non-LTS but supported (will remove after a year?)
20200501 == non-LTS
20200801 == non-LTS
20210101 == LTS or something?

@theunrepentantgeek
Copy link
Member

Still something we need to consider, especially as the number of CRDs in ASO climbs.

@matthchr
Copy link
Member Author

matthchr commented Sep 6, 2023

We also need to define a timeline for how long we announce a deprecation of an API version before we remove it. I've spoken with some customers who want at least a year, which at least for GA APIs seems pretty reasonable to me.

We also need to make sure to use kubebuilder:deprecatedversion do indicate its deprecation so that it shows up in the AKS upgrade warning.

@theunrepentantgeek theunrepentantgeek modified the milestones: v2.6.0, v2.7.0 Dec 11, 2023
@matthchr matthchr modified the milestones: v2.7.0, v2.8.0 Feb 22, 2024
@theunrepentantgeek theunrepentantgeek added the high-priority Issues we intend to prioritize (security, outage, blocking bug) label Mar 25, 2024
@matthchr matthchr removed the high-priority Issues we intend to prioritize (security, outage, blocking bug) label Apr 9, 2024
@dtzar
Copy link

dtzar commented Apr 17, 2024

I think it's fair for preview API versions to only support something like N-1.

For stable API versions, that's harder. IMO it really depends more on how frequently the team releases stable API versions and when ASO supports it. So for this I'd go more in the direction of the age of the API and how long ASO has supported it to make a determination.

@theunrepentantgeek theunrepentantgeek modified the milestones: v2.8.0, v2.9.0 Apr 30, 2024
@matthchr matthchr modified the milestones: v2.9.0, v2.10.0 Jun 10, 2024
@matthchr matthchr modified the milestones: v2.10.0, v2.11.0 Aug 27, 2024
@matthchr
Copy link
Member Author

matthchr commented Nov 5, 2024

I just ran into this when adding the newer version of AKS ManagedCluster API. It looks like at least for that API, having 6 variants of the API (including preview/GA) along with all of the documentation for each field pushes the CRD file to ~2.5M, which ends up crossing the 1.5M max size limit when we submit the CRD.

I don't fully follow why the filesize differs from the actual limit (I assume something to do with encodings).

In terms of what we should do in the near-term at least, I think we need to announce the deprecation of some of the API versions of ManagedCluster to reduce the size of this CRD to a more manageable level.

At least for this resource, we should commit to 2 preview versions and 3 GA versions? We can fit more if we strip documentation, which I don't love.

@matthchr
Copy link
Member Author

matthchr commented Nov 6, 2024

We can also (eventually) fit more when AKS supports #2791, as we can strip the AgentPool from inside MC...

@dtzar
Copy link

dtzar commented Nov 6, 2024

For AKS - I propose only the latest preview version and N-1 GA versions. People can go to an older ASO version if they absolutely need to. GA versions typically are fairly good at being forward compatible IMO.

@matthchr matthchr self-assigned this Nov 13, 2024
@matthchr matthchr added the documentation Improvements or additions to documentation label Nov 13, 2024
matthchr added a commit to matthchr/azure-service-operator that referenced this issue Nov 13, 2024
Includes details about when we will deprecate CRD versions in order to
keep CRDs from growing too large.

Fixes Azure#2687.
@matthchr matthchr mentioned this issue Nov 13, 2024
3 tasks
github-merge-queue bot pushed a commit that referenced this issue Nov 13, 2024
Includes details about when we will deprecate CRD versions in order to
keep CRDs from growing too large.

Fixes #2687.
@github-project-automation github-project-automation bot moved this from Backlog to Recently Completed in Azure Service Operator Roadmap Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Development

Successfully merging a pull request may close this issue.

3 participants