Skip to content

Commit

Permalink
[linkerd-jaeger] Add support for collector config merge and Deploymen…
Browse files Browse the repository at this point in the history
…t env

Signed-off-by: Cameron Boulton <[email protected]>
  • Loading branch information
Cameron Boulton committed Aug 22, 2023
1 parent a0af754 commit 8a86ecc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
3 changes: 2 additions & 1 deletion jaeger/charts/linkerd-jaeger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ Kubernetes: `>=1.21.0-0`
|-----|------|---------|-------------|
| clusterDomain | string | `"cluster.local"` | Kubernetes DNS Domain name to use |
| collector.UID | string | `nil` | UID for the collector resource |
| collector.config | string | see `value.yaml` for actual configuration | OpenTelemetry Collector config, See the [Configuration docs](https://opentelemetry.io/docs/collector/configuration/) for more information |
| collector.config | object | see `value.yaml` for actual configuration | OpenTelemetry Collector config, See the [Configuration docs](https://opentelemetry.io/docs/collector/configuration/) for more information |
| collector.enabled | bool | `true` | Set to false to exclude collector installation |
| collector.env | object | `{}` | Collector Deployment env |
| collector.image.name | string | `"otel/opentelemetry-collector"` | |
| collector.image.pullPolicy | string | `"Always"` | |
| collector.image.version | string | `"0.59.0"` | |
Expand Down
4 changes: 2 additions & 2 deletions jaeger/charts/linkerd-jaeger/templates/jaeger-injector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
linkerd.io/extension: jaeger
app.kubernetes.io/name: jaeger-injector
app.kubernetes.io/part-of: Linkerd
app.kubernetes.io/version: {{default .Values.webhook.image.version .Values.cliVersion}}
app.kubernetes.io/version: {{default .Values.webhook.image.version .Values.linkerdVersion}}
component: jaeger-injector
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
name: jaeger-injector
Expand Down Expand Up @@ -45,7 +45,7 @@ spec:
- -cluster-domain={{.Values.clusterDomain}}
- -linkerd-namespace={{.Values.linkerdNamespace}}
- -enable-pprof={{.Values.enablePprof | default false}}
image: {{.Values.webhook.image.name}}:{{default .Values.webhook.image.version .Values.cliVersion}}
image: {{.Values.webhook.image.name}}:{{default .Values.webhook.image.version .Values.linkerdVersion}}
imagePullPolicy: {{.Values.webhook.image.pullPolicy}}
livenessProbe:
httpGet:
Expand Down
10 changes: 9 additions & 1 deletion jaeger/charts/linkerd-jaeger/templates/tracing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ metadata:
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
data:
collector-config: |
{{- .Values.collector.config | trim | nindent 4 }}
{{- toYaml .Values.collector.config | trim | nindent 4 }}
---
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -99,11 +99,19 @@ spec:
env:
- name: GOGC
value: "80"
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
{{- range $name, $value := .Values.collector.env }}
- name: {{ $name }}
{{- toYaml $value | nindent 10 }}
{{- end }}
image: {{.Values.collector.image.name}}:{{.Values.collector.image.version}}
imagePullPolicy: {{.Values.collector.image.pullPolicy}}
livenessProbe:
Expand Down
5 changes: 4 additions & 1 deletion jaeger/charts/linkerd-jaeger/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ collector:
# [Configuration docs](https://opentelemetry.io/docs/collector/configuration/)
# for more information
# @default -- see `value.yaml` for actual configuration
config: |
config:
receivers:
otlp:
protocols:
Expand Down Expand Up @@ -107,6 +107,9 @@ collector:
processors: [batch]
exporters: [jaeger]

# -- Collector Deployment env
env: {}

jaeger:
# -- Set to false to exclude all-in-one Jaeger installation
enabled: true
Expand Down

0 comments on commit 8a86ecc

Please sign in to comment.