Move control-plane tolerations var

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2023-07-20 09:33:45 +02:00 committed by Daniel Weiße
parent e0ad836fdc
commit cf0ac148f3
2 changed files with 17 additions and 19 deletions

View File

@ -201,19 +201,19 @@ func (i *ChartLoader) loadCertManagerValues() map[string]any {
"prometheus": map[string]any{ "prometheus": map[string]any{
"enabled": false, "enabled": false,
}, },
"tolerations": controlPlaneTolerations(), "tolerations": controlPlaneTolerations,
"webhook": map[string]any{ "webhook": map[string]any{
"tolerations": controlPlaneTolerations(), "tolerations": controlPlaneTolerations,
}, },
"cainjector": map[string]any{ "cainjector": map[string]any{
"tolerations": controlPlaneTolerations(), "tolerations": controlPlaneTolerations,
}, },
"startupapicheck": map[string]any{ "startupapicheck": map[string]any{
"timeout": "5m", "timeout": "5m",
"extraArgs": []string{ "extraArgs": []string{
"--verbose", "--verbose",
}, },
"tolerations": controlPlaneTolerations(), "tolerations": controlPlaneTolerations,
}, },
} }
} }
@ -474,18 +474,3 @@ func loadChartsDir(efs embed.FS, dir string) (*chart.Chart, error) {
return loader.LoadFiles(files) 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",
},
}
}

View File

@ -193,3 +193,16 @@ var ciliumVals = map[string]map[string]any{
"l7Proxy": false, "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",
},
}