CRDs-catalog icon indicating copy to clipboard operation
CRDs-catalog copied to clipboard

add kustomize CRDs

Open gilbahat opened this issue 2 years ago • 3 comments

flux has imported kustomize CRDs into its own namespace but they exist in their own namespace as well and supported by fluxv2

gilbahat avatar Aug 28 '22 11:08 gilbahat

@gilbahat do you have a link to the CRD itself? I also need it to update the index file

eyarz avatar Aug 30 '22 15:08 eyarz

Okay, so digging in my cluster, this comes from FluxCD setting itself up, it commits back into the repo a file called gotk-components.yaml which is autogenerated by its installation. I can't find a reference for it or a template which looks close to it...

gilbahat avatar Aug 30 '22 17:08 gilbahat

Found this: https://github.com/kubernetes-sigs/kustomize/blob/f61b075d3bd670b7bcd5d58ce13e88a6f25977f2/kyaml/openapi/kustomizationapi/swagger.json

it has more CRDs that weren't present in my cluster, so it seems even better.

https://raw.githubusercontent.com/kubernetes-sigs/kustomize/f61b075d3bd670b7bcd5d58ce13e88a6f25977f2/kyaml/openapi/kubernetesapi/v1204/swagger.json may be of interest too

gilbahat avatar Sep 01 '22 13:09 gilbahat

@gilbahat, I did some research, and it looks like the schemas in the PR are not generated from the kubernetes-sigs/kustomize project, they are generated from the fluxcd/kustomize-controller project.

Those CRs already exist in the catalog: https://github.com/datreeio/CRDs-catalog/tree/main/kustomize.toolkit.fluxcd.io

eyarz avatar Sep 04 '22 12:09 eyarz

interesting, but in my local flux repo these have a different namespace and they validated correctly against these schemas. I would wager they are the same but perhaps it's better to regenerate them from the kubernetes kustomize project. either way, currently the CRD database does not include the manifests for the kustomize.config.k8s.io namespace which fails to validate.

gilbahat avatar Sep 04 '22 12:09 gilbahat

yes, I also tried this schema against kind: Kustomizion and it passed. but I see there is a discrepancy between this schema and the schema (swagger) on the kustomize project.

I'm afraid merging the PR will produce false-positive and/or false-negative results when testing objects type kustomize.config.k8s.io/v1beta1

eyarz avatar Sep 05 '22 16:09 eyarz