Skip to content

Commit

Permalink
Adds --short to silence deprecation warning
Browse files Browse the repository at this point in the history
Seen in a run:

> WARNING: This version information is deprecated and will be replaced with the
> output from kubectl version --short.  Use --output=yaml|json to get the full
> version.
  • Loading branch information
colindean committed Dec 21, 2022
1 parent 1e152a1 commit 08248a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/vela-kubernetes/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func versionCmd(c *Config) *exec.Cmd {
}

// add flag for version kubectl command
flags = append(flags, "version")
flags = append(flags, "version", "--short")

return exec.Command(_kubectl, flags...)
}
1 change: 1 addition & 0 deletions cmd/vela-kubernetes/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func TestKubernetes_versionCmd(t *testing.T) {
fmt.Sprintf("--context=%s", c.Context),
fmt.Sprintf("--namespace=%s", c.Namespace),
"version",
"--short",
)

got := versionCmd(c)
Expand Down

0 comments on commit 08248a6

Please sign in to comment.