Skip to content

Commit

Permalink
fix: priority and resources
Browse files Browse the repository at this point in the history
  • Loading branch information
akurilov committed Sep 20, 2024
1 parent df33567 commit de4f3ac
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion helm/bot-telegram/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
serviceAccountName: {{ include "bot-telegram.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
priority: {{ .Values.priority }}
priorityClassName: "{{ .Values.priority.class }}"
containers:
- name: {{ .Chart.Name }}
env:
Expand Down
8 changes: 8 additions & 0 deletions helm/bot-telegram/templates/priority-class.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: "{{ .Values.priority.class }}"
value: {{ .Values.priority.value }}
globalDefault: false
description: "This priority class should be used for high priority services only."
preemptionPolicy: "{{ .Values.priority.preemptionPolicy }}"
5 changes: 4 additions & 1 deletion helm/bot-telegram/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ autoscaling:
targetCPUUtilizationValue: 100m
targetMemoryUtilizationValue: 64Mi

priority: 1
priority:
class: "awk-major"
value: 100
preemptionPolicy: "PreemptLowerPriority"

nodeSelector: {}

Expand Down

0 comments on commit de4f3ac

Please sign in to comment.