-
Notifications
You must be signed in to change notification settings - Fork 335
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
chore(tools): add to resource-gen.go generation of kumactl options #2469
Conversation
5987f76
to
421ea72
Compare
Codecov Report
@@ Coverage Diff @@
## master #2469 +/- ##
==========================================
- Coverage 52.56% 52.50% -0.07%
==========================================
Files 887 867 -20
Lines 48394 48383 -11
==========================================
- Hits 25439 25402 -37
- Misses 20906 20931 +25
- Partials 2049 2050 +1
Continue to review full report at Codecov.
|
// Preserve backward compatibility for this typo before this was auto generated | ||
if All[i].Singular == "health-check" { | ||
All[i].Plural = "healthchecks" | ||
All[i].Singular = "healthcheck" |
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.
proxytemplate
is wrong in the same way?
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.
Proxy template is wrong is a different way:
- Healthcheck has a rest endpoint:
health-check
and a kumactlhealthcheck
- Proxytemplate: has both rest and kumactl to
proxytemplate
So for proxytemplate while it's incoherent with how we right things it's coherent between rest and kumactl so no need to do an exception here.
app/kumactl/pkg/cmd/root_context.go
Outdated
@@ -103,15 +84,11 @@ func DefaultRootContext() *RootContext { | |||
} | |||
|
|||
func (rc *RootContext) TypeForArg(arg string) (core_model.ResourceType, error) { | |||
typ, ok := rc.TypeArgs[arg] | |||
typ, ok := entities.ByName[arg] |
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.
IIUC, this needs to skip insight type that users should not delete.
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.
I've done this with a better error message just down there
This removes some more manually written code that currently makes policy creation error prone Signed-off-by: Charly Molter <charly.molter@konghq.com>
421ea72
to
766181e
Compare
flags+=("--offset=") | ||
two_word_flags+=("--offset") | ||
flags+=("--size=") | ||
two_word_flags+=("--size") |
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.
For some reasons there was no pagination on secrets and global secrets. @jakubdyszkiewicz do you know if it was for a specific reason?
I've forced-push because it was very different from the original. Adding custom table printer is now simpler and doesn't rely on funky codegen. |
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.
Just a few nits and quibbles.
Signed-off-by: Charly Molter <charly.molter@konghq.com>
…umactldefs Signed-off-by: Charly Molter <charly.molter@konghq.com>
First commit is #2466