Skip to content

Commit 929ae44

Browse files
refact(operator): update lvm operator with custom priorityclass (#126)
Signed-off-by: prateekpandey14 <[email protected]>
1 parent 6ee7c9d commit 929ae44

File tree

2 files changed

+50
-4
lines changed

2 files changed

+50
-4
lines changed

deploy/lvm-operator.yaml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,17 @@ roleRef:
11471147
name: openebs-lvm-provisioner-role
11481148
apiGroup: rbac.authorization.k8s.io
11491149

1150+
---
1151+
apiVersion: scheduling.k8s.io/v1
1152+
kind: PriorityClass
1153+
metadata:
1154+
name: openebs-lvm-localpv-csi-controller-critical
1155+
# A PriorityClass object can have any 32-bit integer value smaller than or equal
1156+
# to 1 billion. Larger numbers are reserved for critical system Pods that should
1157+
# not normally be preempted or evicted. The higher the value, the higher the priority.
1158+
value: 900000000
1159+
globalDefault: false
1160+
description: "This priority class should be used for the OpenEBS LVM localPV CSI driver controller deployment only."
11501161
---
11511162
kind: StatefulSet
11521163
apiVersion: apps/v1
@@ -1181,7 +1192,7 @@ spec:
11811192
values:
11821193
- openebs-lvm-controller
11831194
topologyKey: "kubernetes.io/hostname"
1184-
priorityClassName: system-cluster-critical
1195+
priorityClassName: openebs-lvm-localpv-csi-controller-critical
11851196
serviceAccount: openebs-lvm-controller-sa
11861197
containers:
11871198
- name: csi-resizer
@@ -1358,6 +1369,17 @@ roleRef:
13581369

13591370
---
13601371

1372+
apiVersion: scheduling.k8s.io/v1
1373+
kind: PriorityClass
1374+
metadata:
1375+
name: openebs-lvm-localpv-csi-node-critical
1376+
# A PriorityClass object can have any 32-bit integer value smaller than or equal
1377+
# to 1 billion. Larger numbers are reserved for critical system Pods that should
1378+
# not normally be preempted or evicted. The higher the value, the higher the priority.
1379+
value: 900001000
1380+
globalDefault: false
1381+
description: "This priority class should be used for the OpenEBS LVM localPV CSI driver node deployment only."
1382+
---
13611383

13621384
kind: DaemonSet
13631385
apiVersion: apps/v1
@@ -1383,7 +1405,7 @@ spec:
13831405
openebs.io/component-name: openebs-lvm-node
13841406
openebs.io/version: ci
13851407
spec:
1386-
priorityClassName: system-node-critical
1408+
priorityClassName: openebs-lvm-localpv-csi-node-critical
13871409
serviceAccount: openebs-lvm-node-sa
13881410
hostNetwork: true
13891411
containers:

deploy/yamls/lvm-driver.yaml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,19 @@ roleRef:
712712
apiGroup: rbac.authorization.k8s.io
713713

714714
---
715+
apiVersion: scheduling.k8s.io/v1
716+
kind: PriorityClass
717+
metadata:
718+
name: openebs-lvm-localpv-csi-controller-critical
719+
# A PriorityClass object can have any 32-bit integer value smaller than or equal
720+
# to 1 billion. Larger numbers are reserved for critical system Pods that should
721+
# not normally be preempted or evicted. The higher the value, the higher the priority.
722+
value: 900000000
723+
globalDefault: false
724+
description: "This priority class should be used for the OpenEBS LVM localPV CSI driver controller deployment only."
725+
726+
---
727+
715728
kind: StatefulSet
716729
apiVersion: apps/v1
717730
metadata:
@@ -745,7 +758,7 @@ spec:
745758
values:
746759
- openebs-lvm-controller
747760
topologyKey: "kubernetes.io/hostname"
748-
priorityClassName: system-cluster-critical
761+
priorityClassName: openebs-lvm-localpv-csi-controller-critical
749762
serviceAccount: openebs-lvm-controller-sa
750763
containers:
751764
- name: csi-resizer
@@ -922,6 +935,17 @@ roleRef:
922935

923936
---
924937

938+
apiVersion: scheduling.k8s.io/v1
939+
kind: PriorityClass
940+
metadata:
941+
name: openebs-lvm-localpv-csi-node-critical
942+
# A PriorityClass object can have any 32-bit integer value smaller than or equal
943+
# to 1 billion. Larger numbers are reserved for critical system Pods that should
944+
# not normally be preempted or evicted. The higher the value, the higher the priority.
945+
value: 900001000
946+
globalDefault: false
947+
description: "This priority class should be used for the OpenEBS LVM localPV CSI driver node deployment only."
948+
---
925949

926950
kind: DaemonSet
927951
apiVersion: apps/v1
@@ -947,7 +971,7 @@ spec:
947971
openebs.io/component-name: openebs-lvm-node
948972
openebs.io/version: ci
949973
spec:
950-
priorityClassName: system-node-critical
974+
priorityClassName: openebs-lvm-localpv-csi-node-critical
951975
serviceAccount: openebs-lvm-node-sa
952976
hostNetwork: true
953977
containers:

0 commit comments

Comments
 (0)