From aaf6922b1c3f9e626549132bf21cca43a956ba55 Mon Sep 17 00:00:00 2001 From: Warren Gifford Date: Tue, 17 Mar 2026 21:50:01 -0700 Subject: [PATCH 1/5] fix helm manifests to support 2.16 jaeger configs --- .../jaeger/jaeger-collector.Service.yaml | 12 ++++----- .../templates/jaeger/jaeger.Deployment.yaml | 27 ++++++++----------- .../otel-collector.Deployment.yaml | 4 +-- charts/sourcegraph/values.yaml | 10 +++---- 4 files changed, 23 insertions(+), 30 deletions(-) diff --git a/charts/sourcegraph/templates/jaeger/jaeger-collector.Service.yaml b/charts/sourcegraph/templates/jaeger/jaeger-collector.Service.yaml index 7e6ac14b..c03facd0 100644 --- a/charts/sourcegraph/templates/jaeger/jaeger-collector.Service.yaml +++ b/charts/sourcegraph/templates/jaeger/jaeger-collector.Service.yaml @@ -17,14 +17,14 @@ metadata: name: {{ default "jaeger-collector" .Values.jaeger.collector.name }} spec: ports: - - name: http-collector - port: 4321 + - name: http-otlp + port: 4318 protocol: TCP - targetPort: http-collector - - name: grpc-collector - port: 4320 + targetPort: http-otlp + - name: grpc-otlp + port: 4317 protocol: TCP - targetPort: grpc-collector + targetPort: grpc-otlp selector: {{- include "sourcegraph.jaeger.selectorLabels" . | nindent 4 }} app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml b/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml index 34eb8381..2430388c 100644 --- a/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml +++ b/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml @@ -53,36 +53,31 @@ spec: - name: jaeger image: {{ include "sourcegraph.image" (list . "jaeger") }} imagePullPolicy: {{ .Values.sourcegraph.image.pullPolicy }} - args: {{- default (list "--memory.max-traces=20000" "--sampling.strategies-file=/etc/jaeger/sampling_strategies.json" "--collector.otlp.enabled") .Values.jaeger.args | toYaml | nindent 8 }} + args: {{- default (list "--config=/etc/jaeger/jaeger-config.yaml") .Values.jaeger.args | toYaml | nindent 8 }} env: {{- range $name, $item := .Values.jaeger.env}} - name: {{ $name }} {{- $item | toYaml | nindent 10 }} {{- end }} ports: - - containerPort: 5775 - protocol: UDP - - containerPort: 6831 - protocol: UDP - - containerPort: 6832 - protocol: UDP - containerPort: 5778 protocol: TCP - - containerPort: 14250 + - containerPort: 16686 + name: http protocol: TCP - - name: grpc-collector - containerPort: 4320 + - containerPort: 4317 + name: grpc-otlp protocol: TCP - - name: http-collector - containerPort: 4321 + - containerPort: 4318 + name: http-otlp protocol: TCP - - name: http - containerPort: 16686 + - containerPort: 13133 + name: health protocol: TCP readinessProbe: httpGet: - path: "/" - port: 14269 + path: "/status" + port: 13133 initialDelaySeconds: 5 {{- if not .Values.sourcegraph.localDevMode }} resources: diff --git a/charts/sourcegraph/templates/otel-collector/otel-collector.Deployment.yaml b/charts/sourcegraph/templates/otel-collector/otel-collector.Deployment.yaml index d1d428a4..38d6d7c2 100644 --- a/charts/sourcegraph/templates/otel-collector/otel-collector.Deployment.yaml +++ b/charts/sourcegraph/templates/otel-collector/otel-collector.Deployment.yaml @@ -64,9 +64,9 @@ spec: - name: JAEGER_HOST value: jaeger-collector - name: JAEGER_OTLP_GRPC_PORT - value: "4320" + value: "4317" - name: JAEGER_OTLP_HTTP_PORT - value: "4321" + value: "4318" {{- end }} {{- range $name, $item := .Values.openTelemetry.gateway.env}} - name: {{ $name }} diff --git a/charts/sourcegraph/values.yaml b/charts/sourcegraph/values.yaml index 84af11e0..1bf1b0e2 100644 --- a/charts/sourcegraph/values.yaml +++ b/charts/sourcegraph/values.yaml @@ -1176,14 +1176,12 @@ jaeger: name: "jaeger-all-in-one" # -- Name used by resources. Does not affect service names or PVCs. name: "jaeger" - # -- Default args passed to the `jaeger` binary + # -- Default args passed to the `jaeger` binary. + # Jaeger v2.16+ uses a YAML config file instead of CLI flags. + # See https://www.jaegertracing.io/docs/2.16/configuration/ args: [ - "--memory.max-traces=20000", - "--sampling.strategies-file=/etc/jaeger/sampling_strategies.json", - "--collector.otlp.enabled", - "--collector.otlp.grpc.host-port=:4320", - "--collector.otlp.http.host-port=:4321", + "--config=/etc/jaeger/jaeger-config.yaml", ] # -- Security context for the `jaeger` container, # learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) From 4a7c14e2ee8df2403fd31e2224a38078bb50afcc Mon Sep 17 00:00:00 2001 From: Warren Gifford Date: Wed, 18 Mar 2026 17:28:14 -0700 Subject: [PATCH 2/5] fix to lint correctly --- charts/sourcegraph/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/sourcegraph/README.md b/charts/sourcegraph/README.md index f9e0c1b7..ce1ffb4c 100644 --- a/charts/sourcegraph/README.md +++ b/charts/sourcegraph/README.md @@ -157,7 +157,7 @@ In addition to the documented values, all services also support the following va | indexedSearchIndexer.image.defaultTag | string | `"6.0.0@sha256:11539e07040b85045a9aa07f970aa310066e240dc28e6c9627653ee2bc6e0b91"` | Docker image tag for the `zoekt-indexserver` image | | indexedSearchIndexer.image.name | string | `"search-indexer"` | Docker image name for the `zoekt-indexserver` image | | indexedSearchIndexer.resources | object | `{"limits":{"cpu":"8","memory":"8G"},"requests":{"cpu":"4","memory":"4G"}}` | Resource requests & limits for the `zoekt-indexserver` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) zoekt-indexserver is CPU bound. The more CPU you allocate to it, the lower lag between a new commit and it being indexed for search. | -| jaeger.args | list | `["--memory.max-traces=20000","--sampling.strategies-file=/etc/jaeger/sampling_strategies.json","--collector.otlp.enabled","--collector.otlp.grpc.host-port=:4320","--collector.otlp.http.host-port=:4321"]` | Default args passed to the `jaeger` binary | +| jaeger.args | list | `["--config=/etc/jaeger/jaeger-config.yaml"]` | Default args passed to the `jaeger` binary. Jaeger v2.16+ uses a YAML config file instead of CLI flags. See https://www.jaegertracing.io/docs/2.16/configuration/ | | jaeger.collector.name | string | `""` | Name of jaeger `collector` service | | jaeger.collector.serviceAnnotations | object | `{}` | Add extra annotations to jaeger `collector` service | | jaeger.collector.serviceLabels | object | `{}` | Add extra labels to jaeger `collector` service | From bb77ea343a1cd0c04b276daf51d03fbf55b63551 Mon Sep 17 00:00:00 2001 From: Warren Gifford Date: Thu, 19 Mar 2026 15:04:42 -0700 Subject: [PATCH 3/5] add override options for configuration via values.yaml --- charts/sourcegraph/README.md | 1 + .../templates/jaeger/jaeger.ConfigMap.yaml | 14 ++++++ .../templates/jaeger/jaeger.Deployment.yaml | 11 +++++ charts/sourcegraph/values.yaml | 49 +++++++++++++++++++ 4 files changed, 75 insertions(+) create mode 100644 charts/sourcegraph/templates/jaeger/jaeger.ConfigMap.yaml diff --git a/charts/sourcegraph/README.md b/charts/sourcegraph/README.md index ce1ffb4c..b151d4fa 100644 --- a/charts/sourcegraph/README.md +++ b/charts/sourcegraph/README.md @@ -162,6 +162,7 @@ In addition to the documented values, all services also support the following va | jaeger.collector.serviceAnnotations | object | `{}` | Add extra annotations to jaeger `collector` service | | jaeger.collector.serviceLabels | object | `{}` | Add extra labels to jaeger `collector` service | | jaeger.collector.serviceType | string | "ClusterIP" | Kubernetes service type of jaeger `collector` service, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | +| jaeger.config | object | `{"exporters":{"jaeger_storage_exporter":{"trace_storage":"main_store"}},"extensions":{"healthcheckv2":{"http":{"endpoint":"0.0.0.0:13133"},"use_v2":true},"jaeger_query":{"base_path":"/-/debug/jaeger","http":{"endpoint":"0.0.0.0:16686"},"storage":{"traces":"main_store"}},"jaeger_storage":{"backends":{"main_store":{"memory":{"max_traces":20000}}}},"remote_sampling":{"file":{"default_sampling_probability":1,"path":"/etc/jaeger/sampling_strategies.json"},"http":{"endpoint":"0.0.0.0:5778"}}},"processors":{"batch":{}},"receivers":{"otlp":{"protocols":{"grpc":{"endpoint":"0.0.0.0:4317"},"http":{"endpoint":"0.0.0.0:4318"}}}},"service":{"extensions":["jaeger_storage","jaeger_query","remote_sampling","healthcheckv2"],"pipelines":{"traces":{"exporters":["jaeger_storage_exporter"],"processors":["batch"],"receivers":["otlp"]}},"telemetry":{"logs":{"level":"info"}}}}` | Jaeger v2 YAML configuration. This is rendered into a ConfigMap and mounted at `/etc/jaeger/jaeger-config.yaml`. Customers can override individual settings (e.g., `max_traces`, sampling) directly in values.yaml. See https://www.jaegertracing.io/docs/2.16/configuration/ | | jaeger.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":101,"runAsUser":100}` | Security context for the `jaeger` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) | | jaeger.enabled | bool | `false` | Enable `jaeger` | | jaeger.image.defaultTag | string | `"6.0.0@sha256:79548aa11d7e2e6bf3e2012fb9e046df12ba5c5410bc24ec8f4d7cbb880336b9"` | Docker image tag for the `jaeger` image | diff --git a/charts/sourcegraph/templates/jaeger/jaeger.ConfigMap.yaml b/charts/sourcegraph/templates/jaeger/jaeger.ConfigMap.yaml new file mode 100644 index 00000000..365697ea --- /dev/null +++ b/charts/sourcegraph/templates/jaeger/jaeger.ConfigMap.yaml @@ -0,0 +1,14 @@ +{{- if .Values.jaeger.enabled -}} +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + {{- include "sourcegraph.jaeger.labels" . | nindent 4 }} + deploy: sourcegraph + app.kubernetes.io/component: all-in-one + app: jaeger + name: {{ .Values.jaeger.name }} +data: + jaeger-config.yaml: | + {{- toYaml .Values.jaeger.config | nindent 4 }} +{{- end }} diff --git a/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml b/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml index 2430388c..3b86fc12 100644 --- a/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml +++ b/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml @@ -30,6 +30,7 @@ spec: kubectl.kubernetes.io/default-container: jaeger prometheus.io/port: "16686" sourcegraph.prometheus/scrape: "true" + checksum/jaeger-config: {{ toYaml .Values.jaeger.config | sha256sum }} {{- if .Values.sourcegraph.podAnnotations }} {{- toYaml .Values.sourcegraph.podAnnotations | nindent 8 }} {{- end }} @@ -86,6 +87,10 @@ spec: securityContext: {{- toYaml .Values.jaeger.containerSecurityContext | nindent 10 }} volumeMounts: + - name: jaeger-config + mountPath: /etc/jaeger/jaeger-config.yaml + subPath: jaeger-config.yaml + readOnly: true {{- if .Values.jaeger.extraVolumeMounts }} {{- toYaml .Values.jaeger.extraVolumeMounts | nindent 8 }} {{- end }} @@ -104,6 +109,12 @@ spec: {{- end }} {{- include "sourcegraph.renderServiceAccountName" (list . "jaeger") | trim | nindent 6 }} volumes: + - name: jaeger-config + configMap: + name: {{ .Values.jaeger.name }} + items: + - key: jaeger-config.yaml + path: jaeger-config.yaml {{- if .Values.jaeger.extraVolumes }} {{- toYaml .Values.jaeger.extraVolumes | nindent 6 }} {{- end }} diff --git a/charts/sourcegraph/values.yaml b/charts/sourcegraph/values.yaml index 1bf1b0e2..fb98be09 100644 --- a/charts/sourcegraph/values.yaml +++ b/charts/sourcegraph/values.yaml @@ -1183,6 +1183,55 @@ jaeger: [ "--config=/etc/jaeger/jaeger-config.yaml", ] + # -- Jaeger v2 YAML configuration. This is rendered into a ConfigMap and + # mounted at `/etc/jaeger/jaeger-config.yaml`. Customers can override + # individual settings (e.g., `max_traces`, sampling) directly in values.yaml. + # See https://www.jaegertracing.io/docs/2.16/configuration/ + config: + service: + extensions: [jaeger_storage, jaeger_query, remote_sampling, healthcheckv2] + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [jaeger_storage_exporter] + telemetry: + logs: + level: info + extensions: + healthcheckv2: + use_v2: true + http: + endpoint: "0.0.0.0:13133" + jaeger_storage: + backends: + main_store: + memory: + max_traces: 20000 + jaeger_query: + storage: + traces: main_store + base_path: "/-/debug/jaeger" + http: + endpoint: "0.0.0.0:16686" + remote_sampling: + file: + path: /etc/jaeger/sampling_strategies.json + default_sampling_probability: 1.0 + http: + endpoint: "0.0.0.0:5778" + receivers: + otlp: + protocols: + grpc: + endpoint: "0.0.0.0:4317" + http: + endpoint: "0.0.0.0:4318" + processors: + batch: {} + exporters: + jaeger_storage_exporter: + trace_storage: main_store # -- Security context for the `jaeger` container, # learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) containerSecurityContext: From 9f9cf29b520bb62cd0c4337010c4214a13e1ed1a Mon Sep 17 00:00:00 2001 From: Warren Gifford Date: Thu, 19 Mar 2026 15:19:38 -0700 Subject: [PATCH 4/5] simplfy available config options --- charts/sourcegraph/README.md | 5 +- .../templates/jaeger/jaeger.ConfigMap.yaml | 45 ++++++++++++++- .../templates/jaeger/jaeger.Deployment.yaml | 2 +- charts/sourcegraph/values.yaml | 55 +++---------------- 4 files changed, 57 insertions(+), 50 deletions(-) diff --git a/charts/sourcegraph/README.md b/charts/sourcegraph/README.md index b151d4fa..5810d11e 100644 --- a/charts/sourcegraph/README.md +++ b/charts/sourcegraph/README.md @@ -162,7 +162,10 @@ In addition to the documented values, all services also support the following va | jaeger.collector.serviceAnnotations | object | `{}` | Add extra annotations to jaeger `collector` service | | jaeger.collector.serviceLabels | object | `{}` | Add extra labels to jaeger `collector` service | | jaeger.collector.serviceType | string | "ClusterIP" | Kubernetes service type of jaeger `collector` service, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | -| jaeger.config | object | `{"exporters":{"jaeger_storage_exporter":{"trace_storage":"main_store"}},"extensions":{"healthcheckv2":{"http":{"endpoint":"0.0.0.0:13133"},"use_v2":true},"jaeger_query":{"base_path":"/-/debug/jaeger","http":{"endpoint":"0.0.0.0:16686"},"storage":{"traces":"main_store"}},"jaeger_storage":{"backends":{"main_store":{"memory":{"max_traces":20000}}}},"remote_sampling":{"file":{"default_sampling_probability":1,"path":"/etc/jaeger/sampling_strategies.json"},"http":{"endpoint":"0.0.0.0:5778"}}},"processors":{"batch":{}},"receivers":{"otlp":{"protocols":{"grpc":{"endpoint":"0.0.0.0:4317"},"http":{"endpoint":"0.0.0.0:4318"}}}},"service":{"extensions":["jaeger_storage","jaeger_query","remote_sampling","healthcheckv2"],"pipelines":{"traces":{"exporters":["jaeger_storage_exporter"],"processors":["batch"],"receivers":["otlp"]}},"telemetry":{"logs":{"level":"info"}}}}` | Jaeger v2 YAML configuration. This is rendered into a ConfigMap and mounted at `/etc/jaeger/jaeger-config.yaml`. Customers can override individual settings (e.g., `max_traces`, sampling) directly in values.yaml. See https://www.jaegertracing.io/docs/2.16/configuration/ | +| jaeger.config | object | `{"logLevel":"info","maxTraces":20000,"samplingDefaultProbability":1}` | Jaeger v2 configuration overrides. These values are templated into a ConfigMap mounted at `/etc/jaeger/jaeger-config.yaml`. See https://www.jaegertracing.io/docs/2.16/configuration/ | +| jaeger.config.logLevel | string | `"info"` | Log level for the Jaeger instance (debug, info, warn, error) | +| jaeger.config.maxTraces | int | `20000` | Maximum number of traces stored in memory | +| jaeger.config.samplingDefaultProbability | float | `1` | Default sampling probability (0.0 to 1.0) returned to services that query Jaeger for sampling config | | jaeger.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":101,"runAsUser":100}` | Security context for the `jaeger` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) | | jaeger.enabled | bool | `false` | Enable `jaeger` | | jaeger.image.defaultTag | string | `"6.0.0@sha256:79548aa11d7e2e6bf3e2012fb9e046df12ba5c5410bc24ec8f4d7cbb880336b9"` | Docker image tag for the `jaeger` image | diff --git a/charts/sourcegraph/templates/jaeger/jaeger.ConfigMap.yaml b/charts/sourcegraph/templates/jaeger/jaeger.ConfigMap.yaml index 365697ea..c5d553f9 100644 --- a/charts/sourcegraph/templates/jaeger/jaeger.ConfigMap.yaml +++ b/charts/sourcegraph/templates/jaeger/jaeger.ConfigMap.yaml @@ -10,5 +10,48 @@ metadata: name: {{ .Values.jaeger.name }} data: jaeger-config.yaml: | - {{- toYaml .Values.jaeger.config | nindent 4 }} + service: + extensions: [jaeger_storage, jaeger_query, remote_sampling, healthcheckv2] + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [jaeger_storage_exporter] + telemetry: + logs: + level: {{ .Values.jaeger.config.logLevel | default "info" }} + extensions: + healthcheckv2: + use_v2: true + http: + endpoint: "0.0.0.0:13133" + jaeger_storage: + backends: + main_store: + memory: + max_traces: {{ .Values.jaeger.config.maxTraces | default 20000 }} + jaeger_query: + storage: + traces: main_store + base_path: "/-/debug/jaeger" + http: + endpoint: "0.0.0.0:16686" + remote_sampling: + file: + path: /etc/jaeger/sampling_strategies.json + default_sampling_probability: {{ .Values.jaeger.config.samplingDefaultProbability | default 1.0 }} + http: + endpoint: "0.0.0.0:5778" + receivers: + otlp: + protocols: + grpc: + endpoint: "0.0.0.0:4317" + http: + endpoint: "0.0.0.0:4318" + processors: + batch: {} + exporters: + jaeger_storage_exporter: + trace_storage: main_store {{- end }} diff --git a/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml b/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml index 3b86fc12..409e462c 100644 --- a/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml +++ b/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml @@ -30,7 +30,7 @@ spec: kubectl.kubernetes.io/default-container: jaeger prometheus.io/port: "16686" sourcegraph.prometheus/scrape: "true" - checksum/jaeger-config: {{ toYaml .Values.jaeger.config | sha256sum }} + checksum/jaeger-config: {{ include (print $.Template.BasePath "/jaeger/jaeger.ConfigMap.yaml") . | sha256sum }} {{- if .Values.sourcegraph.podAnnotations }} {{- toYaml .Values.sourcegraph.podAnnotations | nindent 8 }} {{- end }} diff --git a/charts/sourcegraph/values.yaml b/charts/sourcegraph/values.yaml index fb98be09..3a79dc62 100644 --- a/charts/sourcegraph/values.yaml +++ b/charts/sourcegraph/values.yaml @@ -1183,55 +1183,16 @@ jaeger: [ "--config=/etc/jaeger/jaeger-config.yaml", ] - # -- Jaeger v2 YAML configuration. This is rendered into a ConfigMap and - # mounted at `/etc/jaeger/jaeger-config.yaml`. Customers can override - # individual settings (e.g., `max_traces`, sampling) directly in values.yaml. + # -- Jaeger v2 configuration overrides. These values are templated into + # a ConfigMap mounted at `/etc/jaeger/jaeger-config.yaml`. # See https://www.jaegertracing.io/docs/2.16/configuration/ config: - service: - extensions: [jaeger_storage, jaeger_query, remote_sampling, healthcheckv2] - pipelines: - traces: - receivers: [otlp] - processors: [batch] - exporters: [jaeger_storage_exporter] - telemetry: - logs: - level: info - extensions: - healthcheckv2: - use_v2: true - http: - endpoint: "0.0.0.0:13133" - jaeger_storage: - backends: - main_store: - memory: - max_traces: 20000 - jaeger_query: - storage: - traces: main_store - base_path: "/-/debug/jaeger" - http: - endpoint: "0.0.0.0:16686" - remote_sampling: - file: - path: /etc/jaeger/sampling_strategies.json - default_sampling_probability: 1.0 - http: - endpoint: "0.0.0.0:5778" - receivers: - otlp: - protocols: - grpc: - endpoint: "0.0.0.0:4317" - http: - endpoint: "0.0.0.0:4318" - processors: - batch: {} - exporters: - jaeger_storage_exporter: - trace_storage: main_store + # -- Maximum number of traces stored in memory + maxTraces: 20000 + # -- Log level for the Jaeger instance (debug, info, warn, error) + logLevel: info + # -- Default sampling probability (0.0 to 1.0) returned to services that query Jaeger for sampling config + samplingDefaultProbability: 1.0 # -- Security context for the `jaeger` container, # learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) containerSecurityContext: From 5889003b3fc82502903c564703f7294f12c70c43 Mon Sep 17 00:00:00 2001 From: Michael Lin Date: Thu, 19 Mar 2026 15:47:47 -0700 Subject: [PATCH 5/5] mlzc/jaeger 2 (#844) --- charts/sourcegraph/README.md | 3 ++- charts/sourcegraph/templates/jaeger/jaeger.ConfigMap.yaml | 2 +- charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml | 4 +++- charts/sourcegraph/values.yaml | 7 ++++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/charts/sourcegraph/README.md b/charts/sourcegraph/README.md index 5810d11e..c5a643c4 100644 --- a/charts/sourcegraph/README.md +++ b/charts/sourcegraph/README.md @@ -162,7 +162,8 @@ In addition to the documented values, all services also support the following va | jaeger.collector.serviceAnnotations | object | `{}` | Add extra annotations to jaeger `collector` service | | jaeger.collector.serviceLabels | object | `{}` | Add extra labels to jaeger `collector` service | | jaeger.collector.serviceType | string | "ClusterIP" | Kubernetes service type of jaeger `collector` service, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | -| jaeger.config | object | `{"logLevel":"info","maxTraces":20000,"samplingDefaultProbability":1}` | Jaeger v2 configuration overrides. These values are templated into a ConfigMap mounted at `/etc/jaeger/jaeger-config.yaml`. See https://www.jaegertracing.io/docs/2.16/configuration/ | +| jaeger.config | object | `{"existingConfigMap":"","logLevel":"info","maxTraces":20000,"samplingDefaultProbability":1}` | Jaeger v2 configuration overrides. We only provide a limited number of options, use `existingConfigMap` to provide a full config if you need more control. | +| jaeger.config.existingConfigMap | string | `""` | Name of an preexisting ConfigMap containing Jaeger configuration. They must contain a `jaeger-config.yaml` key. If set, this will be used instead of the `config` values below. See https://www.jaegertracing.io/docs/2.16/configuration/ | | jaeger.config.logLevel | string | `"info"` | Log level for the Jaeger instance (debug, info, warn, error) | | jaeger.config.maxTraces | int | `20000` | Maximum number of traces stored in memory | | jaeger.config.samplingDefaultProbability | float | `1` | Default sampling probability (0.0 to 1.0) returned to services that query Jaeger for sampling config | diff --git a/charts/sourcegraph/templates/jaeger/jaeger.ConfigMap.yaml b/charts/sourcegraph/templates/jaeger/jaeger.ConfigMap.yaml index c5d553f9..7e2a388c 100644 --- a/charts/sourcegraph/templates/jaeger/jaeger.ConfigMap.yaml +++ b/charts/sourcegraph/templates/jaeger/jaeger.ConfigMap.yaml @@ -1,4 +1,4 @@ -{{- if .Values.jaeger.enabled -}} +{{- if and .Values.jaeger.enabled (not .Values.jaeger.config.existingConfigMap) -}} apiVersion: v1 kind: ConfigMap metadata: diff --git a/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml b/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml index 409e462c..75c8961e 100644 --- a/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml +++ b/charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml @@ -30,7 +30,9 @@ spec: kubectl.kubernetes.io/default-container: jaeger prometheus.io/port: "16686" sourcegraph.prometheus/scrape: "true" + {{- if not .Values.jaeger.config.existingConfigMap }} checksum/jaeger-config: {{ include (print $.Template.BasePath "/jaeger/jaeger.ConfigMap.yaml") . | sha256sum }} + {{- end }} {{- if .Values.sourcegraph.podAnnotations }} {{- toYaml .Values.sourcegraph.podAnnotations | nindent 8 }} {{- end }} @@ -111,7 +113,7 @@ spec: volumes: - name: jaeger-config configMap: - name: {{ .Values.jaeger.name }} + name: {{ default .Values.jaeger.name .Values.jaeger.config.existingConfigMap }} items: - key: jaeger-config.yaml path: jaeger-config.yaml diff --git a/charts/sourcegraph/values.yaml b/charts/sourcegraph/values.yaml index 3a79dc62..cdb59b5f 100644 --- a/charts/sourcegraph/values.yaml +++ b/charts/sourcegraph/values.yaml @@ -1183,10 +1183,11 @@ jaeger: [ "--config=/etc/jaeger/jaeger-config.yaml", ] - # -- Jaeger v2 configuration overrides. These values are templated into - # a ConfigMap mounted at `/etc/jaeger/jaeger-config.yaml`. - # See https://www.jaegertracing.io/docs/2.16/configuration/ + # -- Jaeger v2 configuration overrides. We only provide a limited number of options, use `existingConfigMap` to provide a full config if you need more control. config: + # -- Name of an preexisting ConfigMap containing Jaeger configuration. They must contain a `jaeger-config.yaml` key. If set, this will be used instead of the `config` values below. + # See https://www.jaegertracing.io/docs/2.16/configuration/ + existingConfigMap: "" # -- Maximum number of traces stored in memory maxTraces: 20000 # -- Log level for the Jaeger instance (debug, info, warn, error)