jenkins-x-charts / jenkins-x-crds

Helm chart to install jenkins x CRDs
Apache License 2.0
1 stars 9 forks source link

needs upgrade to api v1.22 #7

Open itorK opened 3 years ago

itorK commented 3 years ago

Following https://kubernetes.io/docs/reference/using-api/deprecation-guide/#customresourcedefinition-v122 API version of CustomResourceDefinition version 1.22 needs to update below templates:

environments.jenkins.io-crd.yaml pipelineactivities.jenkins.io-crd.yaml releases.jenkins.io-crd.yaml sourcerepositories.jenkins.io-crd.yaml

Right now it's impossible to install jenkins-x on OSH CodeReady platform with newest version:

error validating "config-root/customresourcedefinitions/jx/jenkins-x-crds/environments.jenkins.io-crd.yaml": error validating data: [ValidationError(CustomResourceDefinition.spec): unknown field "additionalPrinterColumns" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "validation" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "version" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec]; if you choose to ignore these errors, turn validation off with --validate=false error validating "config-root/customresourcedefinitions/jx/jenkins-x-crds/pipelineactivities.jenkins.io-crd.yaml": error validating data: [ValidationError(CustomResourceDefinition.spec): unknown field "additionalPrinterColumns" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "validation" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "version" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec]; if you choose to ignore these errors, turn validation off with --validate=false error validating "config-root/customresourcedefinitions/jx/jenkins-x-crds/releases.jenkins.io-crd.yaml": error validating data: [ValidationError(CustomResourceDefinition.spec): unknown field "additionalPrinterColumns" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "validation" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "version" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec]; if you choose to ignore these errors, turn validation off with --validate=false error validating "config-root/customresourcedefinitions/jx/jenkins-x-crds/sourcerepositories.jenkins.io-crd.yaml": error validating data: [ValidationError(CustomResourceDefinition.spec): unknown field "additionalPrinterColumns" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "validation" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "version" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec]; if you choose to ignore these errors, turn validation off with --validate=false

aellwein commented 2 years ago

Is there some workaround for this? I need to install jx on a v1.22 cluster and getting the very same error.

itorK commented 2 years ago

I didn't find any workarounds,

So:

  1. Downgrade CodeReady

  2. Manually upgrade files :

environments.jenkins.io-crd.yaml pipelineactivities.jenkins.io-crd.yaml releases.jenkins.io-crd.yaml sourcerepositories.jenkins.io-crd.yaml

itorK commented 2 years ago

https://github.com/jenkins-x-charts/jenkins-x-crds/pull/8