-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
Recommendations for interacting with 3rd party (non k8s) CRDs? #313
Comments
Yeah, that's pretty much the current state of the art, I'm afraid. |
Hm, yeah, this would be like the reverse of #264. Generate code code from existing kubernetes yaml. Would be a difficult one to approach. Even if we had this, you'd still have to update your code when the schema changes (if you touched that part of the schema). For now I would stick with minimal struct with a derive around it, and use |
One other snafu. I can't derive a
Is there a way I can override this restriction? |
Ah. I think I have a very simple solution. I can create the DnsEndpoint struct as such, but then explicitly set the |
Ah, if that works, then that's great. But I expect we have to loosen the derive restriction just like we did for |
@clux - I do consider this a workaround. I think the right course of action would be to remove the PascalCase restriction.. or if it's possible, make it a bit less restrictive. If it matters to have some level of validation, a Regex check might be good enough: For future reference: |
IMO we should drop this validation completely, that's the apiserver's job to decide. |
also refactors kube-derive a bit for reabability. also fixed a bug that caused it not to pick up on the shortname attr
Validation in kube-derive removed in 0.43.0 (same commit as a month ago, just hadn't done a release) |
My controller has a need to create DNS records for the endpoints that it creates.
I would like to rely on the
DNSEndpoint
type that is managed by external-dns as the default.https://github.com/kubernetes-sigs/external-dns/blob/master/docs/contributing/crd-source/crd-manifest.yaml
At the moment I've hacked together a minimal struct that serializes into the desired JSON object that I can POST to the API.
I'm hoping for a more correct and type-safe approach.
Is there an suggestions for how I might incorporate the "official" schema of 3rd party types into my controller?
The text was updated successfully, but these errors were encountered: