Add skip-generation and group flag to skip updating specified group crds#2046
Conversation
|
We've been having discussions about how much flexibility we think makes sense to include in some of our subcommands, so I think there should be some discussion about this particular set of flags. The original motivation listed in #1633 is to permanently stop regenerating a specific CRD because updates to controller-tools and operator-sdk might change how the CRD is generated even if the types don't change. I haven't looked, but I'm curious if controller-tools can skip generation for a particular set of types based on the presence (or non-presence) of a comment annotation on the type. At the very least, the CLI UX proposed here seems too complex to me. I think the flags could be combined into one (e.g. |
@joelanford issue #1633 is still open and active and so I picked it up and the solution was suggested there itself. The CLI UX is a little bit longer but it meant to be similar to CLI UX of |
|
Hi @pratikjagrut, In order you have and idea over other the alternative design solutions which would bring more flexibility as @joelanford explains see #1655. +1 for his suggestion as well to replace |
Ok, @camilamacedo86 I'll replace |
77d58db to
65d14db
Compare
|
/test e2e-aws-ansible |
|
@pratikjagrut Yeah, I'm hesitant to introduce this TBH. I think a direct invocation of |
|
Hi @pratikjagrut, It is great that you could figure out how to do that in the project and is working on to collab with. You did a great work 🥇. However, I am afraid we should close this PR and the issue with the same explanation made in the #1804 (comment). However, please feel free to pick up any other issue to learn more about this project. See the good+first+issue if you prefer. Also, please let me know if I can help you with. Are you ok with? Do you mind if we close this one? c/c @joelanford |
HI @camilamacedo86, |
|
Realy thank you @pratikjagrut for your collab and understanding. |
Description of the change:
Add
--skip-groupsflag.--skip--groupsflag takes a slice of the group names as input, nil by default.Motivation for the change:
Issue #1633
To test:
operator-sdk generate openapi --skip-groups cache.example.comFor more than one group:
operator-sdk generate openapi --skip-groups="cache.example.com,cache.example.com"Expected output:
Specified group's crds are untouched