Skip to content

Commit

Permalink
feat(helm): add support for priorityClassName
Browse files Browse the repository at this point in the history
  • Loading branch information
iarlyy committed Nov 20, 2024
1 parent b4b3be9 commit e7ea974
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ spec:
spec:
hostNetwork: true
serviceAccountName: {{ .Values.serviceAccount.name }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
nodeSelector:
kubernetes.io/os: linux
{{- with .Values.imagePullSecrets }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ spec:
cpu: 250m
memory: 250Mi
serviceAccountName: retina-operator
{{- if .Values.operator.priorityClassName }}
priorityClassName: {{ .Values.operator.priorityClassName }}
{{- end }}
terminationGracePeriodSeconds: 10
volumes:
- name: retina-operator-config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ spec:
spec:
hostNetwork: true
serviceAccountName: {{ .Values.serviceAccount.name }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
initContainers:
- name: init-retina
image: {{ .Values.image.initRepository }}:{{ .Values.image.tag }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ spec:
resources:
{{- toYaml .Values.operator.resources | nindent 12 }}
serviceAccountName: {{ .Values.operator.name }}
{{- if .Values.operator.priorityClassName }}
priorityClassName: {{ .Values.operator.priorityClassName }}
{{- end }}
terminationGracePeriodSeconds: 10
volumes:
- name: "{{ .Values.operator.name }}-config"
Expand Down
7 changes: 6 additions & 1 deletion deploy/legacy/manifests/controller/helm/retina/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ livenessProbe: {}
# failureThreshold: 5
# successThreshold: 1

## @param priorityClassName [string] Indicates the pod's priority
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
##
priorityClassName: ""

metrics:
## Prometheus Service Monitor
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
Expand Down Expand Up @@ -278,4 +283,4 @@ metrics:
metricRelabelings:
- sourceLabels: [__name__]
action: keep
regex: (.*)
regex: (.*)

0 comments on commit e7ea974

Please sign in to comment.