From cf0ac148f358c19a8320999914479034302a6b9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Wei=C3=9Fe?= Date: Thu, 20 Jul 2023 09:33:45 +0200 Subject: [PATCH] Move control-plane tolerations var MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Weiße --- cli/internal/helm/loader.go | 23 ++++------------------- cli/internal/helm/values.go | 13 +++++++++++++ 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/cli/internal/helm/loader.go b/cli/internal/helm/loader.go index 25fff6ea4..1df4d4aac 100644 --- a/cli/internal/helm/loader.go +++ b/cli/internal/helm/loader.go @@ -201,19 +201,19 @@ func (i *ChartLoader) loadCertManagerValues() map[string]any { "prometheus": map[string]any{ "enabled": false, }, - "tolerations": controlPlaneTolerations(), + "tolerations": controlPlaneTolerations, "webhook": map[string]any{ - "tolerations": controlPlaneTolerations(), + "tolerations": controlPlaneTolerations, }, "cainjector": map[string]any{ - "tolerations": controlPlaneTolerations(), + "tolerations": controlPlaneTolerations, }, "startupapicheck": map[string]any{ "timeout": "5m", "extraArgs": []string{ "--verbose", }, - "tolerations": controlPlaneTolerations(), + "tolerations": controlPlaneTolerations, }, } } @@ -474,18 +474,3 @@ func loadChartsDir(efs embed.FS, dir string) (*chart.Chart, error) { return loader.LoadFiles(files) } - -func controlPlaneTolerations() []map[string]any { - return []map[string]any{ - { - "key": "node-role.kubernetes.io/control-plane", - "effect": "NoSchedule", - "operator": "Exists", - }, - { - "key": "node-role.kubernetes.io/master", - "effect": "NoSchedule", - "operator": "Exists", - }, - } -} diff --git a/cli/internal/helm/values.go b/cli/internal/helm/values.go index 407ff89c3..42ca3034a 100644 --- a/cli/internal/helm/values.go +++ b/cli/internal/helm/values.go @@ -193,3 +193,16 @@ var ciliumVals = map[string]map[string]any{ "l7Proxy": false, }, } + +var controlPlaneTolerations = []map[string]any{ + { + "key": "node-role.kubernetes.io/control-plane", + "effect": "NoSchedule", + "operator": "Exists", + }, + { + "key": "node-role.kubernetes.io/master", + "effect": "NoSchedule", + "operator": "Exists", + }, +}