Skip to content

Commit 780bca7

Browse files
feat: allow setting priority class (#80)
kubernetes priority classes control pod scheduling order and preemption during resource pressure. for pgdog, which may sit in the critical path of every database connection from applications, being preempted or starved of resources has immediate user-facing impact.
1 parent 737d4db commit 780bca7

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ spec:
4343
{{- if .Values.serviceAccount.create }}
4444
serviceAccountName: {{ include "pgdog.serviceAccountName" . }}
4545
{{- end }}
46+
{{- if .Values.priorityClassName }}
47+
priorityClassName: {{ .Values.priorityClassName }}
48+
{{- end }}
4649
{{- if .Values.terminationGracePeriodSeconds }}
4750
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
4851
{{- end }}

values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ port: 6432
5151
# replicas indicates how many instances of PgDog will run (HA).
5252
replicas: 2
5353

54+
# priorityClassName assigns a PriorityClass to pgdog pods for scheduling priority.
55+
# Not set by default; omitted from the pod spec unless explicitly specified.
56+
# Example: priorityClassName: production-critical
57+
5458
# Uncomment to enable explicit grace period
5559
# terminationGracePeriodSeconds: 90
5660

0 commit comments

Comments
 (0)