From 77fd275cd8c9434e43c17ba8340c41238620ca4c Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Tue, 18 Oct 2022 01:02:10 +0530 Subject: [PATCH] Add support of priorityClassName to the operator chart (#433) --- charts/opentelemetry-operator/Chart.yaml | 2 +- .../examples/default/rendered/service.yaml | 2 +- .../templates/deployment.yaml | 3 +++ charts/opentelemetry-operator/values.schema.json | 13 ++++++++++++- charts/opentelemetry-operator/values.yaml | 3 +++ 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/charts/opentelemetry-operator/Chart.yaml b/charts/opentelemetry-operator/Chart.yaml index 49b69909e46..37bad7b2c42 100644 --- a/charts/opentelemetry-operator/Chart.yaml +++ b/charts/opentelemetry-operator/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: opentelemetry-operator -version: 0.14.2 +version: 0.15.0 description: OpenTelemetry Operator Helm chart for Kubernetes type: application home: https://opentelemetry.io/ diff --git a/charts/opentelemetry-operator/examples/default/rendered/service.yaml b/charts/opentelemetry-operator/examples/default/rendered/service.yaml index 60cf8d85b96..7dd2df4cabb 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/service.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/service.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: Service metadata: labels: - helm.sh/chart: opentelemetry-operator-0.14.2 + helm.sh/chart: opentelemetry-operator-0.15.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/instance: example app.kubernetes.io/version: "0.60.0" diff --git a/charts/opentelemetry-operator/templates/deployment.yaml b/charts/opentelemetry-operator/templates/deployment.yaml index 1c49eb96d64..aed6c9c35d0 100644 --- a/charts/opentelemetry-operator/templates/deployment.yaml +++ b/charts/opentelemetry-operator/templates/deployment.yaml @@ -21,6 +21,9 @@ spec: control-plane: controller-manager spec: hostNetwork: {{ .Values.hostNetwork }} + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName | quote }} + {{- end }} containers: - args: - --metrics-addr=0.0.0.0:{{ .Values.manager.ports.metricsPort }} diff --git a/charts/opentelemetry-operator/values.schema.json b/charts/opentelemetry-operator/values.schema.json index e0a4f0b59d5..0528b5cc75d 100644 --- a/charts/opentelemetry-operator/values.schema.json +++ b/charts/opentelemetry-operator/values.schema.json @@ -18,7 +18,8 @@ "nodeSelector", "hostNetwork", "securityContext", - "testFramework" + "testFramework", + "priorityClassName" ], "properties": { "replicaCount": { @@ -864,6 +865,15 @@ false ] }, + "priorityClassName": { + "type": "string", + "default": "", + "title": "The priorityClassName Schema", + "examples": [ + "system-node-critical", + "system-cluster-critical" + ] + }, "securityContext": { "type": "object", "default": {}, @@ -1059,6 +1069,7 @@ "tolerations": [], "nodeSelector": {}, "hostNetwork": false, + "priorityClassName": "", "securityContext": { "runAsGroup": 65534, "runAsNonRoot": true, diff --git a/charts/opentelemetry-operator/values.yaml b/charts/opentelemetry-operator/values.yaml index ea3d4da0625..06214827477 100644 --- a/charts/opentelemetry-operator/values.yaml +++ b/charts/opentelemetry-operator/values.yaml @@ -123,6 +123,9 @@ tolerations: [] nodeSelector: {} hostNetwork: false +# Allows for pod scheduler prioritisation +priorityClassName: "" + ## SecurityContext holds pod-level security attributes and common container settings. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ securityContext: