From a821530dfe57b848334a4cf2d32db00317a4d32d Mon Sep 17 00:00:00 2001 From: Andrew Lipscomb Date: Fri, 23 Jun 2023 12:26:17 +1000 Subject: [PATCH] Defaults memory_limit to undef instead of ignored 0b value --- REFERENCE.md | 4 ++-- manifests/run.pp | 6 +++--- spec/defines/run_spec.rb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 6531cf6c..0678e9c6 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -3065,11 +3065,11 @@ Default value: `undef` ##### `memory_limit` -Data type: `Pattern[/^[\d]*(b|k|m|g)$/]` +Data type: `Optional[Pattern[/^[\d]*(b|k|m|g)$/]]` -Default value: `'0b'` +Default value: `undef` ##### `cpuset` diff --git a/manifests/run.pp b/manifests/run.pp index 19b8091b..6233a8cb 100644 --- a/manifests/run.pp +++ b/manifests/run.pp @@ -21,9 +21,9 @@ # puppet help. # # @param verify_digest -# (optional) Make sure, that the image has not modified. Compares the digest +# (optional) Make sure, that the image has not modified. Compares the digest # checksum before starting the docker image. -# To get the digest of an image, run the following command: +# To get the digest of an image, run the following command: # docker image inspect <> --format='{{index .RepoDigests 0}} # # @param service_prefix @@ -196,7 +196,7 @@ Enum[present,absent] $ensure = 'present', Optional[String] $verify_digest = undef, Optional[String] $command = undef, - Pattern[/^[\d]*(b|k|m|g)$/] $memory_limit = '0b', + Optional[Pattern[/^[\d]*(b|k|m|g)$/]] $memory_limit = undef, Variant[String,Array,Undef] $cpuset = [], Variant[String,Array,Undef] $ports = [], Variant[String,Array,Undef] $labels = [], diff --git a/spec/defines/run_spec.rb b/spec/defines/run_spec.rb index 4d27df89..aba748bd 100644 --- a/spec/defines/run_spec.rb +++ b/spec/defines/run_spec.rb @@ -288,7 +288,7 @@ 'links' => [], 'lxc_conf' => [], 'manage_service' => true, - 'memory_limit' => '0b', + 'memory_limit' => :undef, 'net' => 'bridge', 'ports' => [], 'privileged' => false,