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

[kubemod] The CRD is not valid #11

Closed
machine424 opened this issue Jan 27, 2022 · 7 comments
Closed

[kubemod] The CRD is not valid #11

machine424 opened this issue Jan 27, 2022 · 7 comments

Comments

@machine424
Copy link
Contributor

Hello,

In https://github.com/kubemod/kubemod-helm/pull/10/files the CRD in helm-chart/kubemod/crds was superficially upgraded to v1. The manifest needs to be adapted (see here for details).

Could we consider the CustomResourceDefinition in https://github.com/kubemod/kubemod/blob/master/bundle.yaml as source of truth and sync from it?

@vassilvk
Copy link
Member

Hi @machine424,

Using the original resource definitions from kubemod makes sense. That said, the actual source of truth is not bundle.yaml - the bundle is a product of running a kustomize build against the original resource definitions which are located in kubemod's config folder (https://github.com/kubemod/kubemod/tree/master/config).

Kubemod's Makefile includes a target called bundle which invokes kustomize to build bundle.yaml (https://github.com/kubemod/kubemod/blob/master/Makefile#L45).

I think it would be best if we had another Makefile target, say helm, which produces the templates folder for the helm chart, using the original resource definitions from kubemod/config.

@desaintmartin, thoughts?

@machine424
Copy link
Contributor Author

machine424 commented Jan 27, 2022

Thanks for your response.

My mistake, wrong link, I meant the definition in here https://github.com/kubemod/kubemod/blob/master/config/crd/bases/api.kubemod.io_modrules.yaml generated by the target manifests, I wanted to know if it is always up-to-date.

I don't think we need to generate the helm chart's templates folder, all we need is the CRD.

Edit: So we can use https://github.com/kubemod/kubemod/blob/master/config/crd/bases/api.kubemod.io_modrules.yaml to fill/sync the chart's crds/

@vassilvk
Copy link
Member

vassilvk commented Jan 27, 2022

Yes, this makes sense.
Since manifests are generated at every release of kubemod, this file is always up to date at the corresponding release tag.

@vassilvk
Copy link
Member

@machine424, please feel free to submit a PR.

@machine424
Copy link
Contributor Author

Here you go #12

@vassilvk
Copy link
Member

Closed by #12

@vassilvk
Copy link
Member

Thanks @machine424 !

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

No branches or pull requests

2 participants