Skip to content
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

DANM API domain needs to be changed to comply with K8s API domain policy #242

Open
Levovar opened this issue Dec 4, 2020 · 5 comments
Open
Labels
enhancement New feature or request

Comments

@Levovar
Copy link
Collaborator

Levovar commented Dec 4, 2020

K8s community implemented and released the following PR with K8s 1.19: kubernetes/enhancements#1111

The TL;DR version of the Pr is that the API group used in the DANM CRDs unknowingly violates Kubernetes community policies, and therefore now must be changed so it doesn't "look like" it is an official K8s API.
Until this PR is implemented DANM is effectively not compatible with K8s versions 1.19+, because whenever the user would try and create a DANM API object the following error will be thrown:

Error from server (Invalid): error when creating "/var/lib/caas/crds/DanmEp.yaml": CustomResourceDefinition.apiextensions.k8s.io "danmeps.danm.k8s.io" is invalid: [spec.versions[0].schema.openAPIV3Schema: Requir
ed 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/en
hancements/pull/1111] 
@Levovar Levovar added the enhancement New feature or request label Dec 4, 2020
@Levovar
Copy link
Collaborator Author

Levovar commented Dec 4, 2020

proposal is to change "danm.k8s.io" API group to "danm.io"
this change must include the references put into the annotation field of other core APIs as well, such as Pod, and Services

@Levovar
Copy link
Collaborator Author

Levovar commented Jan 4, 2021

additional information: this error oinly surfaces with the CRD v1 API, but DANM currently uses v1beta
as such the issue is not a blocker until v1beta APIs are removed, which will happen with the K8s 1.22 release

@rajdeepwalia
Copy link

rajdeepwalia commented Dec 8, 2021

Is the transition to CRD v1 API as the DANM CRDs planned? Currently DANM is no longer working with K8 1.22 so wanted to understand if the fix will be available in the near future.

Also, will it be sufficient to make the DANM CRD manifest files compliant with CRD v1 APIs or will there more work required to make it compliant with v1 APIs?

Thanks.
Rajdeep Ahluwalia

@Levovar
Copy link
Collaborator Author

Levovar commented Dec 8, 2021

I have started doing something on api_group_migration branch, but it is far from completion. Reason for this not being done yet is that I changed jobs recently, and don't really have spare capacity for open source developments anymore
I still might do a fix or enhancement here or there, but you shouldn't expect regular updates and on-time critical fixes (such as this one) from me.

If there is a user community for DANM it is time to step up and start contributing in case you would like to see the project going

@Levovar
Copy link
Collaborator Author

Levovar commented Dec 8, 2021

as a temporary workaround you could add ""api-approved.kubernetes.io":" annotation to the APIs, but that's basically "cheating" so wouldn't advise using it in production

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants