From 6aaaf4a2727f92f2f88f7b81d332fc70fc4fe0d9 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Fri, 15 Jun 2018 12:50:18 +0200 Subject: [PATCH] Limit the maximum number of revisions saved per helm release (#2894) * Limit the maximum number of revisions saved per helm release --- roles/kubernetes-apps/helm/defaults/main.yml | 3 +++ roles/kubernetes-apps/helm/tasks/main.yml | 1 + 2 files changed, 4 insertions(+) diff --git a/roles/kubernetes-apps/helm/defaults/main.yml b/roles/kubernetes-apps/helm/defaults/main.yml index 0bc22739c..2e8174521 100644 --- a/roles/kubernetes-apps/helm/defaults/main.yml +++ b/roles/kubernetes-apps/helm/defaults/main.yml @@ -18,3 +18,6 @@ helm_skip_refresh: false # Override values for the Tiller Deployment manifest. # tiller_override: "key1=val1,key2=val2" + +# Limit the maximum number of revisions saved per release. Use 0 for no limit. +# tiller_max_history: 0 diff --git a/roles/kubernetes-apps/helm/tasks/main.yml b/roles/kubernetes-apps/helm/tasks/main.yml index e7b387944..7e400d3fe 100644 --- a/roles/kubernetes-apps/helm/tasks/main.yml +++ b/roles/kubernetes-apps/helm/tasks/main.yml @@ -34,6 +34,7 @@ {% if rbac_enabled %} --service-account=tiller{% endif %} {% if tiller_node_selectors is defined %} --node-selectors {{ tiller_node_selectors }}{% endif %} {% if tiller_override is defined %} --override {{ tiller_override }}{% endif %} + {% if tiller_max_history is defined %} --history-max={{ tiller_max_history }}{% endif %} when: (helm_container is defined and helm_container.changed) or (helm_task_result is defined and helm_task_result.changed) - name: Helm | Set up bash completion