Skip to content

Commit 073c3ad

Browse files
committed
healthchecker: Fix systemd-service flag deprecation
1 parent b116139 commit 073c3ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/healthchecker/options/options.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ func (hco *HealthCheckerOptions) AddFlags(fs *pflag.FlagSet) error {
5252
"The component to check health for. Supports kubelet, docker, kube-proxy, and cri")
5353
// Deprecated: For backward compatibility on linux environment. Going forward "service" will be used instead of systemd-service
5454
if runtime.GOOS == "linux" {
55+
fs.StringVar(&hco.Service, "systemd-service", "",
56+
"The underlying service responsible for the component. Set to the corresponding component for docker and kubelet, containerd for cri.")
5557
if err := fs.MarkDeprecated("systemd-service", "please use --service flag instead"); err != nil {
5658
return fmt.Errorf("failed to mark deprecated flag 'systemd-service': %w", err)
5759
}
58-
fs.StringVar(&hco.Service, "systemd-service", "",
59-
"The underlying service responsible for the component. Set to the corresponding component for docker and kubelet, containerd for cri.")
6060
}
6161
fs.StringVar(&hco.Service, "service", "",
6262
"The underlying service responsible for the component. Set to the corresponding component for docker and kubelet, containerd for cri.")

0 commit comments

Comments
 (0)