From dc0552a9a3fe3f3967d7a8e6fa60bdc62f969a3a Mon Sep 17 00:00:00 2001 From: m00lecule <33501567+m00lecule@users.noreply.github.com> Date: Tue, 17 Dec 2024 21:16:41 +0100 Subject: [PATCH] feat(fluent-bit): set system-node-critical as a default priorityClass (#70) --- .../templates/linux/cloudwatch-agent-daemonset.yaml | 1 + .../templates/linux/fluent-bit-daemonset.yaml | 1 + .../templates/windows/cloudwatch-agent-windows-daemonset.yaml | 1 + .../templates/windows/fluent-bit-windows-daemonset.yaml | 1 + charts/amazon-cloudwatch-observability/values.yaml | 2 ++ 5 files changed, 6 insertions(+) diff --git a/charts/amazon-cloudwatch-observability/templates/linux/cloudwatch-agent-daemonset.yaml b/charts/amazon-cloudwatch-observability/templates/linux/cloudwatch-agent-daemonset.yaml index 4f01190..0af4d37 100644 --- a/charts/amazon-cloudwatch-observability/templates/linux/cloudwatch-agent-daemonset.yaml +++ b/charts/amazon-cloudwatch-observability/templates/linux/cloudwatch-agent-daemonset.yaml @@ -57,6 +57,7 @@ spec: nodeSelector: kubernetes.io/os: linux serviceAccount: {{ template "cloudwatch-agent.serviceAccountName" . }} + priorityClassName: {{ .Values.agent.priorityClassName }} affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: diff --git a/charts/amazon-cloudwatch-observability/templates/linux/fluent-bit-daemonset.yaml b/charts/amazon-cloudwatch-observability/templates/linux/fluent-bit-daemonset.yaml index 7aff77f..73f6866 100644 --- a/charts/amazon-cloudwatch-observability/templates/linux/fluent-bit-daemonset.yaml +++ b/charts/amazon-cloudwatch-observability/templates/linux/fluent-bit-daemonset.yaml @@ -77,6 +77,7 @@ spec: terminationGracePeriodSeconds: 10 hostNetwork: true dnsPolicy: ClusterFirstWithHostNet + priorityClassName: {{ .Values.containerLogs.fluentBit.priorityClassName }} volumes: - name: fluentbitstate hostPath: diff --git a/charts/amazon-cloudwatch-observability/templates/windows/cloudwatch-agent-windows-daemonset.yaml b/charts/amazon-cloudwatch-observability/templates/windows/cloudwatch-agent-windows-daemonset.yaml index 5dfa0bc..b60804e 100644 --- a/charts/amazon-cloudwatch-observability/templates/windows/cloudwatch-agent-windows-daemonset.yaml +++ b/charts/amazon-cloudwatch-observability/templates/windows/cloudwatch-agent-windows-daemonset.yaml @@ -14,6 +14,7 @@ spec: image: {{ template "cloudwatch-agent.image" . }} mode: daemonset serviceAccount: {{ template "cloudwatch-agent.serviceAccountName" . }} + priorityClassName: {{ .Values.agent.priorityClassName }} nodeSelector: kubernetes.io/os: windows config: {{ include "cloudwatch-agent.modify-config" (merge (dict "Config" $config) .) }} diff --git a/charts/amazon-cloudwatch-observability/templates/windows/fluent-bit-windows-daemonset.yaml b/charts/amazon-cloudwatch-observability/templates/windows/fluent-bit-windows-daemonset.yaml index f475a13..7853649 100644 --- a/charts/amazon-cloudwatch-observability/templates/windows/fluent-bit-windows-daemonset.yaml +++ b/charts/amazon-cloudwatch-observability/templates/windows/fluent-bit-windows-daemonset.yaml @@ -28,6 +28,7 @@ spec: hostProcess: true runAsUserName: "NT AUTHORITY\\System" hostNetwork: true + priorityClassName: {{ .Values.containerLogs.fluentBit.priorityClassName }} nodeSelector: kubernetes.io/os: windows containers: diff --git a/charts/amazon-cloudwatch-observability/values.yaml b/charts/amazon-cloudwatch-observability/values.yaml index 1922e4e..6fb058b 100644 --- a/charts/amazon-cloudwatch-observability/values.yaml +++ b/charts/amazon-cloudwatch-observability/values.yaml @@ -47,6 +47,7 @@ containerLogs: requests: cpu: 50m memory: 25Mi + priorityClassName: "" config: service: | [SERVICE] @@ -1197,6 +1198,7 @@ agent: us-gov-east-1: 743662458514.dkr.ecr.us-gov-east-1.amazonaws.com us-gov-west-1: 743662458514.dkr.ecr.us-gov-west-1.amazonaws.com enabled: true + priorityClassName: "" resources: requests: memory: "128Mi"