From 2190ca922e9dbf743126d054b52ea4575be31fb1 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 5 May 2020 13:57:38 +0530 Subject: [PATCH] set priorityclass on plugin pods set system-node-critical priority on the plugin pods, as its the highest priority and this need to be applied on plugin pods as its critical for storage in cluster. Signed-off-by: Madhu Rajanna --- charts/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml | 3 +++ charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml | 3 +++ deploy/cephfs/kubernetes/csi-cephfsplugin.yaml | 1 + deploy/rbd/kubernetes/csi-rbdplugin.yaml | 1 + 4 files changed, 8 insertions(+) diff --git a/charts/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml b/charts/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml index f5fe54080..eeadbd533 100644 --- a/charts/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml +++ b/charts/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml @@ -27,6 +27,9 @@ spec: heritage: {{ .Release.Service }} spec: serviceAccountName: {{ include "ceph-csi-cephfs.serviceAccountName.nodeplugin" . }} +{{- if .Values.nodeplugin.priorityClassName }} + priorityClassName: {{ .Values.nodeplugin.priorityClassName }} +{{- end }} hostNetwork: true # to use e.g. Rook orchestrated cluster, and mons' FQDN is # resolved through k8s service, set dns policy to cluster first diff --git a/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml b/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml index dcf1bea1b..049b11806 100644 --- a/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml +++ b/charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml @@ -29,6 +29,9 @@ spec: serviceAccountName: {{ include "ceph-csi-rbd.serviceAccountName.nodeplugin" . }} hostNetwork: true hostPID: true +{{- if .Values.nodeplugin.priorityClassName }} + priorityClassName: {{ .Values.nodeplugin.priorityClassName }} +{{- end }} # to use e.g. Rook orchestrated cluster, and mons' FQDN is # resolved through k8s service, set dns policy to cluster first dnsPolicy: ClusterFirstWithHostNet diff --git a/deploy/cephfs/kubernetes/csi-cephfsplugin.yaml b/deploy/cephfs/kubernetes/csi-cephfsplugin.yaml index 960d57085..7c869cdea 100644 --- a/deploy/cephfs/kubernetes/csi-cephfsplugin.yaml +++ b/deploy/cephfs/kubernetes/csi-cephfsplugin.yaml @@ -13,6 +13,7 @@ spec: app: csi-cephfsplugin spec: serviceAccount: cephfs-csi-nodeplugin + priorityClassName: system-node-critical hostNetwork: true # to use e.g. Rook orchestrated cluster, and mons' FQDN is # resolved through k8s service, set dns policy to cluster first diff --git a/deploy/rbd/kubernetes/csi-rbdplugin.yaml b/deploy/rbd/kubernetes/csi-rbdplugin.yaml index a16beca50..6759c5c32 100644 --- a/deploy/rbd/kubernetes/csi-rbdplugin.yaml +++ b/deploy/rbd/kubernetes/csi-rbdplugin.yaml @@ -15,6 +15,7 @@ spec: serviceAccount: rbd-csi-nodeplugin hostNetwork: true hostPID: true + priorityClassName: system-node-critical # to use e.g. Rook orchestrated cluster, and mons' FQDN is # resolved through k8s service, set dns policy to cluster first dnsPolicy: ClusterFirstWithHostNet