From c6b98c39062b759520ee484794888398d9092aa5 Mon Sep 17 00:00:00 2001 From: Yurii Dzobak <70581130+yuriydzobak@users.noreply.github.com> Date: Tue, 18 Jan 2022 16:41:04 +0200 Subject: [PATCH] Helm add resource block linkerd-jaeger chart (#7627) * added resource block jaeger-injector helm chart Signed-off-by: yuriydzobak --- jaeger/charts/linkerd-jaeger/README.md | 4 ++++ .../linkerd-jaeger/templates/jaeger-injector.yaml | 3 +++ jaeger/charts/linkerd-jaeger/values.yaml | 13 ++++++++++++- .../cmd/testdata/install_collector_disabled.golden | 1 + jaeger/cmd/testdata/install_default.golden | 1 + jaeger/cmd/testdata/install_jaeger_disabled.golden | 1 + 6 files changed, 22 insertions(+), 1 deletion(-) diff --git a/jaeger/charts/linkerd-jaeger/README.md b/jaeger/charts/linkerd-jaeger/README.md index 60e6f7086c756..df17b73e0e9e1 100644 --- a/jaeger/charts/linkerd-jaeger/README.md +++ b/jaeger/charts/linkerd-jaeger/README.md @@ -121,6 +121,10 @@ Kubernetes: `>=1.20.0-0` | webhook.namespaceSelector | string | `nil` | | | webhook.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | NodeSelector section, See the [K8S documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) for more information | | webhook.objectSelector | string | `nil` | | +| webhook.resources.cpu.limit | string | `nil` | Maximum amount of CPU units that the jaeger-injector container can use | +| webhook.resources.cpu.request | string | `nil` | Amount of CPU units that the jaeger-injector container requests | +| webhook.resources.memory.limit | string | `nil` | Maximum amount of memory that jaeger-injector container can use | +| webhook.resources.memory.request | string | `nil` | Amount of memory that the jaeger-injector container requests | | webhook.tolerations | string | `nil` | Tolerations section, See the [K8S documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for more information | ---------------------------------------------- diff --git a/jaeger/charts/linkerd-jaeger/templates/jaeger-injector.yaml b/jaeger/charts/linkerd-jaeger/templates/jaeger-injector.yaml index ac2dd6ec7c8d2..88fc9716be068 100644 --- a/jaeger/charts/linkerd-jaeger/templates/jaeger-injector.yaml +++ b/jaeger/charts/linkerd-jaeger/templates/jaeger-injector.yaml @@ -62,6 +62,9 @@ spec: - mountPath: /var/run/linkerd/tls name: tls readOnly: true + {{- if .Values.webhook.resources -}} + {{- include "partials.resources" .Values.webhook.resources | nindent 8 }} + {{- end }} serviceAccountName: jaeger-injector volumes: - name: tls diff --git a/jaeger/charts/linkerd-jaeger/values.yaml b/jaeger/charts/linkerd-jaeger/values.yaml index 14e39a2df3e6c..36a569bd1c1a7 100644 --- a/jaeger/charts/linkerd-jaeger/values.yaml +++ b/jaeger/charts/linkerd-jaeger/values.yaml @@ -19,7 +19,6 @@ enablePSP: false # -- Kubernetes DNS Domain name to use clusterDomain: cluster.local - collector: # -- Set to false to exclude collector installation enabled: true @@ -184,6 +183,18 @@ webhook: #matchLabels: # foo: bar + resources: + cpu: + # -- Maximum amount of CPU units that the jaeger-injector container can use + limit: + # -- Amount of CPU units that the jaeger-injector container requests + request: + memory: + # -- Maximum amount of memory that jaeger-injector container can use + limit: + # -- Amount of memory that the jaeger-injector container requests + request: + # -- NodeSelector section, See the # [K8S documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) for more information nodeSelector: *default_node_selector diff --git a/jaeger/cmd/testdata/install_collector_disabled.golden b/jaeger/cmd/testdata/install_collector_disabled.golden index 79c15986bbdb9..961fc43a0dbf5 100644 --- a/jaeger/cmd/testdata/install_collector_disabled.golden +++ b/jaeger/cmd/testdata/install_collector_disabled.golden @@ -100,6 +100,7 @@ spec: - mountPath: /var/run/linkerd/tls name: tls readOnly: true + resources: serviceAccountName: jaeger-injector volumes: - name: tls diff --git a/jaeger/cmd/testdata/install_default.golden b/jaeger/cmd/testdata/install_default.golden index d3947ca68fbac..61dd375ec3a94 100644 --- a/jaeger/cmd/testdata/install_default.golden +++ b/jaeger/cmd/testdata/install_default.golden @@ -100,6 +100,7 @@ spec: - mountPath: /var/run/linkerd/tls name: tls readOnly: true + resources: serviceAccountName: jaeger-injector volumes: - name: tls diff --git a/jaeger/cmd/testdata/install_jaeger_disabled.golden b/jaeger/cmd/testdata/install_jaeger_disabled.golden index c57c549b11b10..c1778d18383fd 100644 --- a/jaeger/cmd/testdata/install_jaeger_disabled.golden +++ b/jaeger/cmd/testdata/install_jaeger_disabled.golden @@ -100,6 +100,7 @@ spec: - mountPath: /var/run/linkerd/tls name: tls readOnly: true + resources: serviceAccountName: jaeger-injector volumes: - name: tls