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 23 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.helm.sh/incubator
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
version: 0.15.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
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
- name: common
repository: https://charts.bitnami.com/bitnami
version: 2.23.0
digest: sha256:b13c6270d6d45478b47d03157f7a1c44add98be0809d83b22597a0c800781c10
generated: "2024-10-01T10:23:03.372102011Z"
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: 1.53.0
Copy link
Member

Choose a reason for hiding this comment

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

what is the meaning of this version? Is this a reference to Jaeger version? Should it be hardcoded like that?

Copy link
Contributor

Choose a reason for hiding this comment

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

The appVersion is only informational according to Helm https://helm.sh/docs/topics/charts/#the-appversion-field but it is used to mark the version of image tag if tag is not set. You can see here (several places) for example query-deploy.yaml calls query.image which uses renderImage which defaults the image to use Chart.AppVersion. This ultimately is also used in the bitnami common chart that is referenced on the line below.

So YES it should be hardcoded (AND UPDATED!), but it can be removed IF replaced by tag in the image: section. But given Jaeger uses a single binary for all deploys, this is a good global place to ensure they are all up to the same version.

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: 3.3.1
Copy link
Contributor

Choose a reason for hiding this comment

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

would this not be version 1.0.0 or 0.1.0 or 1.0.0-rc1 ? Certainly we wouldn't want to start a new chart at 3.3.1?

Copy link
Contributor

Choose a reason for hiding this comment

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

Upon some review, this has a lot of major regressions compared to the other highly customizable chart. Is this just a draft?

Does version 2 not require a service.yaml and is it not a statefulset?
Service accounts?
Do we not need customization for query, collecter (are they gone in v2 of jeager)?
Nothing for elasticsearch cleaning or indexes or customization?
Oauth?
Spark?

There just seems to be a lot missing here and this is not marked draft or anything

Copy link
Member

Choose a reason for hiding this comment

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

@Stevenpc3 right now this is a proof of concept. I 100% agree with you that there are a lot of moving parts that could be reused from v1 chart, but I don't see a practical path towards that unless existing maintainers in this repo take on that work. This PR is being done by an intern who has both limited knowledge and limited time to get something done to enable Jaeger v2 installs.

Copy link
Contributor

@Stevenpc3 Stevenpc3 Oct 15, 2024

Choose a reason for hiding this comment

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

Ok. I get it... I know what it's like lol. I didn't mean to seem harsh. I just rely on the Jaeger chart and have some PRs coming and a few contributes already. I was here looking at future updates/plans/paths and got as bit worried. Charts can be fixed, but the churn can have cascading effects. I will help where I can and certainly review. I can get other eyes on it to if needed. I just was thinking it would be published in an incomplete state.

# 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: 0.15.3
repository: https://charts.helm.sh/incubator
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-0.15.3.tgz
│ ├── common-2.23.0.tgz
│ ├── elasticsearch-20.0.4.tgz
│ └── kafka-26.6.2.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`.
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved

## 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 `0.15.3`
- **Elasticsearch**: Version `20.0.4`
Copy link
Contributor

Choose a reason for hiding this comment

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

you should probably remove the versions here. Unless using a template like 'helm-doc' to template and generate these versions, they will get out of date and not aligned.

- **Kafka**: Version `26.6.2`
- **Common**: Version `2.23.0`

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: {{ template "jaeger-v2.namespace" . }}
Copy link
Contributor

Choose a reason for hiding this comment

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

labels:
{{- include "jaeger-v2.labels" . | nindent 4 }}
data:
config.yaml: |
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
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