From 614790c8ccda8a2f641609c33392e59b0bfc42d9 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Mon, 14 Jun 2021 11:24:24 +0200 Subject: [PATCH] Port some changes from KAH common 3.1.0 (#556) --- charts/library/common/Chart.yaml | 2 +- charts/library/common/templates/_all.tpl | 20 +++++++++++--------- charts/library/common/values.yaml | 2 ++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/charts/library/common/Chart.yaml b/charts/library/common/Chart.yaml index b1b0e5170d3..11e50bd82e1 100644 --- a/charts/library/common/Chart.yaml +++ b/charts/library/common/Chart.yaml @@ -18,4 +18,4 @@ maintainers: name: common sources: type: library -version: 6.1.1 +version: 6.2.0 diff --git a/charts/library/common/templates/_all.tpl b/charts/library/common/templates/_all.tpl index 5a022d2496f..bf9fcbbf686 100644 --- a/charts/library/common/templates/_all.tpl +++ b/charts/library/common/templates/_all.tpl @@ -12,15 +12,17 @@ Main entrypoint for the common library chart. It will render all underlying temp {{- include "common.serviceAccount" . }} {{- end -}} - {{- if eq .Values.controller.type "deployment" }} - {{- include "common.deployment" . | nindent 0 }} - {{ else if eq .Values.controller.type "daemonset" }} - {{- include "common.daemonset" . | nindent 0 }} - {{ else if eq .Values.controller.type "statefulset" }} - {{- include "common.statefulset" . | nindent 0 }} - {{ else }} - {{- fail (printf "Not a valid controller.type (%s)" .Values.controller.type) }} - {{- end -}} + {{- if .Values.controller.enabled }} + {{- if eq .Values.controller.type "deployment" }} + {{- include "common.deployment" . | nindent 0 }} + {{ else if eq .Values.controller.type "daemonset" }} + {{- include "common.daemonset" . | nindent 0 }} + {{ else if eq .Values.controller.type "statefulset" }} + {{- include "common.statefulset" . | nindent 0 }} + {{ else }} + {{- fail (printf "Not a valid controller.type (%s)" .Values.controller.type) }} + {{- end -}} + {{- end -}} {{ include "common.classes.hpa" . | nindent 0 }} diff --git a/charts/library/common/values.yaml b/charts/library/common/values.yaml index e0ebefefabb..c7e13a7ba01 100644 --- a/charts/library/common/values.yaml +++ b/charts/library/common/values.yaml @@ -5,6 +5,8 @@ global: fullnameOverride: controller: + # -- enable the controller. + enabled: true # -- Set the controller type. # Valid options are deployment, daemonset or statefulset type: deployment