diff --git a/charts/jaeger-v2/.helmignore b/charts/jaeger-v2/.helmignore new file mode 100644 index 00000000..f0c13194 --- /dev/null +++ b/charts/jaeger-v2/.helmignore @@ -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 diff --git a/charts/jaeger-v2/Chart.lock b/charts/jaeger-v2/Chart.lock new file mode 100644 index 00000000..5ae11afd --- /dev/null +++ b/charts/jaeger-v2/Chart.lock @@ -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" diff --git a/charts/jaeger-v2/Chart.yaml b/charts/jaeger-v2/Chart.yaml new file mode 100644 index 00000000..11d45257 --- /dev/null +++ b/charts/jaeger-v2/Chart.yaml @@ -0,0 +1,45 @@ +apiVersion: v2 +appVersion: 2.0.0-rc2 +description: A Jaeger Helm chart for Kubernetes +name: jaeger-v2 +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 + 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 diff --git a/charts/jaeger-v2/readme.md b/charts/jaeger-v2/readme.md new file mode 100644 index 00000000..4e87fbf9 --- /dev/null +++ b/charts/jaeger-v2/readme.md @@ -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 ./ +``` + +- `` 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 ./ -f +``` + +- Replace `` with the desired name for your Helm release. +- Replace `` 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 +``` + +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 + diff --git a/charts/jaeger-v2/templates/_helpers.tpl b/charts/jaeger-v2/templates/_helpers.tpl new file mode 100644 index 00000000..3a01a3f9 --- /dev/null +++ b/charts/jaeger-v2/templates/_helpers.tpl @@ -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 }} \ No newline at end of file diff --git a/charts/jaeger-v2/templates/config-map.yaml b/charts/jaeger-v2/templates/config-map.yaml new file mode 100644 index 00000000..00a1c089 --- /dev/null +++ b/charts/jaeger-v2/templates/config-map.yaml @@ -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 }} diff --git a/charts/jaeger-v2/templates/deployment.yaml b/charts/jaeger-v2/templates/deployment.yaml new file mode 100644 index 00000000..7e0fda21 --- /dev/null +++ b/charts/jaeger-v2/templates/deployment.yaml @@ -0,0 +1,54 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "jaeger-v2.fullname" . }} + namespace: {{ template "jaeger-v2.namespace" . }} + labels: + {{- include "jaeger-v2.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "jaeger-v2.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + {{- include "jaeger-v2.selectorLabels" . | nindent 8 }} + {{- include "jaeger-v2.podLabels" . | nindent 8}} + spec: + containers: + - name: jaeger-v2 + image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag }}" + args: + - "--config" + - "/etc/jaeger/config.yaml" + ports: + - containerPort: 16686 + name: ui + - containerPort: 14268 + name: collector + - containerPort: 14250 + name: grpc + - containerPort: 9411 + name: zipkin + - containerPort: 4317 + name: otlp-grpc + - containerPort: 4318 + name: otlp-http + + resources: + limits: + cpu: {{ .Values.resources.limits.cpu }} + memory: {{ .Values.resources.limits.memory }} + requests: + cpu: {{ .Values.resources.requests.cpu }} + memory: {{ .Values.resources.requests.memory }} + volumeMounts: + - name: jaeger-v2-config + mountPath: /etc/jaeger + volumes: + - name: jaeger-v2-config + configMap: + name: {{ include "jaeger-v2.fullname" . }} \ No newline at end of file diff --git a/charts/jaeger-v2/values.yaml b/charts/jaeger-v2/values.yaml new file mode 100644 index 00000000..294622d1 --- /dev/null +++ b/charts/jaeger-v2/values.yaml @@ -0,0 +1,89 @@ +nameOverride: "" +fullnameOverride: "" +# Specify which namespace should be used to deploy the resources into +namespaceOverride: "" + +provisionDataStore: + cassandra: false + elasticsearch: false + kafka: false + +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: + + # 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 + +image: + registry: "docker.io" + repository: "jaegertracing" + name: "jaeger" + tag: "2.0.0-rc2" + + +# autoscaling is used only if mode is "deployment" or "statefulset" +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 10 + behavior: {} + targetCPUUtilizationPercentage: 80 + +# only used with deployment mode +replicaCount: 1 +# labels for pods +podLabels: {} + +resources: + limits: + cpu: 500m + memory: 512Mi + requests: + cpu: 100m + memory: 256Mi