Skip to content

Commit e15bd29

Browse files
committed
Add support for defining priorityClassName
https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ Signed-off-by: Giovanni Tirloni <[email protected]>
1 parent b6852d4 commit e15bd29

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

valkey/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ A Helm chart for Kubernetes
9595
| podSecurityContext.fsGroup | int | `1000` | |
9696
| podSecurityContext.runAsGroup | int | `1000` | |
9797
| podSecurityContext.runAsUser | int | `1000` | |
98+
| priorityClassName | string | `""` | |
9899
| replicaCount | int | `1` | |
99100
| resources | object | `{}` | |
100101
| securityContext.capabilities.drop[0] | string | `"ALL"` | |

valkey/templates/deploy_valkey.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ spec:
3333
{{- end }}
3434
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
3535
serviceAccountName: {{ include "valkey.serviceAccountName" . }}
36+
{{- if .Values.priorityClassName }}
37+
priorityClassName: {{ .Values.priorityClassName | quote }}
38+
{{- end }}
3639
securityContext:
3740
{{- toYaml .Values.podSecurityContext | nindent 8 }}
38-
3941
initContainers:
4042
- name: {{ .Chart.Name }}-init
4143
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"

valkey/values.schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,9 @@
290290
}
291291
}
292292
},
293+
"priorityClassName": {
294+
"type": "string"
295+
},
293296
"replicaCount": {
294297
"type": "integer"
295298
},

valkey/values.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ podSecurityContext:
3636
runAsUser: 1000
3737
runAsGroup: 1000
3838

39+
priorityClassName: ""
40+
3941
# Security context for the Valkey containers
4042
securityContext:
4143
capabilities:
@@ -315,4 +317,8 @@ metrics:
315317
# increase(redis_evicted_keys_total{service="{{ include "valkey.fullname" . }}-metrics"}[5m]) > 0
316318
# for: 1s
317319
# labels:
318-
# severity: error
320+
# severity: error
321+
# Environment variables to inject into Valkey container
322+
env: {}
323+
# Example:
324+
# LOG_LEVEL: info

0 commit comments

Comments
 (0)