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

Add all-in-one deployment and configmap for jaeger-v2 #606

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 21 additions & 0 deletions charts/jaeger-v2/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
15 changes: 15 additions & 0 deletions charts/jaeger-v2/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
dependencies:
- name: cassandra
repository: https://charts.bitnami.com/bitnami
version: 12.0.3
- name: elasticsearch
repository: https://charts.bitnami.com/bitnami
version: 20.0.4
- name: kafka
repository: https://charts.bitnami.com/bitnami
version: 26.6.2
- name: common
repository: https://charts.bitnami.com/bitnami
version: 2.26.0
digest: sha256:93632d48e0cac6077b5c8250ab0675d5067c6b6865c692a16ebbc03a9e089287
generated: "2024-10-16T03:22:08.747721865+05:30"
45 changes: 45 additions & 0 deletions charts/jaeger-v2/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
apiVersion: v2
appVersion: 2.0.0-rc2
description: A Jaeger Helm chart for Kubernetes
name: jaeger-v2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit concerned about starting a jaeger-v2 chart.

Is the plan to deprecate the "jaeger" chart? Would all the template files in the jaeger chart be referenced here or copied over and duplicated?

why not make the templates backwards compatible and just keep the jaeger chart? If you cannot and it is cleaner to start a new one then I would recommend an overhaul and make a common folder to split up the jaeger and jeager-v2 charts then deprecate and eventually remove the jaeger chart and templates that no longer apply.

type: application
version: 1.0.0
# CronJobs require v1.21
kubeVersion: ">= 1.21-0"
keywords:
- jaeger
- opentelemetry
- tracing
home: https://jaegertracing.io
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
email: michael.lorant@fairfaxmedia.com.au
- name: naseemkullah
email: naseem@transit.app
- name: pavelnikolov
email: me@pavelnikolov.net
- name: jkowall
email: jkowall@kowall.net
dependencies:
- name: cassandra
version: 12.0.3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need to regenerate the lock file above?

repository: https://charts.bitnami.com/bitnami
condition: provisionDataStore.cassandra
- name: elasticsearch
version: 20.0.4
repository: https://charts.bitnami.com/bitnami
condition: provisionDataStore.elasticsearch
- name: kafka
version: 26.6.2
repository: https://charts.bitnami.com/bitnami
condition: provisionDataStore.kafka
- name: common
repository: https://charts.bitnami.com/bitnami
version: 2.x.x
167 changes: 167 additions & 0 deletions charts/jaeger-v2/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
# Jaeger Helm Chart Deployment (Version 2) Documentation

## Overview

This document outlines the steps to deploy the Jaeger Helm chart (version 2) and provides information on how to use a custom `values.yaml` configuration file during installation. The Jaeger Helm chart includes multiple sub-charts for data stores like Cassandra, Elasticsearch, and Kafka.

## Directory Structure

The structure of the Jaeger Helm chart is as follows:

```bash
kali@PC:~/LFX/helm-charts/charts/jaeger-v2$ tree
.
├── Chart.lock
├── Chart.yaml
├── charts
│ ├── cassandra.tgz
│ ├── common.tgz
│ ├── elasticsearch.tgz
│ └── kafka.tgz
├── readme.md
├── templates
│ ├── _helpers.tpl
│ ├── config-map.yaml
│ └── deployment.yaml
└── values.yaml

3 directories, 11 files
```

