diff --git a/config/configStructs/tapConfig.go b/config/configStructs/tapConfig.go index 1251e8e99..9fda21fe5 100644 --- a/config/configStructs/tapConfig.go +++ b/config/configStructs/tapConfig.go @@ -328,6 +328,7 @@ type TapConfig struct { Tolerations TolerationsConfig `yaml:"tolerations" json:"tolerations" default:"{}"` Auth AuthConfig `yaml:"auth" json:"auth"` Ingress IngressConfig `yaml:"ingress" json:"ingress"` + PriorityClass string `yaml:"priorityClass" json:"priorityClass" default:""` Routing RoutingConfig `yaml:"routing" json:"routing"` IPv6 bool `yaml:"ipv6" json:"ipv6" default:"true"` Debug bool `yaml:"debug" json:"debug" default:"false"` diff --git a/helm-chart/templates/04-hub-deployment.yaml b/helm-chart/templates/04-hub-deployment.yaml index 49df442d3..30539c33b 100644 --- a/helm-chart/templates/04-hub-deployment.yaml +++ b/helm-chart/templates/04-hub-deployment.yaml @@ -25,6 +25,9 @@ spec: spec: dnsPolicy: ClusterFirstWithHostNet serviceAccountName: {{ include "kubeshark.serviceAccountName" . }} + {{- if .Values.tap.priorityClass }} + priorityClassName: {{ .Values.tap.priorityClass | quote }} + {{- end }} containers: - name: hub command: diff --git a/helm-chart/templates/06-front-deployment.yaml b/helm-chart/templates/06-front-deployment.yaml index cda39fb00..d4d185895 100644 --- a/helm-chart/templates/06-front-deployment.yaml +++ b/helm-chart/templates/06-front-deployment.yaml @@ -175,3 +175,6 @@ spec: name: kubeshark-nginx-config-map dnsPolicy: ClusterFirstWithHostNet serviceAccountName: {{ include "kubeshark.serviceAccountName" . }} + {{- if .Values.tap.priorityClass }} + priorityClassName: {{ .Values.tap.priorityClass | quote }} + {{- end }} diff --git a/helm-chart/templates/09-worker-daemon-set.yaml b/helm-chart/templates/09-worker-daemon-set.yaml index a183eb365..a2a963bdd 100644 --- a/helm-chart/templates/09-worker-daemon-set.yaml +++ b/helm-chart/templates/09-worker-daemon-set.yaml @@ -331,6 +331,9 @@ spec: dnsPolicy: ClusterFirstWithHostNet hostNetwork: true serviceAccountName: {{ include "kubeshark.serviceAccountName" . }} + {{- if .Values.tap.priorityClass }} + priorityClassName: {{ .Values.tap.priorityClass | quote }} + {{- end }} {{- if .Values.tap.tolerations.workers }} tolerations: {{- range .Values.tap.tolerations.workers }} diff --git a/helm-chart/templates/18-cleanup-job.yaml b/helm-chart/templates/18-cleanup-job.yaml index 59a076299..716019f1c 100644 --- a/helm-chart/templates/18-cleanup-job.yaml +++ b/helm-chart/templates/18-cleanup-job.yaml @@ -10,6 +10,9 @@ spec: template: spec: serviceAccountName: {{ include "kubeshark.serviceAccountName" . }} + {{- if .Values.tap.priorityClass }} + priorityClassName: {{ .Values.tap.priorityClass | quote }} + {{- end }} restartPolicy: Never containers: - name: cleanup @@ -21,4 +24,4 @@ spec: image: '{{ .Values.tap.docker.registry }}/hub:{{ not (eq .Values.tap.docker.tag "") | ternary .Values.tap.docker.tag (include "kubeshark.defaultVersion" .) }}' {{- end }} command: ["/app/cleanup"] -{{ end -}} \ No newline at end of file +{{ end -}} diff --git a/helm-chart/templates/18-dex-deployment.yaml b/helm-chart/templates/18-dex-deployment.yaml index bf50dddc7..f9314c6a6 100644 --- a/helm-chart/templates/18-dex-deployment.yaml +++ b/helm-chart/templates/18-dex-deployment.yaml @@ -106,5 +106,7 @@ spec: secretName: kubeshark-dex-conf-secret dnsPolicy: ClusterFirstWithHostNet serviceAccountName: {{ include "kubeshark.serviceAccountName" . }} - + {{- if .Values.tap.priorityClass }} + priorityClassName: {{ .Values.tap.priorityClass | quote }} + {{- end }} {{- end }} diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index 6686cf8d1..a79875358 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -139,6 +139,7 @@ tap: host: ks.svc.cluster.local tls: [] annotations: {} + priorityClass: "" routing: front: basePath: ""