From 073c3ad9f824b45558620c5e8fc893cf57b55f71 Mon Sep 17 00:00:00 2001 From: Ciprian Hacman Date: Tue, 7 Oct 2025 21:25:21 +0300 Subject: [PATCH] healthchecker: Fix systemd-service flag deprecation --- cmd/healthchecker/options/options.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/healthchecker/options/options.go b/cmd/healthchecker/options/options.go index 32d2de28..129441f9 100644 --- a/cmd/healthchecker/options/options.go +++ b/cmd/healthchecker/options/options.go @@ -52,11 +52,11 @@ func (hco *HealthCheckerOptions) AddFlags(fs *pflag.FlagSet) error { "The component to check health for. Supports kubelet, docker, kube-proxy, and cri") // Deprecated: For backward compatibility on linux environment. Going forward "service" will be used instead of systemd-service if runtime.GOOS == "linux" { + fs.StringVar(&hco.Service, "systemd-service", "", + "The underlying service responsible for the component. Set to the corresponding component for docker and kubelet, containerd for cri.") if err := fs.MarkDeprecated("systemd-service", "please use --service flag instead"); err != nil { return fmt.Errorf("failed to mark deprecated flag 'systemd-service': %w", err) } - fs.StringVar(&hco.Service, "systemd-service", "", - "The underlying service responsible for the component. Set to the corresponding component for docker and kubelet, containerd for cri.") } fs.StringVar(&hco.Service, "service", "", "The underlying service responsible for the component. Set to the corresponding component for docker and kubelet, containerd for cri.")