From fc8a0bdb15e7413217cc9f0d5419a704438d0ddd Mon Sep 17 00:00:00 2001 From: Tomas Barton Date: Thu, 8 Feb 2024 11:19:00 +0100 Subject: [PATCH] Unify archive cleanup value --- manifests/packages.pp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/manifests/packages.pp b/manifests/packages.pp index bfebd568..66f0825c 100644 --- a/manifests/packages.pp +++ b/manifests/packages.pp @@ -97,6 +97,10 @@ # Defaults to 32767 # @param archive_checksum_type # Defaults to 'sha256' +# @param archive_cleanup +# Whether downloaded archives should be deleted after extracting. Cleaning files will save some space, +# but might lead to frequent corrective changes (service restarts) +# Default: false # @param tmp_directory # Directory to use when downloading archives for install. # Default to /var/tmp/puppetlabs-kubernetes @@ -154,6 +158,7 @@ Boolean $pin_packages = $kubernetes::pin_packages, Integer $package_pin_priority = 32767, String $archive_checksum_type = 'sha256', + Boolean $archive_cleanup = false, String $tmp_directory = $kubernetes::tmp_directory, Optional[String] $http_proxy = $kubernetes::http_proxy, Optional[String] $https_proxy = $kubernetes::https_proxy, @@ -422,7 +427,7 @@ checksum => $runc_source_checksum, checksum_verify => $runc_source_checksum_verify, extract => false, - cleanup => false, + cleanup => $archive_cleanup, creates => $runc_source_creates, } -> file { '/usr/bin/runc': @@ -469,7 +474,7 @@ extract => true, extract_command => 'tar xfz %s --strip-components=1 -C /usr/bin/', extract_path => '/', - cleanup => true, + cleanup => $archive_cleanup, creates => $containerd_archive_creates, notify => Service['containerd'], require => File[$tmp_directory], @@ -494,7 +499,7 @@ extract => true, extract_command => 'tar xfz %s --strip-components=1 -C /usr/local/bin/', extract_path => '/usr/local/bin', - cleanup => true, + cleanup => $archive_cleanup, creates => $etcd_archive_creates, notify => Service['etcd'], require => File[$tmp_directory],