From 45e44691b86094eec5ef5bf4753fe77926a3b2f1 Mon Sep 17 00:00:00 2001 From: Markus Wennrich Date: Wed, 10 Feb 2021 08:16:41 +0100 Subject: [PATCH] set priorityClass critical for metallb-speaker (#152) --- charts/internal/shoot-control-plane/templates/metallb.yaml | 5 ++++- charts/internal/shoot-control-plane/values.yaml | 2 ++ pkg/controller/controlplane/valuesprovider.go | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/charts/internal/shoot-control-plane/templates/metallb.yaml b/charts/internal/shoot-control-plane/templates/metallb.yaml index 8bf73c15c..8971c86e3 100644 --- a/charts/internal/shoot-control-plane/templates/metallb.yaml +++ b/charts/internal/shoot-control-plane/templates/metallb.yaml @@ -240,6 +240,9 @@ spec: tolerations: - effect: NoSchedule key: node-role.kubernetes.io/master +{{- if semverCompare ">= 1.17" .Values.kubernetesVersion }} + priorityClassName: system-node-critical +{{- end }} --- apiVersion: apps/v1 kind: Deployment @@ -290,4 +293,4 @@ spec: runAsNonRoot: true runAsUser: 65534 serviceAccountName: controller - terminationGracePeriodSeconds: 0 \ No newline at end of file + terminationGracePeriodSeconds: 0 diff --git a/charts/internal/shoot-control-plane/values.yaml b/charts/internal/shoot-control-plane/values.yaml index 5a28e071d..5b0e735e8 100644 --- a/charts/internal/shoot-control-plane/values.yaml +++ b/charts/internal/shoot-control-plane/values.yaml @@ -1,4 +1,6 @@ --- +kubernetesVersion: "1.16.0" + images: droptailer: image-repository:image-tag metallb-speaker: image-repository:image-tag diff --git a/pkg/controller/controlplane/valuesprovider.go b/pkg/controller/controlplane/valuesprovider.go index d9e065a47..184274d1b 100644 --- a/pkg/controller/controlplane/valuesprovider.go +++ b/pkg/controller/controlplane/valuesprovider.go @@ -601,7 +601,8 @@ func (vp *valuesProvider) getControlPlaneShootChartValues(ctx context.Context, c } values := map[string]interface{}{ - "firewallSpec": fwSpec, + "kubernetesVersion": cluster.Shoot.Spec.Kubernetes.Version, + "firewallSpec": fwSpec, "groupRolebindingController": map[string]interface{}{ "enabled": vp.controllerConfig.Auth.Enabled, },