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

feat(cli): Add json output to link, unlink, allow, and allow-scrapes commands #12658

Merged
merged 6 commits into from
Jun 14, 2024

Conversation

adleong
Copy link
Member

@adleong adleong commented May 28, 2024

We add an -o/--output flag to the remaining commands which render kubernetes resources and do not yet have this flag. The supported values for this flag are "yaml" (default) and "json". The commands are:

  • linkerd mulitcluster allow
  • linkerd multicluster link
  • linkerd multicluster unlink
  • linkerd viz allow-scrapes

…mands

Signed-off-by: Alex Leong <alex@buoyant.io>
@adleong adleong requested a review from a team as a code owner May 28, 2024 23:38
@@ -112,6 +113,22 @@ func (r Kubernetes) RenderResource(w io.Writer) error {
return err
}

// RenderResource renders a kubernetes object as a json object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// RenderResource renders a kubernetes object as a json object
// RenderResourceJSON renders a kubernetes object as a json object

@adleong adleong marked this pull request as draft May 31, 2024 19:00
@adleong
Copy link
Member Author

adleong commented May 31, 2024

Marking as draft until #12641 merges so that we can reuse library functions defined there.

@adleong adleong marked this pull request as ready for review June 5, 2024 18:45
multicluster/cmd/allow.go Outdated Show resolved Hide resolved
multicluster/cmd/link.go Outdated Show resolved Hide resolved
Signed-off-by: Alex Leong <alex@buoyant.io>
@olix0r olix0r changed the title add json output to link, unlink, allow, and allow-scrapes commands feat(cli): Add json output to link, unlink, allow, and allow-scrapes commands Jun 14, 2024
@olix0r olix0r merged commit 26eba44 into main Jun 14, 2024
38 checks passed
@olix0r olix0r deleted the alex/json-misc branch June 14, 2024 16:01
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.

4 participants