Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jaeger v2 with v1 #613

Merged
merged 18 commits into from
Nov 3, 2024
Merged
49 changes: 10 additions & 39 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Run chart-testing (lint)
run: ct lint --config ct.yaml

test-with-cassandra:
test-with-all-in-one:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -47,43 +47,14 @@ jobs:

- uses: ./.github/actions/prepare-k8s

- name: Run cassandra-chart-testing (install)
run: ct install --config ct.yaml
test-with-allInOne:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: ./.github/actions/prepare-k8s

- name: Run allInOne-chart-testing (install)
- name: Run chart-testing (install)
run: |
ct install --config ct.yaml --helm-extra-set-args "
--set provisionDataStore.cassandra=false
--set storage.type=memory
--set allInOne.enabled=true
--set agent.enabled=false
--set collector.enabled=false
--set query.enabled=false"
test-with-elasticsearch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: ./.github/actions/prepare-k8s
ct install --config ct.yaml \
--helm-extra-set-args "
--set provisionDataStore.cassandra=false \
--set storage.type=memory \
--set allInOne.enabled=true \
--set agent.enabled=false \
--set collector.enabled=false \
--set query.enabled=false "

- name: Run elasticsearch-chart-testing (install)
run: |
ct install --config ct.yaml --helm-extra-set-args "
--set provisionDataStore.cassandra=false
--set provisionDataStore.elasticsearch=true
--set storage.type=elasticsearch
--set elasticsearch.master.masterOnly=false
--set elasticsearch.master.replicaCount=1
--set elasticsearch.data.replicaCount=0
--set elasticsearch.coordinating.replicaCount=0
--set elasticsearch.ingest.replicaCount=0"
4 changes: 2 additions & 2 deletions charts/jaeger/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v2
appVersion: 1.53.0
appVersion: 2.0.0-rc2
description: A Jaeger Helm chart for Kubernetes
name: jaeger
type: application
version: 3.3.2
version: 4.0.0
# CronJobs require v1.21
kubeVersion: ">= 1.21-0"
keywords:
Expand Down
79 changes: 77 additions & 2 deletions charts/jaeger/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -563,14 +563,14 @@ If not tag is provided, it defaults to .Chart.AppVersion.
{{- end -}}

{{/*
Create image name for all in one image
Create image name for all-in-one image
*/}}
{{- define "allInOne.image" -}}
{{- include "renderImage" ( dict "imageRoot" .Values.allInOne.image "context" $ ) -}}
{{- end -}}

{{/*
Create pull secrets for all in one image
Create pull secrets for all-in-one image
*/}}
{{- define "allInOne.imagePullSecrets" -}}
{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.allInOne.image) "context" $) -}}
Expand Down Expand Up @@ -723,3 +723,78 @@ Create pull secrets for hotrod image
{{- define "hotrod.imagePullSecrets" -}}
{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.hotrod.image) "context" $) -}}
{{- end }}


{{- define "jaeger.extensionsConfig" -}}
{{- if .Values.extensions }}
{{ toYaml .Values.extensions | nindent 6 }}
{{- else }}
{{ toYaml .Values.config.extensions | nindent 6 }}
{{- end }}
{{- end }}

{{- define "jaeger.receiversConfig" -}}
{{- if .Values.receivers }}
{{ toYaml .Values.receivers | nindent 6 }}
{{- else }}
{{ toYaml .Values.config.receivers | nindent 6 }}
{{- end }}
{{- end }}

{{- define "jaeger.processorsConfig" -}}
{{- if .Values.processors }}
{{ toYaml .Values.processors | nindent 6 }}
{{- else }}
{{ toYaml .Values.config.processors | nindent 6 }}
{{- end }}
{{- end }}

{{- define "jaeger.exportersConfig" -}}
{{- if .Values.exporters }}
{{ toYaml .Values.exporters | nindent 6 }}
{{- else }}
{{ toYaml .Values.config.exporters | nindent 6 }}
{{- end }}
{{- end }}



{{- define "jaeger.serviceExtensions" -}}
{{- if and .Values.service .Values.service.extensions -}}
[{{ join ", " .Values.service.extensions }}]
{{- else -}}
[{{ join ", " .Values.config.service.extensions }}]
{{- end -}}
{{- end }}

{{- define "jaeger.serviceReceivers" -}}
{{- if and .Values.service .Values.service.pipelines .Values.service.pipelines.traces .Values.service.pipelines.traces.receivers -}}
[{{ join ", " .Values.service.pipelines.traces.receivers }}]
{{- else -}}
[{{ join ", " .Values.config.service.pipelines.traces.receivers }}]
{{- end -}}
{{- end }}

{{- define "jaeger.serviceProcessors" -}}
{{- if and .Values.service .Values.service.pipelines .Values.service.pipelines.traces .Values.service.pipelines.traces.processors -}}
[{{ join ", " .Values.service.pipelines.traces.processors }}]
{{- else -}}
[{{ join ", " .Values.config.service.pipelines.traces.processors }}]
{{- end -}}
{{- end }}

{{- define "jaeger.serviceExporters" -}}
{{- if and .Values.service .Values.service.pipelines .Values.service.pipelines.traces .Values.service.pipelines.traces.exporters -}}
[{{ join ", " .Values.service.pipelines.traces.exporters }}]
{{- else -}}
[{{ join ", " .Values.config.service.pipelines.traces.exporters }}]
{{- end -}}
{{- end }}

{{- define "jaeger.namespace" -}}
{{- if .Values.namespaceOverride -}}
{{- .Values.namespaceOverride -}}
{{- else -}}
{{- .Release.Namespace -}}
{{- end -}}
{{- end -}}
23 changes: 19 additions & 4 deletions charts/jaeger/templates/allinone-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ spec:
imagePullPolicy: {{ .Values.allInOne.image.pullPolicy }}
name: jaeger
args:
{{ if .Values.userconfig }}
- "--config"
- "/etc/jaeger/user-config.yaml"
{{- end }}
{{- range $arg := .Values.allInOne.args }}
- "{{ tpl $arg $ }}"
{{- end }}
Expand All @@ -80,11 +84,13 @@ spec:
protocol: TCP
- containerPort: 4318
protocol: TCP
- containerPort: 13133
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /
port: 14269
path: /status
port: 13133
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 15
Expand All @@ -93,8 +99,8 @@ spec:
readinessProbe:
failureThreshold: 3
httpGet:
path: /
port: 14269
path: /status
port: 13133
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
Expand All @@ -105,6 +111,10 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
{{ if .Values.userconfig }}
- name: user-config
mountPath: /etc/jaeger
{{- end }}
{{- if not .Values.storage.badger.ephemeral }}
- name: badger-data
mountPath: {{ .Values.storage.badger.persistence.mountPath }}
Expand All @@ -123,6 +133,11 @@ spec:
{{- toYaml .Values.allInOne.podSecurityContext | nindent 8 }}
serviceAccountName: {{ template "jaeger.fullname" . }}
volumes:
{{ if .Values.userconfig }}
- name: user-config
configMap:
name: user-config
{{- end }}
{{- if not .Values.storage.badger.ephemeral }}
- name: badger-data
persistentVolumeClaim:
Expand Down
12 changes: 12 additions & 0 deletions charts/jaeger/templates/user-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{ if .Values.userconfig }}
apiVersion: v1
kind: ConfigMap
metadata:
name: user-config
namespace: {{ include "jaeger.namespace" . }}
labels:
{{- include "jaeger.labels" . | nindent 4 }}
data:
user-config.yaml: |
{{- .Values.userconfig | nindent 4 }}
{{- end }}
57 changes: 56 additions & 1 deletion charts/jaeger/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,61 @@
# This is a YAML-formatted file.
# Jaeger values are grouped by component. Cassandra values override subchart values

# Will use for user provided config
userconfig:

config:
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
service:
extensions: [jaeger_storage, jaeger_query, healthcheckv2]
pipelines:
traces:
receivers: [otlp, jaeger, zipkin]
processors: [batch]
exporters: [jaeger_storage_exporter]

extensions:
healthcheckv2:
use_v2: true
http:
endpoint: 0.0.0.0:13133

# pprof:
# endpoint: 0.0.0.0:1777
# zpages:
# endpoint: 0.0.0.0:55679

jaeger_query:
storage:
traces: primary_store
traces_archive: archive_store

jaeger_storage:
backends:
primary_store:
memory:
max_traces: 100000
archive_store:
memory:
max_traces: 100000

receivers:
otlp:
protocols:
grpc:
http:
jaeger:
protocols:
grpc:
zipkin:

processors:
batch:

exporters:
jaeger_storage_exporter:
trace_storage: primary_store
# The following settings apply to Jaeger v1 and partially to Jaeger v2

global:
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
imageRegistry:

Expand All @@ -24,7 +79,7 @@ allInOne:
replicas: 1
image:
registry: ""
repository: jaegertracing/all-in-one
repository: jaegertracing/jaeger
tag: ""
digest: ""
pullPolicy: IfNotPresent
Expand Down
Loading