Add support for pids-limit annotation for podman kube play.

This commit adds new annotation called:

io.podman.annotations.pids-limit/$ctrname

This annotation is used to define the PIDsLimit for
a particular pod. It is also automatically defined
when newly added --pids-limit option is used.

Fixes: #24418

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
This commit is contained in:
Jan Kaluza
2025-03-21 12:26:33 +01:00
parent 3e247db6dc
commit f15b0887c7
5 changed files with 37 additions and 0 deletions

View File

@@ -169,6 +169,9 @@ const (
// KubeImageAutomountAnnotation
KubeImageAutomountAnnotation = "io.podman.annotations.kube.image.volumes.mount"
// PIDsLimitAnnotation is used to limit the number of PIDs
PIDsLimitAnnotation = "io.podman.annotations.pids-limit"
// TotalAnnotationSizeLimitB is the max length of annotations allowed by Kubernetes.
TotalAnnotationSizeLimitB int = 256 * (1 << 10) // 256 kB
)