Skip to content

Commit

Permalink
Fix flag name for systemd-logs image (#1066)
Browse files Browse the repository at this point in the history
The flag was mistakenly named `systemd-logs-flag` when it should have
been `systemd-logs-image`. The existing flag has been left in place but
has been marked as hidden and deprecated. It will continue to work but
will not appear in the help/usage.

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
  • Loading branch information
zubron authored Jan 8, 2020
1 parent efb9d68 commit 7d04c2f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmd/sonobuoy/app/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,20 @@ func AddKubeConformanceImage(image *string, flags *pflag.FlagSet) {

// AddSystemdLogsImage initialises the systemd-logs-image flag.
func AddSystemdLogsImage(image *string, flags *pflag.FlagSet) {
flags.StringVar(
image, "systemd-logs-image", config.DefaultSystemdLogsImage,
"Container image override for the systemd-logs plugin image.",
)

// The flag for overriding the systemd-logs image was mistakenly defined as
// systemd-logs-flag. This flag remains but is marked as hidden and deprecated
// to prevent breaking the behaviour for existing users.
flags.StringVar(
image, "systemd-logs-flag", config.DefaultSystemdLogsImage,
"Container image override for the systemd-logs plugin image.",
)
flags.MarkHidden("systemd-logs-flag")
flags.MarkDeprecated("systemd-logs-flag", "please use --systemd-logs-image instead")
}

// AddKubeConformanceImageVersion initialises an image version flag.
Expand Down

0 comments on commit 7d04c2f

Please sign in to comment.