From 226af68141ee245e9d3391daed41aa45df8810cf Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 18 Dec 2025 12:21:52 +0100 Subject: [PATCH] cli/command/service: fix API version for memory-swap, memory-swappiness These flags were added in 71828f27922684582edf30566ebf77df23a37f2b, but copy/pasted the annotation from `--limit-pids`. Signed-off-by: Sebastiaan van Stijn --- cli/command/service/opts.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/command/service/opts.go b/cli/command/service/opts.go index 742db95ee90e..bdd1e365e979 100644 --- a/cli/command/service/opts.go +++ b/cli/command/service/opts.go @@ -905,9 +905,9 @@ func addServiceFlags(flags *pflag.FlagSet, options *serviceOptions, defaultFlagV flags.Int64Var(&options.resources.limitPids, flagLimitPids, 0, "Limit maximum number of processes (default 0 = unlimited)") flags.SetAnnotation(flagLimitPids, "version", []string{"1.41"}) flags.Var(&options.resources.swapBytes, flagSwapBytes, "Swap Bytes (-1 for unlimited)") - flags.SetAnnotation(flagLimitPids, "version", []string{"1.52"}) + flags.SetAnnotation(flagSwapBytes, "version", []string{"1.52"}) flags.Int64Var(&options.resources.memSwappiness, flagMemSwappiness, -1, "Tune memory swappiness (0-100), -1 to reset to default") - flags.SetAnnotation(flagLimitPids, "version", []string{"1.52"}) + flags.SetAnnotation(flagMemSwappiness, "version", []string{"1.52"}) flags.Var(&options.stopGrace, flagStopGracePeriod, flagDesc(flagStopGracePeriod, "Time to wait before force killing a container (ns|us|ms|s|m|h)")) flags.Var(&options.replicas, flagReplicas, "Number of tasks")