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

Migrate CRDs to v1 namespace #709

Closed
alexellis opened this issue Nov 11, 2020 · 5 comments · Fixed by #712
Closed

Migrate CRDs to v1 namespace #709

alexellis opened this issue Nov 11, 2020 · 5 comments · Fixed by #712

Comments

@alexellis
Copy link
Member

Migrate CRDs to v1 namespace

Expected Behaviour

helm lint should pass without failing a CI build, however with the latest version of helm3, this causes an unrecoverable error in CI.

Steps to reproduce the issue

  • Clone this repo
  • Download latest helm 3 arkade get helm --version v3.4.0
  • Run helm lint

See failing error.

==> Linting .
[ERROR] templates/profile-crd.yaml: the kind "apiextensions.k8s.io/v1beta1 CustomResourceDefinition" is deprecated in favor of "apiextensions.k8s.io/v1 CustomResourceDefinition"
Error: 1 chart(s) linted, 1 chart(s) failed

Possible solution

  • Update the tooling that generates the CRD YAML
  • Update the chart's templates with generated YAML
  • Re-test and check for breakages
  • Note down any backwards compatibility changes. What is the new min-version of K8s after the migration?

Here is an example PR from the Contour project projectcontour/contour#2678

@alexellis
Copy link
Member Author

@alexellis
Copy link
Member Author

@LucasRoesler please could you take a look?

@LucasRoesler
Copy link
Member

@alexellis i am also getting the following lint errors

[ERROR] templates/controller-rbac.yaml: the kind "rbac.authorization.k8s.io/v1beta1 Role" is deprecated in favor of "rbac.authorization.k8s.io/v1 Role"
[ERROR] templates/controller-rbac.yaml: the kind "rbac.authorization.k8s.io/v1beta1 RoleBinding" is deprecated in favor of "rbac.authorization.k8s.io/v1 RoleBinding"
[ERROR] templates/controller-rbac.yaml: the kind "rbac.authorization.k8s.io/v1beta1 Role" is deprecated in favor of "rbac.authorization.k8s.io/v1 Role"
[ERROR] templates/controller-rbac.yaml: the kind "rbac.authorization.k8s.io/v1beta1 RoleBinding" is deprecated in favor of "rbac.authorization.k8s.io/v1 RoleBinding"

@LucasRoesler
Copy link
Member

Doing a little bit of research

If we upgrade the CRD api group, the minimum version become 1.16, while updating the RBAC group bumps the minium verison to 1.17

Current versions in the major cloud providers:

  • GKE 1.16, 1.17, 1.18
  • EKS: 1.14, 1.15, 1.16, 1.17, 1.18
  • AKS: 1.16, 1.17, 1.18, 1.19
  • Digital Ocean: 1.17, 1.18, 1.19

@LucasRoesler
Copy link
Member

Apparently the operator RBAC was already upgraded

apiVersion: rbac.authorization.k8s.io/v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants