Skip to content

Commit

Permalink
add priority class name in values.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Shovan Maity <shovan.cse91@gmail.com>
  • Loading branch information
shovanmaity committed May 6, 2021
1 parent 7995250 commit ba2810e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
14 changes: 14 additions & 0 deletions deploy/helm/charts/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,17 @@ Create labels for cstor csi controller
{{ include "cstor.csiController.matchLabels" . }}
{{ include "cstor.csiController.componentLabels" . }}
{{- end -}}

{{/*
Create the name of the priority class for csi node plugin
*/}}
{{- define "cstor.csiNode.priorityClassName" -}}
{{- printf "%s" .Values.csiNode.priorityClassName }}
{{- end }}

{{/*
Create the name of the priority class for csi controller plugin
*/}}
{{- define "cstor.csiController.priorityClassName" -}}
{{- printf "%s" .Values.csiController.priorityClassName }}
{{- end }}
2 changes: 1 addition & 1 deletion deploy/helm/charts/templates/csi-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
{{ toYaml .Values.csiController.podLabels | nindent 8 }}
{{- end }}
spec:
priorityClassName: openebs-cstor-csi-controller-critical
priorityClassName: {{ template "cstor.csiController.priorityClassName" . }}
serviceAccount: {{ .Values.serviceAccount.csiController.name }}
containers:
- name: {{ .Values.csiController.resizer.name }}
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/charts/templates/csi-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
{{ toYaml .Values.csiNode.podLabels | nindent 8 }}
{{- end }}
spec:
priorityClassName: openebs-cstor-csi-node-critical
priorityClassName: {{ template "cstor.csiNode.priorityClassName" . }}
serviceAccount: {{ .Values.serviceAccount.csiNode.name }}
hostNetwork: true
containers:
Expand Down
4 changes: 2 additions & 2 deletions deploy/helm/charts/templates/priority-class.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: openebs-cstor-csi-controller-critical
name: {{ template "cstor.csiController.priorityClassName" . }}
value: 900000000
globalDefault: false
description: "This priority class should be used for the CStor CSI driver controller deployment only."
---
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: openebs-cstor-csi-node-critical
name: {{ template "cstor.csiNode.priorityClassName" . }}
value: 900001000
globalDefault: false
description: "This priority class should be used for the CStor CSI driver node deployment only."
2 changes: 2 additions & 0 deletions deploy/helm/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ cvcOperator:
securityContext: {}

csiController:
priorityClassName: openebs-cstor-csi-controller-critical
componentName: "openebs-cstor-csi-controller"
resizer:
name: "csi-resizer"
Expand Down Expand Up @@ -159,6 +160,7 @@ cstorCSIPlugin:
remount: "true"

csiNode:
priorityClassName: openebs-cstor-csi-node-critical
componentName: "openebs-cstor-csi-node"
driverRegistrar:
name: "csi-node-driver-registrar"
Expand Down

0 comments on commit ba2810e

Please sign in to comment.