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

Add shortName to gitrepositories #334

Merged
merged 1 commit into from
Apr 15, 2021
Merged

Conversation

abhi-kapoor
Copy link
Contributor

@abhi-kapoor abhi-kapoor commented Apr 7, 2021

Adding gr as a shortName, similar to how kustomizations has ks:
https://github.com/fluxcd/kustomize-controller/blob/2f2812636448cd27ddc5b4a8af1a333cbebf89ce/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml#L17

Not sure if this is the only change required for this, but would love to know if I am missing something.

@hiddeco
Copy link
Member

hiddeco commented Apr 7, 2021

Our CRDs are dynamically generated and do not allow direct modifications, instead, metadata should be added to the API code as done here: https://github.com/fluxcd/kustomize-controller/blob/2f2812636448cd27ddc5b4a8af1a333cbebf89ce/api/v1beta1/kustomization_types.go#L327

After making this modification, you can run make manifests api-docs to regenerate all the magic ✨ things.

@abhi-kapoor
Copy link
Contributor Author

Our CRDs are dynamically generated and do not allow direct modifications, instead, metadata should be added to the API code as done here: https://github.com/fluxcd/kustomize-controller/blob/2f2812636448cd27ddc5b4a8af1a333cbebf89ce/api/v1beta1/kustomization_types.go#L327

Ah gotcha, that makes sense, thank you 👍

After making this modification, you can run make manifests api-docs to regenerate all the magic ✨ things.

I will give this a shot 💯

@abhi-kapoor abhi-kapoor force-pushed the patch-1 branch 2 times, most recently from 4a60dc6 to 9ec8412 Compare April 7, 2021 22:06
@hiddeco
Copy link
Member

hiddeco commented Apr 7, 2021

Small correction, the right make targets are make generate manifests api-docs (or simply make test).

@abhi-kapoor
Copy link
Contributor Author

abhi-kapoor commented Apr 7, 2021

Small correction, the right make targets are make generate manifests api-docs (or simply make test).

Thank you, that seemed to have done the magic 🎆 🧙‍♂️

@hiddeco Just for my own curiosity, adding metadata as comment to the API code and running the make modifies the base YAML CRD under the hood? Or, am I missing something? Thanks

Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please rebase instead of merging changes in, and smash your commits (as it is a small change)?

@abhi-kapoor abhi-kapoor force-pushed the patch-1 branch 4 times, most recently from 6fbf6a6 to 42941c1 Compare April 8, 2021 13:49
@abhi-kapoor
Copy link
Contributor Author

Can you please rebase instead of merging changes in, and smash your commits (as it is a small change)?

@hiddeco Done 👍

@abhi-kapoor
Copy link
Contributor Author

@hiddeco Can you please let me know if you would like me to do anything additional or are we good to merge?

Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks OK, it just needs a rebase. Thanks @abhinav454 🌻

Signed-off-by: abhinav454 <43758739+abhinav454@users.noreply.github.com>
@abhi-kapoor
Copy link
Contributor Author

abhi-kapoor commented Apr 15, 2021

This looks OK, it just needs a rebase. Thanks @abhinav454 🌻

Done, thank you so much for your help with this @hiddeco 💯 😄

@hiddeco hiddeco merged commit 08afc35 into fluxcd:main Apr 15, 2021
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

Successfully merging this pull request may close these issues.

2 participants