upgrade-manager
upgrade-manager copied to clipboard
Error during CRD installation - unknown field "x-kubernetes-int-or-string"
BUG REPORT:
What happened: Error while installing the CRD as per README
$ kubectl apply -f https://raw.githubusercontent.com/keikoproj/upgrade-manager/master/config/crd/bases/upgrademgr.keikoproj.io_rollingupgrades.yaml
error: error validating "https://raw.githubusercontent.com/keikoproj/upgrade-manager/master/config/crd/bases/upgrademgr.keikoproj.io_rollingupgrades.yaml": error validating data: ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.properties.strategy.properties.maxUnavailable): unknown field "x-kubernetes-int-or-string" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps; if you choose to ignore these errors, turn validation off with --validate=false
What you expected to happen: CRD should be installed without an error
How to reproduce it (as minimally and precisely as possible): $ kubectl apply -f https://raw.githubusercontent.com/keikoproj/upgrade-manager/master/config/crd/bases/upgrademgr.keikoproj.io_rollingupgrades.yaml
I tried with kubectl
1.16
, 1.19
and 1.14
version, same issue with all.
Anything else we need to know?: EKS Server Version: v1.14.9-eks-658790
Environment: EKS, client and server version is given above
- rolling-upgrade-controller version
- Kubernetes version :
$ kubectl version -o yaml
$ k version -o yaml clientVersion: buildDate: "2020-08-26T21:54:15Z" compiler: gc gitCommit: e19964183377d0ec2052d1f1fa930c4d7575bd50 gitTreeState: clean gitVersion: v1.19.0 goVersion: go1.15 major: "1" minor: "19" platform: darwin/amd64 serverVersion: buildDate: "2020-07-16T01:29:42Z" compiler: gc gitCommit: 6587900c2b7bd83f0937204894202c93a1ecfb5f gitTreeState: clean gitVersion: v1.14.9-eks-658790 goVersion: go1.12.12 major: "1" minor: 14+ platform: linux/amd64
**Other debugging information (if applicable)**:
- RollingUpgrade status:
$ kubectl describe rollingupgrade
- controller logs:
$ kubectl logs
Hi there @infa-ddeore
This is actually server-side validation that was added from Kubernetes 1.15 Unfortunately it means if you try to install a CRD with this new validation type on a cluster that is under 1.15, it will fail with that message because that validation of int-or-string type is unsupported.
In this case, simply remove that line from the CRD and it will allow you to proceed and apply it.
thanks for the reply, I added --validate=false
to the kubectl apply command, i think that will have the similar effect as removing the line.