From 32da2fbd4b9e370315f07d74fae5094a01311dda Mon Sep 17 00:00:00 2001 From: "Anderson, Craig (ca846m)" Date: Mon, 23 Mar 2020 10:22:22 -0700 Subject: [PATCH] Add ability to disable package uninstalls Allow users to disable auto-uninstall functionality for packages. Change-Id: Ib59ff175fc474a592118374c23974c6a9439cd72 --- divingbell/templates/bin/_apt.sh.tpl | 2 ++ divingbell/values.yaml | 1 + 2 files changed, 3 insertions(+) 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