From 669045b3d279da221d0ef30382125b5c9c0410f1 Mon Sep 17 00:00:00 2001 From: Arjun Raja Yogidas Date: Thu, 30 Oct 2025 22:01:42 +0000 Subject: [PATCH] add global options to healthcheck command Signed-off-by: Arjun Raja Yogidas --- pkg/healthcheck/healthcheck_manager_linux.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/healthcheck/healthcheck_manager_linux.go b/pkg/healthcheck/healthcheck_manager_linux.go index 4cd33b77c01..8eee1e74b19 100644 --- a/pkg/healthcheck/healthcheck_manager_linux.go +++ b/pkg/healthcheck/healthcheck_manager_linux.go @@ -62,7 +62,11 @@ func CreateTimer(ctx context.Context, container containerd.Container, cfg *confi return fmt.Errorf("could not determine nerdctl executable path: %v", err) } - cmdOpts = append(cmdOpts, nerdctlPath, "container", "healthcheck", containerID) + cmdOpts = append(cmdOpts, nerdctlPath, + "--namespace", cfg.Namespace, + "--address", cfg.Address, + "--data-root", cfg.DataRoot, + "container", "healthcheck", containerID) if log.G(ctx).Logger.IsLevelEnabled(log.DebugLevel) { cmdOpts = append(cmdOpts, "--debug") }