diff --git a/charts/fission-all/templates/buildermgr/deployment.yaml b/charts/fission-all/templates/buildermgr/deployment.yaml index aa210c3c..03078417 100644 --- a/charts/fission-all/templates/buildermgr/deployment.yaml +++ b/charts/fission-all/templates/buildermgr/deployment.yaml @@ -49,6 +49,9 @@ spec: {{- include "opentracing.envs" . | indent 8 }} {{- include "opentelemtry.envs" . | indent 8 }} serviceAccountName: fission-svc +{{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} +{{- end }} {{- if .Values.extraCoreComponentPodConfig }} {{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}} {{- end }} \ No newline at end of file diff --git a/charts/fission-all/templates/controller/deployment.yaml b/charts/fission-all/templates/controller/deployment.yaml index c576b254..a0ea1aad 100644 --- a/charts/fission-all/templates/controller/deployment.yaml +++ b/charts/fission-all/templates/controller/deployment.yaml @@ -66,6 +66,9 @@ spec: - name: config-volume configMap: name: feature-config +{{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} +{{- end }} {{- if .Values.extraCoreComponentPodConfig }} {{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}} {{- end }} \ No newline at end of file diff --git a/charts/fission-all/templates/executor/deployment.yaml b/charts/fission-all/templates/executor/deployment.yaml index c392338c..845d362b 100644 --- a/charts/fission-all/templates/executor/deployment.yaml +++ b/charts/fission-all/templates/executor/deployment.yaml @@ -79,6 +79,11 @@ spec: name: pprof {{- end }} serviceAccountName: fission-svc +{{- if .Values.executor.priorityClassName }} + priorityClassName: {{ .Values.executor.priorityClassName }} +{{- else if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} +{{- end }} {{- if .Values.extraCoreComponentPodConfig }} {{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}} {{- end }} \ No newline at end of file diff --git a/charts/fission-all/templates/kubewatcher/deployment.yaml b/charts/fission-all/templates/kubewatcher/deployment.yaml index ed67a712..39bf036c 100644 --- a/charts/fission-all/templates/kubewatcher/deployment.yaml +++ b/charts/fission-all/templates/kubewatcher/deployment.yaml @@ -29,6 +29,9 @@ spec: {{- include "opentracing.envs" . | indent 8 }} {{- include "opentelemtry.envs" . | indent 8 }} serviceAccountName: fission-svc +{{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} +{{- end }} {{- if .Values.extraCoreComponentPodConfig }} {{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}} {{- end }} diff --git a/charts/fission-all/templates/mqt-keda/deployment.yaml b/charts/fission-all/templates/mqt-keda/deployment.yaml index 61c3b847..2ad1054a 100644 --- a/charts/fission-all/templates/mqt-keda/deployment.yaml +++ b/charts/fission-all/templates/mqt-keda/deployment.yaml @@ -47,6 +47,9 @@ spec: {{- include "opentracing.envs" . | indent 8 }} {{- include "opentelemtry.envs" . | indent 8 }} serviceAccountName: fission-svc +{{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} +{{- end }} {{- if .Values.extraCoreComponentPodConfig }} {{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}} {{- end }} diff --git a/charts/fission-all/templates/router/deployment.yaml b/charts/fission-all/templates/router/deployment.yaml index 03480847..a9ac2b8a 100644 --- a/charts/fission-all/templates/router/deployment.yaml +++ b/charts/fission-all/templates/router/deployment.yaml @@ -90,6 +90,11 @@ spec: name: pprof {{- end }} serviceAccountName: fission-svc +{{- if .Values.router.priorityClassName }} + priorityClassName: {{ .Values.router.priorityClassName }} +{{- else if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} +{{- end }} {{- if .Values.router.extraCoreComponentPodConfig }} {{ toYaml .Values.router.extraCoreComponentPodConfig | indent 6 -}} {{- else }} diff --git a/charts/fission-all/templates/storagesvc/deployment.yaml b/charts/fission-all/templates/storagesvc/deployment.yaml index 6aab88a4..83ed777d 100644 --- a/charts/fission-all/templates/storagesvc/deployment.yaml +++ b/charts/fission-all/templates/storagesvc/deployment.yaml @@ -87,6 +87,9 @@ spec: - name: fission-storage emptyDir: {} {{- end }} +{{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} +{{- end }} {{- if .Values.extraCoreComponentPodConfig }} {{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}} {{- end }} diff --git a/charts/fission-all/templates/timer/deployment.yaml b/charts/fission-all/templates/timer/deployment.yaml index bb14b8aa..f770f8eb 100644 --- a/charts/fission-all/templates/timer/deployment.yaml +++ b/charts/fission-all/templates/timer/deployment.yaml @@ -29,6 +29,9 @@ spec: {{- include "opentracing.envs" . | indent 8 }} {{- include "opentelemtry.envs" . | indent 8 }} serviceAccountName: fission-svc + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} + {{- end }} {{- if .Values.extraCoreComponentPodConfig }} {{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}} {{- end }} \ No newline at end of file diff --git a/charts/fission-all/values.yaml b/charts/fission-all/values.yaml index 8e6f51a3..871218cf 100644 --- a/charts/fission-all/values.yaml +++ b/charts/fission-all/values.yaml @@ -31,6 +31,13 @@ imageTag: v1.15.0-rc2 ## pullPolicy: IfNotPresent +## priorityClassName represents the priority class name to use for Fission components. +## Refer to https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ +## executor.priorityClassName takes precedence over this value for executor. +## router.priorityClassName takes precedence over this value for router. +## +priorityClassName: "" + ## controllerPort represents the port at which the Fission controller service should be exposed. ## controllerPort: 31313 @@ -87,6 +94,11 @@ fetcher: ## executor is responsible for providing resources to your functions. ## executor: + ## executor priorityClassName + ## Ref. https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ + ## Recommended to use system-cluster-critical for executor pods. + ## + priorityClassName: "" ## adoptExistingResources decides whether to adopt existing resources when executor restarts or Fission is redeployed. ## adoptExistingResources: false @@ -98,6 +110,11 @@ executor: ## router is responsible for routing function calls to the appropriate function. ## router: + ## router priorityClassName + ## Ref. https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ + ## Recommended to use system-cluster-critical for router pods. + ## + priorityClassName: "" ## deployAsDaemonSet decides whether to deploy router as a DaemonSet or a Deployment. ## deployAsDaemonSet: false diff --git a/skaffold.yaml b/skaffold.yaml index 0aed8501..4e4630e0 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -53,6 +53,7 @@ deploy: openTracing.enabled: false openTelemetry.otlpCollectorEndpoint: "" openTelemetry.otlpInsecure: true + priorityClassName: "system-cluster-critical" wait: true flags: install: