Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changes/unreleased/Feature-20250602-122014.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Feature
body: Make priority classes configurable in self-hosted opslevel
time: 2025-06-02T12:20:14.939124-05:00
2 changes: 1 addition & 1 deletion charts/opslevel/templates/elasticsearch/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
{{- template "opslevel.pullSecrets" . }}
{{- template "global.nodeSelector" . }}
serviceAccountName: "{{ .Values.elasticsearch.serviceAccount.name }}"
priorityClassName: opslevel-high
priorityClassName: {{ .Values.priorityClasses.high }}
{{- with .Values.elasticsearch.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/opslevel/templates/faktory/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
{{- template "global.nodeSelector" . }}
terminationGracePeriodSeconds: 10
shareProcessNamespace: true
priorityClassName: opslevel-critical
priorityClassName: {{ .Values.priorityClasses.critical }}
{{- with .Values.faktory.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/opslevel/templates/minio/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
spec:
{{- template "opslevel.pullSecrets" . }}
{{- template "global.nodeSelector" . }}
priorityClassName: opslevel-high
priorityClassName: {{ .Values.priorityClasses.high }}
{{- with .Values.objectStorage.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/opslevel/templates/mysql/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
{{- template "opslevel.pullSecrets" . }}
{{- template "global.nodeSelector" . }}
serviceAccountName: "{{ .Values.mysql.serviceAccount.name }}"
priorityClassName: opslevel-critical
priorityClassName: {{ .Values.priorityClasses.critical }}
{{- with .Values.mysql.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/opslevel/templates/opslevel/scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
spec:
{{- template "opslevel.pullSecrets" . }}
{{- template "global.nodeSelector" . }}
priorityClassName: opslevel-normal
priorityClassName: {{ .Values.priorityClasses.normal }}
terminationGracePeriodSeconds: 300
initContainers:
{{- if .Values.certificate.enabled }}
Expand Down
2 changes: 1 addition & 1 deletion charts/opslevel/templates/opslevel/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
spec:
{{- template "opslevel.pullSecrets" . }}
{{- template "global.nodeSelector" . }}
priorityClassName: opslevel-normal
priorityClassName: {{ .Values.priorityClasses.normal }}
{{- with .Values.opslevel.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/opslevel/templates/opslevel/worker-faktory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
spec:
{{- template "opslevel.pullSecrets" . }}
{{- template "global.nodeSelector" . }}
priorityClassName: opslevel-normal
priorityClassName: {{ .Values.priorityClasses.normal }}
{{- with .Values.opslevel.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/opslevel/templates/opslevel/worker-high.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
spec:
{{- template "opslevel.pullSecrets" . }}
{{- template "global.nodeSelector" . }}
priorityClassName: opslevel-normal
priorityClassName: {{ .Values.priorityClasses.normal }}
{{- with .Values.opslevel.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/opslevel/templates/opslevel/worker-low.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
spec:
{{- template "opslevel.pullSecrets" . }}
{{- template "global.nodeSelector" . }}
priorityClassName: opslevel-normal
priorityClassName: {{ .Values.priorityClasses.normal }}
{{- with .Values.opslevel.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/opslevel/templates/opslevel/worker-search.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
spec:
{{- template "opslevel.pullSecrets" . }}
{{- template "global.nodeSelector" . }}
priorityClassName: opslevel-normal
priorityClassName: {{ .Values.priorityClasses.normal }}
{{- with .Values.opslevel.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/opslevel/templates/opssight/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
spec:
{{- template "opslevel.pullSecrets" . }}
{{- template "global.nodeSelector" . }}
priorityClassName: opslevel-normal
priorityClassName: {{ .Values.priorityClasses.normal }}
{{- with .Values.opssight.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/opslevel/templates/opssight/worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
spec:
{{- template "opslevel.pullSecrets" . }}
{{- template "global.nodeSelector" . }}
priorityClassName: opslevel-normal
priorityClassName: {{ .Values.priorityClasses.normal }}
{{- with .Values.opssight.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/opslevel/templates/postgres/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
{{- template "opslevel.pullSecrets" . }}
{{- template "global.nodeSelector" . }}
serviceAccountName: "{{ .Values.postgres.serviceAccount.name }}"
priorityClassName: opslevel-high
priorityClassName: {{ .Values.priorityClasses.high }}
{{- with .Values.postgres.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
8 changes: 5 additions & 3 deletions charts/opslevel/templates/priority-class.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
{{- if eq .Values.priorityClasses.create true }}
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: opslevel-critical
name: {{ .Values.priorityClasses.critical }}
value: 1000000
globalDefault: false
description: "This priority class will be used to ensure opslevel mysql pod preempts other self-hosted workloads."
---
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: opslevel-high
name: {{ .Values.priorityClasses.high }}
value: 10000
globalDefault: false
description: "This priority class will be used for statefulsets to ensure they preempts other self-hosted workloads."
---
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: opslevel-normal
name: {{ .Values.priorityClasses.normal }}
value: 100
globalDefault: false
description: "This priority class will be used for all other self-hosted workloads."
{{- end }}
2 changes: 1 addition & 1 deletion charts/opslevel/templates/redis/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
spec:
{{- template "opslevel.pullSecrets" . }}
{{- template "global.nodeSelector" . }}
priorityClassName: opslevel-normal
priorityClassName: {{ .Values.priorityClasses.normal }}
{{- with .Values.redis.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/opslevel/templates/runner/new-mode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
spec:
{{- template "opslevel.pullSecrets" . }}
{{- template "global.nodeSelector" . }}
priorityClassName: opslevel-normal
priorityClassName: {{ .Values.priorityClasses.normal }}
{{- with .Values.runner.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/opslevel/templates/runner/old-mode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
spec:
{{- template "opslevel.pullSecrets" . }}
{{- template "global.nodeSelector" . }}
priorityClassName: opslevel-normal
priorityClassName: {{ .Values.priorityClasses.normal }}
{{- with .Values.runner.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
5 changes: 5 additions & 0 deletions charts/opslevel/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -338,3 +338,8 @@ certificate:
crt: ""
key: ""

priorityClasses:
create: true
critical: "opslevel-critical"
high: "opslevel-high"
normal: "opslevel-normal"