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

Backport of [NET-11256] Add gateway list command to consul-k8s CLI into release/1.6.x #4439

Conversation

hc-github-team-consul-core
Copy link
Collaborator

Backport

This PR is auto-generated from #4433 to be assessed for backporting due to the inclusion of the label backport/1.6.x.

The below text is copied from the body of the original PR.


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, attached HTTPRoutes, attached TCPRoutes, 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.

# Output a zip archive for all gateways in the current namespace on your kubecontext
$ consul-k8s gateway list --output archive

# Output JSON to the terminal for all gateways in the <my-namespace> namespace
$ consul-k8s gateway list --namespace my-namespace --output json

# Output JSON to the terminal for all gateways in the k8s cluster
$ consul-k8s gateway list --all-namespaces --output json

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


Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core merged commit 78ba2c3 into release/1.6.x Dec 1, 2024
48 of 49 checks passed
@hc-github-team-consul-core hc-github-team-consul-core deleted the backport/cli-gateway-list/needlessly-included-turkey branch December 1, 2024 04:30
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