-
Notifications
You must be signed in to change notification settings - Fork 326
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
[NET-11256] Add gateway list
command to consul-k8s CLI
#4433
Conversation
gateway list
command to consul-k8s CLIgateway list
command to consul-k8s CLI
f.StringVar(&flag.StringVar{ | ||
Name: "context", | ||
Target: &c.flagKubeContext, | ||
Usage: "Set the Kubernetes context to use.", |
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.
Should there be Aliases for this flag?
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 made it consistent with the existing consul-k8s proxy list
command which doesn't specify an alias. I'm not finding any other commands that specify an alias, so I think it makes sense not to have one here for consistency.
consul-k8s/cli/cmd/proxy/list/command.go
Lines 89 to 94 in acb1af8
f.StringVar(&flag.StringVar{ | |
Name: flagNameKubeContext, | |
Target: &c.flagKubeContext, | |
Default: "", | |
Usage: "Set the Kubernetes context to use.", | |
}) |
15f6d99
to
709d625
Compare
a99566e
to
ffbecb3
Compare
Note
This PR is blocked by the bug fix in #4434 which is preventing tests from passing
Changes proposed in this PR
This PR adds a new command,
consul-k8s gateway list
, which collects the various components of configuration for all Gateways in a given K8s cluster or namespace –Gateway
, attachedHTTPRoutes
, attachedTCPRoutes
, etc. – into a single zip file containing one yaml file per Gateway.It can output an archive named
gateways.zip
into the current directory, or it can output JSON to the terminal.How I've tested this PR
Create one or more Gateways in your Kube cluster. Example for this config is available here.
Run the commands above to inspect the various forms of output, making sure to use both the implicit namespace on your kubecontext and an explicit
--namespace <my-namespace>
arg.How I expect reviewers to test this PR
See above
Checklist