From ac031f9f58fb9f68be5f4b5ded027e57448bf5e1 Mon Sep 17 00:00:00 2001 From: Filip Strozik Date: Thu, 13 Feb 2025 10:54:27 +0100 Subject: [PATCH] Cherry-Pick: Configure priorityClass for operator (#1453) --- config/operator/base/deployment/deployment.yaml | 1 + config/operator/base/kustomization.yaml | 1 + config/operator/base/priority-class/kustomization.yaml | 4 ++++ config/operator/base/priority-class/priority_class.yaml | 8 ++++++++ 4 files changed, 14 insertions(+) create mode 100644 config/operator/base/priority-class/kustomization.yaml create mode 100644 config/operator/base/priority-class/priority_class.yaml diff --git a/config/operator/base/deployment/deployment.yaml b/config/operator/base/deployment/deployment.yaml index 80387c5ac..f868e097a 100644 --- a/config/operator/base/deployment/deployment.yaml +++ b/config/operator/base/deployment/deployment.yaml @@ -24,6 +24,7 @@ spec: control-plane: operator sidecar.istio.io/inject: "false" spec: + priorityClassName: "operator-priority" securityContext: runAsNonRoot: true containers: diff --git a/config/operator/base/kustomization.yaml b/config/operator/base/kustomization.yaml index ed38c42f5..ee3e019ef 100644 --- a/config/operator/base/kustomization.yaml +++ b/config/operator/base/kustomization.yaml @@ -18,3 +18,4 @@ resources: - ./deployment - ./rbac - ./ui-extensions +- ./priority-class diff --git a/config/operator/base/priority-class/kustomization.yaml b/config/operator/base/priority-class/kustomization.yaml new file mode 100644 index 000000000..73407614f --- /dev/null +++ b/config/operator/base/priority-class/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - priority_class.yaml diff --git a/config/operator/base/priority-class/priority_class.yaml b/config/operator/base/priority-class/priority_class.yaml new file mode 100644 index 000000000..c331d8688 --- /dev/null +++ b/config/operator/base/priority-class/priority_class.yaml @@ -0,0 +1,8 @@ +apiVersion: scheduling.k8s.io/v1 +kind: PriorityClass +metadata: + name: operator-priority + labels: {} +value: 2000000 +globalDefault: false +description: "Scheduling priority of the serverless-operator. Must not be blocked by unschedulable user workloads."