Skip to content

Commit bb77ea3

Browse files
committed
add override options for configuration via values.yaml
1 parent 4a7c14e commit bb77ea3

4 files changed

Lines changed: 75 additions & 0 deletions

File tree

charts/sourcegraph/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ In addition to the documented values, all services also support the following va
162162
| jaeger.collector.serviceAnnotations | object | `{}` | Add extra annotations to jaeger `collector` service |
163163
| jaeger.collector.serviceLabels | object | `{}` | Add extra labels to jaeger `collector` service |
164164
| 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) |
165+
| 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/ |
165166
| 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) |
166167
| jaeger.enabled | bool | `false` | Enable `jaeger` |
167168
| jaeger.image.defaultTag | string | `"6.0.0@sha256:79548aa11d7e2e6bf3e2012fb9e046df12ba5c5410bc24ec8f4d7cbb880336b9"` | Docker image tag for the `jaeger` image |
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{- if .Values.jaeger.enabled -}}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
labels:
6+
{{- include "sourcegraph.jaeger.labels" . | nindent 4 }}
7+
deploy: sourcegraph
8+
app.kubernetes.io/component: all-in-one
9+
app: jaeger
10+
name: {{ .Values.jaeger.name }}
11+
data:
12+
jaeger-config.yaml: |
13+
{{- toYaml .Values.jaeger.config | nindent 4 }}
14+
{{- end }}

charts/sourcegraph/templates/jaeger/jaeger.Deployment.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ spec:
3030
kubectl.kubernetes.io/default-container: jaeger
3131
prometheus.io/port: "16686"
3232
sourcegraph.prometheus/scrape: "true"
33+
checksum/jaeger-config: {{ toYaml .Values.jaeger.config | sha256sum }}
3334
{{- if .Values.sourcegraph.podAnnotations }}
3435
{{- toYaml .Values.sourcegraph.podAnnotations | nindent 8 }}
3536
{{- end }}
@@ -86,6 +87,10 @@ spec:
8687
securityContext:
8788
{{- toYaml .Values.jaeger.containerSecurityContext | nindent 10 }}
8889
volumeMounts:
90+
- name: jaeger-config
91+
mountPath: /etc/jaeger/jaeger-config.yaml
92+
subPath: jaeger-config.yaml
93+
readOnly: true
8994
{{- if .Values.jaeger.extraVolumeMounts }}
9095
{{- toYaml .Values.jaeger.extraVolumeMounts | nindent 8 }}
9196
{{- end }}
@@ -104,6 +109,12 @@ spec:
104109
{{- end }}
105110
{{- include "sourcegraph.renderServiceAccountName" (list . "jaeger") | trim | nindent 6 }}
106111
volumes:
112+
- name: jaeger-config
113+
configMap:
114+
name: {{ .Values.jaeger.name }}
115+
items:
116+
- key: jaeger-config.yaml
117+
path: jaeger-config.yaml
107118
{{- if .Values.jaeger.extraVolumes }}
108119
{{- toYaml .Values.jaeger.extraVolumes | nindent 6 }}
109120
{{- end }}

charts/sourcegraph/values.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,6 +1183,55 @@ jaeger:
11831183
[
11841184
"--config=/etc/jaeger/jaeger-config.yaml",
11851185
]
1186+
# -- Jaeger v2 YAML configuration. This is rendered into a ConfigMap and
1187+
# mounted at `/etc/jaeger/jaeger-config.yaml`. Customers can override
1188+
# individual settings (e.g., `max_traces`, sampling) directly in values.yaml.
1189+
# See https://www.jaegertracing.io/docs/2.16/configuration/
1190+
config:
1191+
service:
1192+
extensions: [jaeger_storage, jaeger_query, remote_sampling, healthcheckv2]
1193+
pipelines:
1194+
traces:
1195+
receivers: [otlp]
1196+
processors: [batch]
1197+
exporters: [jaeger_storage_exporter]
1198+
telemetry:
1199+
logs:
1200+
level: info
1201+
extensions:
1202+
healthcheckv2:
1203+
use_v2: true
1204+
http:
1205+
endpoint: "0.0.0.0:13133"
1206+
jaeger_storage:
1207+
backends:
1208+
main_store:
1209+
memory:
1210+
max_traces: 20000
1211+
jaeger_query:
1212+
storage:
1213+
traces: main_store
1214+
base_path: "/-/debug/jaeger"
1215+
http:
1216+
endpoint: "0.0.0.0:16686"
1217+
remote_sampling:
1218+
file:
1219+
path: /etc/jaeger/sampling_strategies.json
1220+
default_sampling_probability: 1.0
1221+
http:
1222+
endpoint: "0.0.0.0:5778"
1223+
receivers:
1224+
otlp:
1225+
protocols:
1226+
grpc:
1227+
endpoint: "0.0.0.0:4317"
1228+
http:
1229+
endpoint: "0.0.0.0:4318"
1230+
processors:
1231+
batch: {}
1232+
exporters:
1233+
jaeger_storage_exporter:
1234+
trace_storage: main_store
11861235
# -- Security context for the `jaeger` container,
11871236
# learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container)
11881237
containerSecurityContext:

0 commit comments

Comments
 (0)