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 #13

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
22c8ade
Jaeger allInOne allow different storage types (#603)
rgaduput Sep 20, 2024
7212b86
Merge branch 'main' into jaeger-v2-with-v1
hellspawn679 Oct 20, 2024
9e73b35
minor changes
Oct 22, 2024
0dd3924
Merge branch 'jaeger-v2-with-v1' of https://github.com/hellspawn679/h…
Oct 22, 2024
f7db758
added image changes
Oct 22, 2024
b980560
fix lint
Oct 22, 2024
d9aa942
removed v1 allInOne and added jaeger-v2
Oct 26, 2024
01d341b
removed v2 references
Oct 28, 2024
ee12ee4
added allInOne again
Oct 29, 2024
3012649
minor fix
Oct 29, 2024
1ea257d
fixed how the config is being passed
Oct 30, 2024
42c30a0
fixed mirror template change
Oct 30, 2024
f247a95
use --set-file for user config
Nov 1, 2024
647f7fa
removed config-test and updated configmap template
Nov 2, 2024
8069914
fixed
Nov 2, 2024
742febb
Merge branch 'v2' into jaeger-v2-with-v1
hellspawn679 Nov 2, 2024
b6bbc4b
fixed minor naming
hellspawn679 Nov 3, 2024
7a24558
indentation
yurishkuro Nov 3, 2024
6b4a59c
Jaeger v2 with v1 (#613)
hellspawn679 Nov 3, 2024
5c0e7ba
v2-elasticsearch
hellspawn679 Nov 8, 2024
69455e7
fix ci
hellspawn679 Nov 8, 2024
44c7298
fix ci
hellspawn679 Nov 8, 2024
bf68edc
Merge branch 'v2' into jaeger-v2-with-v1
hellspawn679 Nov 8, 2024
6fdf55a
fixed
hellspawn679 Nov 11, 2024
c3a7493
Merge branch 'jaeger-v2-with-v1' of https://github.com/hellspawn679/h…
hellspawn679 Nov 11, 2024
912de03
fixed and added docs
hellspawn679 Nov 12, 2024
d82e1cb
fixed
hellspawn679 Nov 18, 2024
e70863b
added port
hellspawn679 Nov 18, 2024
b2a3977
fixed
hellspawn679 Nov 18, 2024
7eabf48
fixed
hellspawn679 Nov 19, 2024
0ad61d2
fixed typo
hellspawn679 Nov 19, 2024
c07f325
fixed
hellspawn679 Nov 19, 2024
8700626
removed test config
hellspawn679 Nov 19, 2024
37eb6ec
updated docs
hellspawn679 Nov 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 20 additions & 32 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,31 @@ 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"
ct install --config ct.yaml
test-with-elasticsearch:
runs-on: ubuntu-latest
steps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

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

- name: Run elasticsearch-chart-testing (install)
- name: Run 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"
ct install --config ct.yaml \
--helm-extra-set-args " \
--set provisionDataStore.elasticsearch=true \
--set allInOne.enabled=false \
--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
--set agent.enabled=true \
--set collector.enabled=true \
--set query.enabled=true"

8 changes: 4 additions & 4 deletions charts/jaeger/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
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
annotations:
Jaegerv1Version: "1.62.0"
# CronJobs require v1.21
kubeVersion: ">= 1.21-0"
keywords:
Expand All @@ -16,8 +18,6 @@ icon: https://www.jaegertracing.io/img/jaeger-icon-reverse-color.svg
sources:
- https://hub.docker.com/u/jaegertracing/
maintainers:
- name: dvonthenen
email: david.vonthenen@dell.com
- name: mehta-ankit
email: ankit.mehta@appian.com
- name: mikelorant
Expand Down
109 changes: 109 additions & 0 deletions charts/jaeger/README-v2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@

---

# Jaeger Helm-chart Documentation

## Overview
This documentation provides step-by-step setup and configuration instructions for running Jaeger in various modes, with sections for both the `all-in-one` mode and the `Elasticsearch` configuration, followed by details on optional `--set` flags for custom configurations.

---

### 1. Jaeger All-in-One Mode

Jaeger’s all-in-one mode combines the Jaeger Agent, Collector, and Query into a single pod for simplicity. Use this mode for testing or lightweight deployments.

#### **Command to Run All-in-One**

```bash
helm install <chart_name> charts/jaeger \
--set-file userconfig=path/to/configfile.yaml # Optional: user-specific config
```

- **Flags Explained**:
- `provisionDataStore.cassandra=false`: Disable Cassandra provision.
- `storage.type=memory`: Use in-memory storage (non-persistent).
- `allInOne.enabled=true`: Enable the all-in-one Jaeger setup.
- `agent.enabled=false`, `collector.enabled=false`, `query.enabled=false`: Disable separate components since they’re embedded in all-in-one.
- `userconfig`: Optional file for additional configuration.


---

### 2. Elasticsearch Mode with Provisioned Data Store

This mode configures Jaeger to store trace data in an Elasticsearch backend, suitable for production-level usage.

#### **Command to Run with Elasticsearch**

1. **Single Master Node Configuration**
For a basic setup with only one Elasticsearch master node, use this command:

```bash
helm install <chart_name> charts/jaeger \
--set provisionDataStore.elasticsearch=true \
--set allInOne.enabled=false \
--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
--set agent.enabled=true \
--set collector.enabled=true \
--set query.enabled=true
--set-file userconfig=path/to/configfile.yaml # Optional: user-specific config
```

2. **Default Configuration**
For a more straightforward setup with default Elasticsearch configuration, use:

```bash
helm install <chart_name> charts/jaeger \
--set provisionDataStore.elasticsearch=true \
--set allInOne.enabled=false \
--set storage.type=elasticsearch \
--set agent.enabled=true \
--set collector.enabled=true \
--set query.enabled=true
--set-file userconfig=path/to/configfile.yaml # Optional: user-specific config
```

- **Flags Explained**:
- `provisionDataStore.cassandra=false`: Disable Cassandra provision.
- `provisionDataStore.elasticsearch=true`: Enable Elasticsearch as the storage.
- `storage.type=elasticsearch`: Use Elasticsearch for storage.
- **Single Master Node Settings** (optional for simplified configuration):
- `elasticsearch.master.masterOnly=false`
- `elasticsearch.master.replicaCount=1`
- `elasticsearch.data.replicaCount=0`
- `elasticsearch.coordinating.replicaCount=0`
- `elasticsearch.ingest.replicaCount=0`
- `userconfig`: Optional file for additional configuration.

---


### 3. Additional `--set` Configuration Options

For custom configurations, the following flags are commonly used. These cover primary Elasticsearch storage settings and additional archive configurations.

#### **Primary Storage Settings**
- `.Values.config.extensions.jaeger_storage.backends.primary_store.elasticsearch.index_prefix`: Set the prefix for Elasticsearch indices.
- `.Values.config.extensions.jaeger_storage.backends.primary_store.elasticsearch.host`: Specify the Elasticsearch host.
- `.Values.config.extensions.jaeger_storage.backends.primary_store.elasticsearch.user`: Username for Elasticsearch authentication.
- `.Values.config.extensions.jaeger_storage.backends.primary_store.elasticsearch.password`: Password for Elasticsearch authentication.

Here’s the updated documentation with the archive storage settings referenced and with similar flags specified for archive configurations.


#### **Archive Storage Settings**
- Similar flags for archive configurations can be used to manage archived trace data.

The `values.yaml` file shows archive configurations under `jaeger_storage` with the `archive_store` section for Elasticsearch. You can configure these with the following flags:

- `.Values.config.extensions.jaeger_storage.backends.archive_store.elasticsearch.index_prefix`
- `.Values.config.extensions.jaeger_storage.backends.archive_store.elasticsearch.server_urls`
- `.Values.config.extensions.jaeger_storage.backends.archive_store.elasticsearch.username`
- `.Values.config.extensions.jaeger_storage.backends.archive_store.elasticsearch.password`

---
82 changes: 79 additions & 3 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 @@ -608,7 +608,8 @@ Create pull secrets for ingester image
Create image name for agent image
*/}}
{{- define "agent.image" -}}
{{- include "renderImage" ( dict "imageRoot" .Values.agent.image "context" $ ) -}}
{{- $image := merge .Values.agent.image (dict "tag" .Chart.Annotations.Jaegerv1Version) -}}
{{- include "renderImage" ( dict "imageRoot" $image "context" $ ) -}}
{{- end -}}

{{/*
Expand Down Expand Up @@ -723,3 +724,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
Loading
Loading