### Key Files
- **Chart.yaml**: Contains metadata about the Helm chart such as the chart version, name, and dependencies.
- **templates/**: This directory contains Kubernetes manifests that are templated by Helm and used for the deployment of the Jaeger application. Key templates include:
- `config-map.yaml`: Configures the ConfigMap for the application.
- `deployment.yaml`: Contains the template for the Kubernetes deployment of Jaeger.
- **values.yaml**: This file contains default configuration values for the chart, which are applied unless overridden by a custom file.
- **charts/**: Contains Helm chart dependencies such as Cassandra, Elasticsearch, Kafka, and common utilities.
- **readme.md**: Provides chart-specific documentation.

## Helm Installation

You can install the Jaeger Helm chart with the following commands:

### Basic Installation

To install the Jaeger chart using the default values from the included `values.yaml`:

```bash
helm install <chart_name> ./
```

- `<chart_name>` is the name you want to give your release.

### Installation with Custom Values

If you want to use a custom configuration, you can pass a custom `values.yaml` file. This allows you to override the default values specified in the chart’s `values.yaml`.

Use the following command to install the chart with a custom values file:

```bash
helm install <chart_name> ./ -f <custom_values.yaml>
```

- Replace `<chart_name>` with the desired name for your Helm release.
- Replace `<custom_values.yaml>` with the path to your custom configuration file.

### Example:

```bash
helm install jaeger-v2 ./ -f my-config-values.yaml
```

This command installs the Jaeger chart and uses `my-config-values.yaml` for overriding any configuration specified in the default `values.yaml`.

## Custom Values

When deploying Jaeger using a custom values file, any configuration set in the file will take precedence over the default settings in `values.yaml`. For example, you can modify parameters for `receivers`, `processors`, `exporters`, and more within your custom values file.

### Example Custom `values.yaml`

```yaml

service:
extensions: [jaeger_storage, jaeger_query, remote_sampling, healthcheckv2]
pipelines:
traces:
receivers: [otlp, jaeger, zipkin]
processors: [batch, adaptive_sampling]
exporters: [jaeger_storage_exporter]

extensions:
healthcheckv2:
use_v2: true
http: {}


jaeger_query:
storage:
traces: some_store
traces_archive: another_store
ui:
config_file: ./cmd/jaeger/config-ui.json

jaeger_storage:
backends:
some_store:
memory:
max_traces: 90000
another_store:
memory:
max_traces: 90000

remote_sampling:
adaptive:
sampling_store: some_store
initial_sampling_probability: 0.2
http: {}
grpc: {}

receivers:
otlp:
protocols:
grpc: {}
http: {}

jaeger:
protocols:
grpc: {}
thrift_binary: {}
thrift_compact: {}
thrift_http: {}

zipkin: {}

processors:
batch: {}
adaptive_sampling: {}

exporters:
jaeger_storage_exporter:
trace_storage: some_store
```

## Dependencies

This Helm chart comes with pre-packaged dependencies for data stores:
- **Cassandra**: Version
- **Elasticsearch**: Version
- **Kafka**: Version
- **Common**: Version

These dependencies can be managed through the `charts/` directory, and they are installed as part of the Jaeger deployment.

## Uninstallation

To uninstall the Helm release, use the following command:

```bash
helm uninstall <chart_name>
```

This will remove all Kubernetes resources created by the chart, including ConfigMaps, Deployments, Services, and StatefulSets.

## Conclusion

This document provides a summary of how to install and configure the Jaeger Helm chart (version 2) with both default and custom values. Custom configurations can be applied via a user-defined `values.yaml` file using the `-f` flag during installation.# Jaeger Helm Chart Deployment (Version 2) Documentation

92 changes: 92 additions & 0 deletions charts/jaeger-v2/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "jaeger-v2.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "jaeger-v2.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "jaeger-v2.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "jaeger-v2.labels" -}}
helm.sh/chart: {{ include "jaeger-v2.chart" . }}
{{ include "jaeger-v2.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "jaeger-v2.selectorLabels" -}}
app.kubernetes.io/name: {{ include "jaeger-v2.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "jaeger-v2.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "jaeger-v2.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{- define "jaeger-v2.namespace" -}}
{{- if .Values.namespaceOverride -}}
{{- .Values.namespaceOverride -}}
{{- else -}}
{{- .Release.Namespace -}}
{{- end -}}
{{- end -}}

{{- define "jaeger-v2.extensionsConfig" -}}
{{ toYaml .Values.extensions | nindent 6 }}
{{- end }}

{{- define "jaeger-v2.receiversConfig" -}}
{{ toYaml .Values.receivers | nindent 6 }}
{{- end }}

{{- define "jaeger-v2.processorsConfig" -}}
{{ toYaml .Values.processors | nindent 6 }}
{{- end }}

{{- define "jaeger-v2.exportersConfig" -}}
{{ toYaml .Values.exporters | nindent 6 }}
{{- end }}

{{- define "jaeger-v2.podLabels" -}}
{{- if .Values.podLabels }}
{{- tpl (.Values.podLabels | toYaml) . }}
{{- end }}
{{- end }}
25 changes: 25 additions & 0 deletions charts/jaeger-v2/templates/config-map.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "jaeger-v2.fullname" . }}
namespace: {{ include "jaeger-v2.namespace" . }}
labels:
{{- include "jaeger-v2.labels" . | nindent 4 }}
data:
config.yaml: |
service:
extensions: [{{ join ", " .Values.service.extensions }}]
pipelines:
traces:
receivers: [{{ join ", " .Values.service.pipelines.traces.receivers }}]
processors: [{{ join ", " .Values.service.pipelines.traces.processors }}]
exporters: [{{ join ", " .Values.service.pipelines.traces.exporters }}]

extensions:
{{- include "jaeger-v2.extensionsConfig" . | nindent 6 }}
receivers:
{{- include "jaeger-v2.receiversConfig" . | nindent 6 }}
processors:
{{- include "jaeger-v2.processorsConfig" . | nindent 6 }}
exporters:
{{- include "jaeger-v2.exportersConfig" . | nindent 6 }}
Loading
Loading