kubeflow / spark-operator

Kubernetes operator for managing the lifecycle of Apache Spark applications on Kubernetes.
Apache License 2.0
2.79k stars 1.37k forks source link

Helm install failed because of openapi-validation #1003

Open kinderyj opened 4 years ago

kinderyj commented 4 years ago

I tried to install the spark-operator and got many ValidationError, such as unknown field "x-kubernetes-int-or-string" . It's because the phase openapi-validation .

How to reproduce: helm install spark-operator-test incubator/sparkoperator --namespace spark-operator --set sparkJobNamespace=default

Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: [ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.properties.driver.properties.lifecycle.properties.postStart.properties.httpGet.properties.port): unknown field "x-kubernetes-int-or-string" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps, ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.properties.driver.properties.lifecycle.properties.postStart.properties.tcpSocket.properties.port): unknown field "x-kubernetes-int-or-string" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps, ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.properties.driver.properties.lifecycle.properties.preStop.properties.httpGet.properties.port): unknown field "x-kubernetes-int-or-string" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps, ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.properties.driver.properties.lifecycle.properties.preStop.properties.tcpSocket.properties.port): unknown field "x-kubernetes-int-or-string" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps, ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.status.properties.lastSubmissionAttemptTime): unknown field "nullable" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps, ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.status.properties.terminationTime): unknown field "nullable" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps]

Solution: Should we update the Installation command in the Readme? The following command works. helm install spark-operator-test incubator/sparkoperator --namespace spark-operator --set sparkJobNamespace=default --disable-openapi-validation

liyinan926 commented 4 years ago

Interesting, I thought we have manually fixed the CRDs. But anyway, adding --disable-openapi-validation seems useful. Will update the installation command in README.

github-actions[bot] commented 1 week ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.