diff --git a/divingbell/templates/bin/_apt.sh.tpl b/divingbell/templates/bin/_apt.sh.tpl index a4d4504..158cb4b 100644 --- a/divingbell/templates/bin/_apt.sh.tpl +++ b/divingbell/templates/bin/_apt.sh.tpl @@ -159,6 +159,7 @@ APT_PURGE="apt-get purge -y --allow-remove-essential" APT_PURGE="apt-get purge -y --autoremove" {{- end }} +{{- if .Values.manifests.daemonset_apt_remove_old_pkgs }} {{- if hasKey .Values.conf.apt "packages" }} {{- if .Values.conf.apt.strict }} # in strict mode we execute this stage even on first run, so @@ -229,6 +230,7 @@ if [ ! -z "$INSTALLED_THIS_TIME" ]; then sort ${persist_path}/packages -o ${persist_path}/packages fi {{- end }} +{{- end }} ###################################################### #Stage 4 diff --git a/divingbell/values.yaml b/divingbell/values.yaml index e186436..6e510c5 100644 --- a/divingbell/values.yaml +++ b/divingbell/values.yaml @@ -232,6 +232,7 @@ manifests: daemonset_sysctl: true daemonset_limits: true daemonset_apt: true + daemonset_apt_remove_old_pkgs: true daemonset_perm: true daemonset_exec: true daemonset_apparmor: true