Error registering plugin CRD
Environment
Installation method: Digital ocean K8s deployment
Kubernetes version: v1.16
Dashboard version: NA
Operating system: NA
Node.js version ('node --version' output): NA
Go version ('go version' output): NA
Steps to reproduce
Registering CRD for plugin sample https://github.com/kubernetes/dashboard/blob/master/docs/plugins/README.md#L12
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/test-resources/plugin-crd.yml
Observed result
$> kubectl --kubeconfig="/Users/anshul/.kube/do_k8s.yaml" apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/test-resources/plugin-crd.yml
error: error validating "https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/test-resources/plugin-crd.yml": error validating data: ValidationError(CustomResourceDefinition.spec): unknown field "validation" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec; if you choose to ignore these errors, turn validation off with --validate=false
$> kubectl --kubeconfig="/Users/anshul/.kube/do_k8s.yaml" apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/test-resources/plugin-crd.yml --validate=false
The CustomResourceDefinition "plugins.dashboard.k8s.io" is invalid:
* spec.versions[0].schema.openAPIV3Schema: Required value: schemas are required
* metadata.annotations[api-approved.kubernetes.io]: Required value: protected groups must have approval annotation "api-approved.kubernetes.io", see https://github.com/kubernetes/enhancements/pull/1111
Expected result
CRD Should have registered
Comments
API approval is probably required This is the PR mentioned in the error message https://github.com/kubernetes/enhancements/pull/1111
https://github.com/kubernetes/dashboard/issues/4583 @ajatprabha
@ajatprabha
We need to make a few changes to the CRD definition:
- CRD extension has been promoted to
v1. We have some changes to consider, e.g
`spec.validation` is removed; use `spec.versions[*].schema` instead
- Since the API group
*.k8s.iois a protected group, we need to get this approved by the community. I'm not sure how to proceed in this regard; maybe @jeefy can put some light here.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten
@ajatprabha checkout the latest manifest, problem should be resolved now.