From 1d1de69f3e7524b34a44afbe1382c64ace00cef9 Mon Sep 17 00:00:00 2001 From: Travis Nielsen Date: Tue, 22 Feb 2022 15:34:10 -0700 Subject: [PATCH] helm: allow setting priority class on operator and toolbox The operator and toolbox pods were not configurable for their priority class in the helm chart. Now the settings are exposed in the values.yaml. Signed-off-by: Travis Nielsen --- deploy/charts/rook-ceph-cluster/templates/deployment.yaml | 3 +++ deploy/charts/rook-ceph-cluster/values.yaml | 2 ++ deploy/charts/rook-ceph/templates/deployment.yaml | 3 +++ deploy/charts/rook-ceph/values.yaml | 3 +++ 4 files changed, 11 insertions(+) diff --git a/deploy/charts/rook-ceph-cluster/templates/deployment.yaml b/deploy/charts/rook-ceph-cluster/templates/deployment.yaml index 6336b1e38..e100f7990 100644 --- a/deploy/charts/rook-ceph-cluster/templates/deployment.yaml +++ b/deploy/charts/rook-ceph-cluster/templates/deployment.yaml @@ -20,6 +20,9 @@ spec: {{- $network := .Values.cephClusterSpec.network | default dict -}} {{- if ($network.provider | default "") | eq "host" }} hostNetwork: true +{{- end }} +{{- if .Values.toolbox.priorityClassName }} + priorityClassName: {{ .Values.toolbox.priorityClassName }} {{- end }} containers: - name: rook-ceph-tools diff --git a/deploy/charts/rook-ceph-cluster/values.yaml b/deploy/charts/rook-ceph-cluster/values.yaml index fd3e8f270..a15307834 100644 --- a/deploy/charts/rook-ceph-cluster/values.yaml +++ b/deploy/charts/rook-ceph-cluster/values.yaml @@ -24,6 +24,8 @@ toolbox: image: rook/ceph:VERSION tolerations: [] affinity: {} + # Set the priority class for the toolbox if desired + # priorityClassName: class monitoring: # requires Prometheus to be pre-installed diff --git a/deploy/charts/rook-ceph/templates/deployment.yaml b/deploy/charts/rook-ceph/templates/deployment.yaml index 9e98f86f7..5849495d8 100644 --- a/deploy/charts/rook-ceph/templates/deployment.yaml +++ b/deploy/charts/rook-ceph/templates/deployment.yaml @@ -21,6 +21,9 @@ spec: {{ toYaml .Values.annotations | indent 8 }} {{- end }} spec: +{{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} +{{- end }} containers: - name: rook-ceph-operator image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/deploy/charts/rook-ceph/values.yaml b/deploy/charts/rook-ceph/values.yaml index e6861d2fc..9dd1fa742 100644 --- a/deploy/charts/rook-ceph/values.yaml +++ b/deploy/charts/rook-ceph/values.yaml @@ -52,6 +52,9 @@ rbacEnable: true ## pspEnable: true +# Set the priority class for the rook operator deployment if desired +# priorityClassName: class + ## Settings for whether to disable the drivers or other daemons if they are not ## needed csi: