diff --git a/pkg/drivers/kic/oci/oci.go b/pkg/drivers/kic/oci/oci.go index f8c0eb2b6aedd1e056274d15bc48f375be1d9ab4..788904311c069b2fe198f58804c92c62d6e04887 100644 --- a/pkg/drivers/kic/oci/oci.go +++ b/pkg/drivers/kic/oci/oci.go @@ -177,9 +177,14 @@ func CreateContainerNode(p CreateParams) error { if p.OCIBinary == Podman && memcgSwap { // swap is required for memory runArgs = append(runArgs, fmt.Sprintf("--memory=%s", p.Memory)) + // Disable swap by setting the value to match + runArgs = append(runArgs, fmt.Sprintf("--memory-swap=%s", p.Memory)) } - if p.OCIBinary == Docker { // swap is only required for --memory-swap + + if p.OCIBinary == Docker { runArgs = append(runArgs, fmt.Sprintf("--memory=%s", p.Memory)) + // Disable swap by setting the value to match + runArgs = append(runArgs, fmt.Sprintf("--memory-swap=%s", p.Memory)) } // https://www.freedesktop.org/wiki/Software/systemd/ContainerInterface/