From 95d5d3a8d33763add6df81a5829ba7800e71a132 Mon Sep 17 00:00:00 2001 From: Prateek Pandey Date: Mon, 9 Aug 2021 19:44:22 +0530 Subject: [PATCH] refact(operator): update zfs operator with custom priorityclass (#367) Signed-off-by: prateekpandey14 --- deploy/yamls/zfs-driver.yaml | 31 +++++++++++++++++++++++++++++-- deploy/zfs-operator.yaml | 30 ++++++++++++++++++++++++++++-- 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/deploy/yamls/zfs-driver.yaml b/deploy/yamls/zfs-driver.yaml index 0f47eb67f..f51d06e79 100644 --- a/deploy/yamls/zfs-driver.yaml +++ b/deploy/yamls/zfs-driver.yaml @@ -711,6 +711,20 @@ roleRef: apiGroup: rbac.authorization.k8s.io --- + +apiVersion: scheduling.k8s.io/v1 +kind: PriorityClass +metadata: + name: openebs-zfs-csi-controller-critical +# A PriorityClass object can have any 32-bit integer value smaller than or equal +# to 1 billion. Larger numbers are reserved for critical system Pods that should +# not normally be preempted or evicted. The higher the value, the higher the priority. +value: 900000000 +globalDefault: false +description: "This priority class should be used for the OpenEBS ZFS localPV CSI driver controller deployment only." + +--- + kind: StatefulSet apiVersion: apps/v1 metadata: @@ -744,7 +758,7 @@ spec: values: - openebs-zfs-controller topologyKey: "kubernetes.io/hostname" - priorityClassName: system-cluster-critical + priorityClassName: openebs-zfs-csi-controller-critical serviceAccount: openebs-zfs-controller-sa containers: - name: csi-resizer @@ -939,6 +953,19 @@ data: --- +apiVersion: scheduling.k8s.io/v1 +kind: PriorityClass +metadata: + name: openebs-zfs-csi-node-critical +# A PriorityClass object can have any 32-bit integer value smaller than or equal +# to 1 billion. Larger numbers are reserved for critical system Pods that should +# not normally be preempted or evicted. The higher the value, the higher the priority. +value: 900001000 +globalDefault: false +description: "This priority class should be used for the OpenEBS ZFS localPV CSI driver node deployment only." + +--- + kind: DaemonSet apiVersion: apps/v1 metadata: @@ -963,7 +990,7 @@ spec: openebs.io/component-name: openebs-zfs-node openebs.io/version: ci spec: - priorityClassName: system-node-critical + priorityClassName: openebs-zfs-csi-node-critical serviceAccount: openebs-zfs-node-sa hostNetwork: true containers: diff --git a/deploy/zfs-operator.yaml b/deploy/zfs-operator.yaml index 01b71787c..6ac546fb5 100644 --- a/deploy/zfs-operator.yaml +++ b/deploy/zfs-operator.yaml @@ -2004,6 +2004,19 @@ roleRef: name: openebs-zfs-provisioner-role apiGroup: rbac.authorization.k8s.io +--- + +apiVersion: scheduling.k8s.io/v1 +kind: PriorityClass +metadata: + name: openebs-zfs-csi-controller-critical +# A PriorityClass object can have any 32-bit integer value smaller than or equal +# to 1 billion. Larger numbers are reserved for critical system Pods that should +# not normally be preempted or evicted. The higher the value, the higher the priority. +value: 900000000 +globalDefault: false +description: "This priority class should be used for the OpenEBS ZFS localPV CSI driver controller deployment only." + --- kind: StatefulSet apiVersion: apps/v1 @@ -2038,7 +2051,7 @@ spec: values: - openebs-zfs-controller topologyKey: "kubernetes.io/hostname" - priorityClassName: system-cluster-critical + priorityClassName: openebs-zfs-csi-controller-critical serviceAccount: openebs-zfs-controller-sa containers: - name: csi-resizer @@ -2233,6 +2246,19 @@ data: --- +apiVersion: scheduling.k8s.io/v1 +kind: PriorityClass +metadata: + name: openebs-zfs-csi-node-critical +# A PriorityClass object can have any 32-bit integer value smaller than or equal +# to 1 billion. Larger numbers are reserved for critical system Pods that should +# not normally be preempted or evicted. The higher the value, the higher the priority. +value: 900001000 +globalDefault: false +description: "This priority class should be used for the OpenEBS ZFS localPV CSI driver node deployment only." + +--- + kind: DaemonSet apiVersion: apps/v1 metadata: @@ -2257,7 +2283,7 @@ spec: openebs.io/component-name: openebs-zfs-node openebs.io/version: ci spec: - priorityClassName: system-node-critical + priorityClassName: openebs-zfs-csi-node-critical serviceAccount: openebs-zfs-node-sa hostNetwork: true containers: