-
Notifications
You must be signed in to change notification settings - Fork 716
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
[v1alpha2] Generate CRD validation in Kubernetes 1.11 #622
Comments
This will limit the version of Kubernetes to 1.11. |
/assign @codeflitting |
what's the plan for crd validation, @codeflitting @gaocegege can anyone of you summarize here? are we limiting user to only use kubernetes 1.11, or we follow @jessesuen 's suggestion? |
We now follow jessesuen@'s suggestion to use the unstructured informer. While this is a WIP issue to use crd validation feature in Kubernetes to validate our CRD. If we do, we need to use k8s 1.11 because of kubernetes/kubernetes#59485 (comment) |
Would it be possible to only enable CRD validation on K8s 1.11 and newer? So that we could continue to support older K8s? Would that be worth doing? |
I think it is not in high priority. We definitely could enable it since it just needs some config in crd yaml file. |
@johnugeorge @richardsliu should we try to do this in 0.5? |
We should add this in 0.5. |
@gaocegege I am not sure if we can do this actually. We are adding support for multiple CRD versions (#932), and version-specific schema validation is not yet supported. ETA is k8s 1.16. |
Moving this out of 0.5.0. |
@richardsliu Now Kubebuilder could generate openAPISchema for CRD, maybe we could take a look at the implementation of kubebuilder. |
We have not decided if we are using kubebuilder yet. See discussion here: kubeflow/common#7 (comment) |
It's hard to import it which is binding with kubebuilder; in kube-batch/volcano, I build a shadow project to generate CRD openAPISchema and copy back to my project; and then modify it manually if necessary :) |
@richardsliu Yeah I saw the comments. We can use the function of validation generation to generate openAPISchema for all our CRDs. As for the other functions in Kubebuilder which requires re-implementation, we should discuss it carefully. |
We can run go run vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go crd --output-dir ./examples/crd/ to use https://github.com/kubernetes-sigs/controller-tools generate CRD with validation for tf-operator. But the group will be tensorflow.kubeflow.org, not kubeflow.org. I think I could maintain a fork or file an PR to controller-tool to avoid tensorflow prefix then use the fork to generate the CRD from our API. |
@johnugeorge Should we fix this for v1.0? |
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. |
Ref #561 (comment)
The text was updated successfully, but these errors were encountered: