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

Move CRDs to v1beta1 for 1.0.0-beta1 #1140

Closed
pebrc opened this issue Jun 24, 2019 · 6 comments · Fixed by #1782
Closed

Move CRDs to v1beta1 for 1.0.0-beta1 #1140

pebrc opened this issue Jun 24, 2019 · 6 comments · Fixed by #1782
Assignees
Labels
>enhancement Enhancement of existing functionality good first issue Good for newcomers v1.0.0-beta1

Comments

@pebrc
Copy link
Collaborator

pebrc commented Jun 24, 2019

Considering the (breaking) API revisions we have made and given that we want to express the beta level maturity of our CRDs we should move our resources to v1beta1 for 0.9.01.0.0-beta1.

@thbkrkr thbkrkr added the good first issue Good for newcomers label Jul 4, 2019
@mario-mazo
Copy link

Are there any pointers on where to start? and what is the outcome, I would like to check this. But no idea where to start

@pebrc pebrc changed the title Move CRDs to v1beta1 for 0.9.0 Move CRDs to v1beta1 for 0.10.0 Jul 15, 2019
@sebgl
Copy link
Contributor

sebgl commented Jul 17, 2019

@mario-mazo thanks for your interest!
I think we'd like to wait a bit more before tackling this issue. 0.9 is not out yet, it's hard to know what 0.10 will look like in details for now.

@thbkrkr thbkrkr added the >enhancement Enhancement of existing functionality label Jul 18, 2019
@racevedoo
Copy link
Contributor

How is this going? Is it still up for grabs? I'd like to take a look at it

@pebrc pebrc changed the title Move CRDs to v1beta1 for 0.10.0 Move CRDs to v1beta1 for 1.0.0-beta1 Sep 16, 2019
@thbkrkr thbkrkr self-assigned this Sep 18, 2019
@thbkrkr
Copy link
Contributor

thbkrkr commented Sep 20, 2019

I think it's wise to do this after the merge of #1723, because it affects a lot of files.

@pebrc
Copy link
Collaborator Author

pebrc commented Sep 26, 2019

Two issues we have to consider here:

Do we need a minimal form of backwards compatibility?

What I mean by that: should it be possible for people running a previous version of ECK to install 1.0.0-beta1 into an existing cluster?

If the answer is to that question is yes then we have to ship both API versions (v1alpha1 and v1beta1) in 1.0.0-beta1

  • Include both models in the code
  • Fix the CRD generation (currently not working, not in use)
  • Generate a CRD containing both version (using CRD multi-version support beta since v1.11 )
  • Ensure that our controller version check filters out old versions

If the answer to "Do we need minimal backwards compatibility?" is no we should be aware of the consequences:

  • ECK 1.0.0-beta1 will fail to start on k8s clusters which still have alpha ES clusters running (REST mapper for v1alpha1 is missing)
  • Users will have to completely remove the old installation before being able to install 1.0.0-beta1 i.e. delete all ES clusters/Kibanas/APMs and delete the CRDs (see why below in kubectl section)
  • It is unclear how users coming from operatorhub.io would do an upgrade
    • I believe old CRDs are left in place even when the subscription is removed
    • I assume that the experience will be similar and the new version would not boot up

Finally there is the question how will we retire v1alpha1?

  • we/the user would have to either delete all old instances
  • or we convert them to the new API model using a conversion webhook (beta in k8s v1.15 IIRC)
  • we cannot do that on older k8s versions

kubectl apply -f crd.yaml and annotation max length

This second issue became apparent when experimenting with multiple versions. When using kubectl apply kubectl create the last-applied-configuration annotation that contains the previous version of the resource

  • with a multi-version CRD this becomes too metadata.annotations: Too long: must have at most 262144 characters
  • we can strip the descriptions from the CRDs to stay below the limit
  • but it seems when maintaining more than on API version we might run into this again (say we have to support 3 versions temporarily)

@pebrc
Copy link
Collaborator Author

pebrc commented Sep 26, 2019

Regarding the kubectl apply issue, there are various options:

  • use the trivialVersions flag in controller-gen (ES CRD 1K, no validation in api server)

Produce CRDs that work back to Kubernetes 1.11 (no version conversion)

  • use maxDescLen=0 to strip out all the descriptions (ES CRD will be 222K instead of 700K)
    CRD_OPTIONS ?= "crd:trivialVersions=true"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement Enhancement of existing functionality good first issue Good for newcomers v1.0.0-beta1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants