-
Notifications
You must be signed in to change notification settings - Fork 48
feat: Add namespace APIs #348
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
feat: Add namespace APIs #348
Conversation
8d8d06c to
3ee8895
Compare
3ee8895 to
1294419
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the great work and tackling the v2 transition for provider argocd @MisterMX
1294419 to
23b29b2
Compare
Intermediate commit to let git keep track of the correct file renames dues to a "cluster" directory already existing in apis/, but that contains different files. Signed-off-by: MisterMX <[email protected]>
Signed-off-by: MisterMX <[email protected]>
Signed-off-by: MisterMX <[email protected]>
Signed-off-by: MisterMX <[email protected]>
Intermediate commit to let git keep track of all files Signed-off-by: MisterMX <[email protected]>
- Use copystruct to copy API types - Use generic wrapper to reuse existing cluster logic - Use goverter to convert between cluster and namespace types - Test everything by copying and minimally adapting cluster controller tests Signed-off-by: MisterMX <[email protected]>
23b29b2 to
a7a8a84
Compare
|
@MisterMX can you add safeStart cap too - makes ot compatible with MRAPs - thanks for xref: https://github.com/crossplane-contrib/provider-upjet-aws/blob/main/cmd/provider/accessanalyzer/zz_main.go#L266 |
@haarchri I have never heard of safe start and MRAP? What is it about and what do I need to do to implement it? |
|
We have an part in the Docs for it: https://docs.crossplane.io/latest/guides/implementing-safe-start/ and https://github.com/crossplane-contrib/provider-kubernetes/pull/401/files is a good start |
|
Thanks for the link. From what it looks like, this feature seems a bit too much for this PR and should be added separately. I created an issue to track this: #353. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Description of your changes
This adds namespace variants for the current provider-argocd API types. It moves the apis into
apis/cluster/and adds the new one inapis/namespace/. The same is done forpkg/controllersandpkg/clients.Following the convention established by the upjet providers the new resources are put in the
m.argocd.crossplane.ioAPI groups to avoid conflicts with existing CRDs (i.e.Project.projects.m.argocd.crossplane.io).Note: This PR is still a draft and the namespace controllers need to be fully implemented yet. As of now I couldn't come up with an elegant way to have one controller for both types and relied on plain copy-past for now. For some of these copy task I created a simple tool: https://github.com/MisterMX/copystruct.
I have:
make reviewable testto ensure this PR is ready for review.How has this code been tested
Only the existing unit test which are copied, for now.