From 080d449e2fe00a0e5ea8e79d8b56ce8f956557e0 Mon Sep 17 00:00:00 2001 From: George Farias Date: Tue, 23 Apr 2024 14:12:46 -0300 Subject: [PATCH 1/3] add-priorityclassname-support --- deployments/helm/README.md | 2 ++ deployments/helm/templates/daemon-set.yml | 5 ++++- deployments/helm/values.yaml | 6 ++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/deployments/helm/README.md b/deployments/helm/README.md index 39c353b19..2298fe6ec 100644 --- a/deployments/helm/README.md +++ b/deployments/helm/README.md @@ -57,6 +57,8 @@ eBPF-based autoinstrumentation of HTTP and HTTPS services | serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | | tolerations | list | `[]` | Tolerations allow pods to be scheduled on nodes with specific taints | | updateStrategy.type | string | `"RollingUpdate"` | update strategy type | +| priorityClassName | string|`""` | priorityClassName for pods | +| updateStrategy.type | string | `"RollingUpdate"` | update strategy type | | volumeMounts | list | `[]` | Additional volumeMounts on the output Deployment definition. | | volumes | list | `[]` | Additional volumes on the output daemonset definition. | diff --git a/deployments/helm/templates/daemon-set.yml b/deployments/helm/templates/daemon-set.yml index c9b1da198..95476bc82 100644 --- a/deployments/helm/templates/daemon-set.yml +++ b/deployments/helm/templates/daemon-set.yml @@ -42,6 +42,9 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} securityContext: privileged: true + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} + {{- end }} ports: - containerPort: {{ .Values.service.targetPort }} protocol: TCP @@ -57,7 +60,7 @@ spec: valueFrom: {{- tpl (toYaml $value) $ | nindent 16 }} {{- end }} - {{- with .Values.nodeSelector }} + {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 12 }} {{- end }} diff --git a/deployments/helm/values.yaml b/deployments/helm/values.yaml index dbab3bc5f..df0e555e0 100644 --- a/deployments/helm/values.yaml +++ b/deployments/helm/values.yaml @@ -42,7 +42,7 @@ rbac: extraClusterRoleRules: [] # - apiGroups: [] # resources: [] - + serviceAccount: # -- Specifies whether a service account should be created create: true @@ -67,6 +67,8 @@ securityContext: {} # runAsNonRoot: true # runAsUser: 1000 +priorityClassName: "" + ## -- Expose the beyla internal metrics service to be accessed from outside the cluster (LoadBalancer service). ## or access it from within the cluster (ClusterIP service). Set the service type and the port to serve it. ## ref: http://kubernetes.io/docs/user-guide/services/ @@ -174,7 +176,7 @@ config: # grafana: # otlp: # cloud_zone: prod-eu-west-0 - # cloud_instance_id: 123456 + # cloud_instance_id: 123456 # cloud_api_key: attributes: kubernetes: From f1ea2f614a067a386d4fad891abe423b2b34cc9a Mon Sep 17 00:00:00 2001 From: George Farias Date: Tue, 23 Apr 2024 14:57:56 -0300 Subject: [PATCH 2/3] Fixed Readme and Values --- deployments/helm/README.md | 1 - deployments/helm/values.yaml | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/deployments/helm/README.md b/deployments/helm/README.md index 2298fe6ec..ef4d9b297 100644 --- a/deployments/helm/README.md +++ b/deployments/helm/README.md @@ -58,7 +58,6 @@ eBPF-based autoinstrumentation of HTTP and HTTPS services | tolerations | list | `[]` | Tolerations allow pods to be scheduled on nodes with specific taints | | updateStrategy.type | string | `"RollingUpdate"` | update strategy type | | priorityClassName | string|`""` | priorityClassName for pods | -| updateStrategy.type | string | `"RollingUpdate"` | update strategy type | | volumeMounts | list | `[]` | Additional volumeMounts on the output Deployment definition. | | volumes | list | `[]` | Additional volumes on the output daemonset definition. | diff --git a/deployments/helm/values.yaml b/deployments/helm/values.yaml index df0e555e0..8dfa4ead0 100644 --- a/deployments/helm/values.yaml +++ b/deployments/helm/values.yaml @@ -68,6 +68,8 @@ securityContext: {} # runAsUser: 1000 priorityClassName: "" + # system-node-critical + # system-cluster-critical ## -- Expose the beyla internal metrics service to be accessed from outside the cluster (LoadBalancer service). ## or access it from within the cluster (ClusterIP service). Set the service type and the port to serve it. From 197e19c6771344d93c4845d5fb40c364317b7f86 Mon Sep 17 00:00:00 2001 From: George Farias Date: Tue, 23 Apr 2024 18:58:12 -0300 Subject: [PATCH 3/3] Fix indentation --- deployments/helm/templates/daemon-set.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deployments/helm/templates/daemon-set.yml b/deployments/helm/templates/daemon-set.yml index 95476bc82..b5393d7ca 100644 --- a/deployments/helm/templates/daemon-set.yml +++ b/deployments/helm/templates/daemon-set.yml @@ -36,15 +36,15 @@ spec: {{- if or (eq .Values.preset "network") .Values.config.data.network }} hostNetwork: true {{- end }} + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} + {{- end }} containers: - name: beyla image: {{ .Values.global.image.registry | default .Values.image.registry }}/{{ .Values.image.repository }}{{ include "beyla.imageId" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} securityContext: privileged: true - {{- if .Values.priorityClassName }} - priorityClassName: {{ .Values.priorityClassName }} - {{- end }} ports: - containerPort: {{ .Values.service.targetPort }} protocol: TCP