Skip to content

Commit 4184001

Browse files
authored
Merge pull request #82 from joshuasimon-taulia/master
feat(chart): allow configuration of k8s scheduling priority
2 parents a9cec78 + 42c3923 commit 4184001

File tree

5 files changed

+33
-2
lines changed

5 files changed

+33
-2
lines changed

charts/nfs-server-provisioner/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
appVersion: 3.0.0
33
description: nfs-server-provisioner is an out-of-tree dynamic provisioner for Kubernetes. You can use it to quickly & easily deploy shared storage that works almost anywhere.
44
name: nfs-server-provisioner
5-
version: 1.3.2
5+
version: 1.4.0
66
maintainers:
77
- name: kiall
88

charts/nfs-server-provisioner/README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ their default values.
8484
| `nodeSelector` | Map of node labels for pod assignment | `{}` |
8585
| `tolerations` | List of node taints to tolerate | `[]` |
8686
| `affinity` | Map of node/pod affinities | `{}` |
87-
| `podSecurityContext` | Security context settings for nfs-server-provisioner pod (see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) | `{}` |
87+
| `podSecurityContext` | Security context settings for nfs-server-provisioner pod (see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) | `{}` |
88+
| `priorityClass.create` | Enable creation of a PriorityClass resource for this nfs-server-provisioner instance | `false` |
89+
| `priorityClass.name` | Set a PriorityClass name to override the default name | `""` |
90+
| `priorityClass.value` | PriorityClass value. The higher the value, the higher the scheduling priority | `5` |
8891

8992
```console
9093
$ helm install nfs-server-provisioner nfs-ganesha-server-and-external-provisioner/nfs-server-provisioner \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{- if .Values.priorityClass.create -}}
2+
kind: PriorityClass
3+
apiVersion: scheduling.k8s.io/v1
4+
metadata:
5+
name: {{ .Values.priorityClass.name | default (include "nfs-provisioner.fullname" .) }}
6+
labels:
7+
app: {{ include "nfs-provisioner.name" . }}
8+
chart: {{ include "nfs-provisioner.chart" . }}
9+
heritage: {{ .Release.Service }}
10+
release: {{ .Release.Name }}
11+
value: {{ .Values.priorityClass.value }}
12+
globalDefault: false
13+
description: "This priority class should be used for nfs-provisioner pods only."
14+
{{- end }}

charts/nfs-server-provisioner/templates/statefulset.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ spec:
117117
tolerations:
118118
{{- toYaml . | nindent 8 }}
119119
{{- end }}
120+
{{- if (or .Values.priorityClass.name .Values.priorityClass.create) }}
121+
priorityClassName: {{ .Values.priorityClass.name | default (include "nfs-provisioner.fullname" .) | quote }}
122+
{{- end }}
120123

121124
{{- if not .Values.persistence.enabled }}
122125
volumes:

charts/nfs-server-provisioner/values.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,17 @@ rbac:
8686
##
8787
serviceAccountName: default
8888

89+
## For creating the PriorityClass automatically:
90+
priorityClass:
91+
## Enable creation of a PriorityClass resource for this nfs-server-provisioner instance
92+
create: false
93+
94+
## Set a PriorityClass name to override the default name
95+
name: ""
96+
97+
## PriorityClass value. The higher the value, the higher the scheduling priority
98+
value: 5
99+
89100
resources: {}
90101
# limits:
91102
# cpu: 100m

0 commit comments

Comments
 (0)