From 22c8ade4fc78c0ab26288f939b2069fa1a482f02 Mon Sep 17 00:00:00 2001 From: Reddysekhar Gaduputi Date: Fri, 20 Sep 2024 10:19:51 +0530 Subject: [PATCH 01/28] Jaeger allInOne allow different storage types (#603) Signed-off-by: Reddysekhar Gaduputi upgrade jaeger-operator to latest 1.61.0 (#605) Signed-off-by: Blair Bowden added all-in-one deployment and configmap for jaeger-v2 Signed-off-by: Mehul lint fix Signed-off-by: Mehul fixed Signed-off-by: Mehul lint fix Signed-off-by: Mehul lint fix Signed-off-by: Mehul fixed using pre-hook Signed-off-by: Mehul fixed --config flag is not been passed Signed-off-by: mehul release ns for config-map.yaml Signed-off-by: mehul testing ci Signed-off-by: mehul testing ci Signed-off-by: mehul fixed ns Signed-off-by: mehul fixed ns Signed-off-by: mehul fixed template Signed-off-by: mehul removed sampling Signed-off-by: mehul removed adaptive sampling from processors Signed-off-by: mehul Revert "Jaeger v2 test2" Signed-off-by: mehul attempt to create v2 chart in v1 Signed-off-by: mehul enabled collector query and agent Signed-off-by: mehul version bump Signed-off-by: mehul testing-v2-ci Signed-off-by: mehul testing-v2-ci Signed-off-by: mehul added --helm-extra-set-args flag Signed-off-by: mehul fixed healthcheck port-v2 Signed-off-by: mehul Fix health check path Signed-off-by: Yuri Shkuro minor changes Signed-off-by: mehul --- .github/workflows/lint-test-v2.yaml | 72 +++++++++++++ charts/jaeger-operator/COMPATIBILITY.md | 1 + charts/jaeger-operator/Chart.yaml | 4 +- charts/jaeger-operator/README.md | 2 +- charts/jaeger-operator/values.yaml | 2 +- charts/jaeger/Chart.yaml | 2 +- charts/jaeger/templates/_helpers.tpl | 102 ++++++++++++++++-- .../templates/allinone-configmap-v2.yaml | 27 +++++ charts/jaeger/templates/allinone-deploy.yaml | 34 +++++- charts/jaeger/values.yaml | 56 ++++++++++ ct-v2.yaml | 10 ++ 11 files changed, 294 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/lint-test-v2.yaml create mode 100644 charts/jaeger/templates/allinone-configmap-v2.yaml create mode 100644 ct-v2.yaml diff --git a/.github/workflows/lint-test-v2.yaml b/.github/workflows/lint-test-v2.yaml new file mode 100644 index 00000000..e0692419 --- /dev/null +++ b/.github/workflows/lint-test-v2.yaml @@ -0,0 +1,72 @@ +name: Lint and Test Charts v2 + +on: pull_request + +jobs: + lint-test-v2: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@v4 + with: + version: v3.14.4 + + # Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and + # yamllint (https://github.com/adrienverge/yamllint) which require Python + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.7 + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.6.1 + with: + version: v3.10.1 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --config ct.yaml) + if [[ -n "$changed" ]]; then + echo "::set-output name=changed::true" + fi + + - name: Run chart-testing (lint) + run: ct lint --config ct.yaml + + - name: Create kind cluster + uses: helm/kind-action@v1.9.0 + if: steps.list-changed.outputs.changed == 'true' + + - name: Install kubectl + uses: azure/setup-kubectl@v4.0.0 + with: + version: 'v1.28.8' + id: install + + - name: Set up cert-manager + run: | + kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml --namespace ingress-nginx + kubectl label node --all ingress-ready=true + kubectl describe pod --selector=app.kubernetes.io/component=controller -n ingress-nginx + kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=5m + kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.6.1/cert-manager.yaml + + - name: Set up cmctl + run: | + curl -sSL -o cmctl.tar.gz https://github.com/cert-manager/cert-manager/releases/download/v1.6.1/cmctl-linux-amd64.tar.gz + tar xzf cmctl.tar.gz + sudo mv cmctl /usr/local/bin + cmctl version + + - name: Check if cert-manager is up + run: | + cmctl check api --wait=5m + + - name: Run chart-testing (install) + run: ct install --debug --config ct.yaml --helm-extra-set-args "--set v2.enabled=true --set provisionDataStore.cassandra=false --set storage.type=memory --set allInOne.enabled=true --set agent.enabled=false --set collector.enabled=false --set query.enabled=false" --helm-extra-args "--debug" diff --git a/charts/jaeger-operator/COMPATIBILITY.md b/charts/jaeger-operator/COMPATIBILITY.md index 84a7d434..0e9bcedd 100644 --- a/charts/jaeger-operator/COMPATIBILITY.md +++ b/charts/jaeger-operator/COMPATIBILITY.md @@ -2,6 +2,7 @@ The following table shows the compatibility of `Jaeger Operator helm chart` with | Chart version | Jaeger Operator | Kubernetes | Strimzi Operator | Cert-Manager | |---------------------------|-----------------|-----------------|--------------------|--------------| +| 2.57.0 | v1.61.x | v1.19 to v1.29 | v0.32 | v1.6.1+ | | 2.54.0 | v1.57.x | v1.19 to v1.29 | v0.32 | v1.6.1+ | | 2.50.0 | v1.52.x | v1.19 to v1.28 | v0.32 | v1.6.1+ | | 2.49.0 | v1.49.x | v1.19 to v1.28 | v0.32 | v1.6.1+ | diff --git a/charts/jaeger-operator/Chart.yaml b/charts/jaeger-operator/Chart.yaml index 07c6d549..215b889c 100644 --- a/charts/jaeger-operator/Chart.yaml +++ b/charts/jaeger-operator/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 description: jaeger-operator Helm chart for Kubernetes name: jaeger-operator -version: 2.56.0 -appVersion: 1.57.0 +version: 2.57.0 +appVersion: 1.61.0 home: https://www.jaegertracing.io/ icon: https://www.jaegertracing.io/img/jaeger-icon-reverse-color.svg sources: diff --git a/charts/jaeger-operator/README.md b/charts/jaeger-operator/README.md index ed3b98aa..b6883412 100644 --- a/charts/jaeger-operator/README.md +++ b/charts/jaeger-operator/README.md @@ -59,7 +59,7 @@ The following table lists the configurable parameters of the jaeger-operator cha | `serviceExtraLabels` | Additional labels to jaeger-operator service | `{}` | | `extraLabels` | Additional labels to jaeger-operator deployment | `{}` | | `image.repository` | Controller container image repository | `jaegertracing/jaeger-operator` | -| `image.tag` | Controller container image tag | `1.57.0` | +| `image.tag` | Controller container image tag | `1.61.0` | | `image.pullPolicy` | Controller container image pull policy | `IfNotPresent` | | `jaeger.create` | Jaeger instance will be created | `false` | | `jaeger.spec` | Jaeger instance specification | `{}` | diff --git a/charts/jaeger-operator/values.yaml b/charts/jaeger-operator/values.yaml index 587c6f97..ce72640a 100644 --- a/charts/jaeger-operator/values.yaml +++ b/charts/jaeger-operator/values.yaml @@ -4,7 +4,7 @@ image: repository: jaegertracing/jaeger-operator - tag: 1.57.0 + tag: 1.61.0 pullPolicy: IfNotPresent imagePullSecrets: [] diff --git a/charts/jaeger/Chart.yaml b/charts/jaeger/Chart.yaml index 33530522..be86e1c2 100644 --- a/charts/jaeger/Chart.yaml +++ b/charts/jaeger/Chart.yaml @@ -3,7 +3,7 @@ appVersion: 1.53.0 description: A Jaeger Helm chart for Kubernetes name: jaeger type: application -version: 3.3.0 +version: 3.3.2 # CronJobs require v1.21 kubeVersion: ">= 1.21-0" keywords: diff --git a/charts/jaeger/templates/_helpers.tpl b/charts/jaeger/templates/_helpers.tpl index 3bb14071..9f90423a 100644 --- a/charts/jaeger/templates/_helpers.tpl +++ b/charts/jaeger/templates/_helpers.tpl @@ -408,16 +408,6 @@ memory related environment variables {{- end }} {{- end -}} -{{/* -allInOne currently only supports memory/badger storage type. -*/}} -{{- define "allInOne.storage.type" -}} -{{ $type := .Values.storage.type }} -{{- if or (eq $type "memory") (eq $type "badger") -}} -{{ .Values.storage.type }} -{{- end -}} -{{- end -}} - {{/* Cassandra, Elasticsearch, or grpc-plugin, badger, memory related environment variables depending on which is used @@ -729,3 +719,95 @@ Create pull secrets for hotrod image {{- define "hotrod.imagePullSecrets" -}} {{- include "common.images.renderPullSecrets" (dict "images" (list .Values.hotrod.image) "context" $) -}} {{- end }} + + + +{{- 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 }} diff --git a/charts/jaeger/templates/allinone-configmap-v2.yaml b/charts/jaeger/templates/allinone-configmap-v2.yaml new file mode 100644 index 00000000..3f4324a4 --- /dev/null +++ b/charts/jaeger/templates/allinone-configmap-v2.yaml @@ -0,0 +1,27 @@ +{{- if .Values.v2.enabled -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: jaeger-v2-configmap + 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 }} +{{- end }} \ No newline at end of file diff --git a/charts/jaeger/templates/allinone-deploy.yaml b/charts/jaeger/templates/allinone-deploy.yaml index 91e27943..f60d078a 100644 --- a/charts/jaeger/templates/allinone-deploy.yaml +++ b/charts/jaeger/templates/allinone-deploy.yaml @@ -37,7 +37,7 @@ spec: {{- toYaml .Values.allInOne.extraEnv | nindent 12 }} {{- end }} - name: SPAN_STORAGE_TYPE - value: {{ include "allInOne.storage.type" . | required "Invalid storage type provided. Use either badger or memory for allInOne" }} + value: {{ .Values.storage.type }} {{- include "storage.env" . | nindent 12 }} - name: COLLECTOR_ZIPKIN_HOST_PORT value: :9411 @@ -54,13 +54,22 @@ spec: {{- end }} securityContext: {{- toYaml .Values.allInOne.securityContext | nindent 12 }} + {{- if .Values.v2.enabled }} + image: {{ .Values.v2.image }} + {{- else }} image: {{ include "allInOne.image" . }} + {{- end }} imagePullPolicy: {{ .Values.allInOne.image.pullPolicy }} name: jaeger args: + {{- if .Values.v2.enabled }} + - "--config" + - "/etc/jaeger/config.yaml" + {{- else }} {{- range $arg := .Values.allInOne.args }} - "{{ tpl $arg $ }}" {{- end }} + {{- end }} ports: - containerPort: 5775 protocol: UDP @@ -83,9 +92,14 @@ spec: livenessProbe: failureThreshold: 5 httpGet: + scheme: HTTP + {{- if .Values.v2.enabled }} + path: /status + port: 13133 + {{- else }} path: / port: 14269 - scheme: HTTP + {{- end }} initialDelaySeconds: 5 periodSeconds: 15 successThreshold: 1 @@ -93,9 +107,14 @@ spec: readinessProbe: failureThreshold: 3 httpGet: + scheme: HTTP + {{- if .Values.v2.enabled }} + path: /status + port: 13133 + {{- else }} path: / port: 14269 - scheme: HTTP + {{- end }} initialDelaySeconds: 1 periodSeconds: 10 successThreshold: 1 @@ -105,6 +124,10 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} volumeMounts: + {{- if .Values.v2.enabled }} + - name: jaeger-v2-config + mountPath: /etc/jaeger + {{- end }} {{- if not .Values.storage.badger.ephemeral }} - name: badger-data mountPath: {{ .Values.storage.badger.persistence.mountPath }} @@ -123,6 +146,11 @@ spec: {{- toYaml .Values.allInOne.podSecurityContext | nindent 8 }} serviceAccountName: {{ template "jaeger.fullname" . }} volumes: + {{- if .Values.v2.enabled }} + - name: jaeger-v2-config + configMap: + name: jaeger-v2-configmap + {{- end }} {{- if not .Values.storage.badger.ephemeral }} - name: badger-data persistentVolumeClaim: diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index e7715b21..1fd5d694 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -2,6 +2,62 @@ # This is a YAML-formatted file. # Jaeger values are grouped by component. Cassandra values override subchart values +v2: + enabled: false + image: jaegertracing/jaeger:2.0.0-rc2 +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 + + global: imageRegistry: diff --git a/ct-v2.yaml b/ct-v2.yaml new file mode 100644 index 00000000..3447e9a6 --- /dev/null +++ b/ct-v2.yaml @@ -0,0 +1,10 @@ +# See https://github.com/helm/chart-testing#configuration +remote: origin +chart-dirs: + - charts +chart-repos: + - incubator=https://charts.helm.sh/incubator + - elastic=https://helm.elastic.co + - bitnami=https://charts.bitnami.com/bitnami +helm-extra-args: --timeout=600s --debug +target-branch: main From 9e73b35d02c1ff633d7c8ac0b8ac9481a10ca00b Mon Sep 17 00:00:00 2001 From: mehul Date: Wed, 23 Oct 2024 01:57:18 +0530 Subject: [PATCH 02/28] minor changes Signed-off-by: mehul --- .github/workflows/lint-test.yaml | 11 ++++++++++- charts/jaeger/templates/allinone-deploy.yaml | 4 ++-- charts/jaeger/values.yaml | 4 +--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 5b00b5be..9ab4ec98 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -5,6 +5,10 @@ on: pull_request jobs: lint-test: runs-on: ubuntu-latest + strategy: + matrix: + version: [v1, v2] # Define the matrix with v1 and v2 versions + steps: - name: Checkout uses: actions/checkout@v2 @@ -69,4 +73,9 @@ jobs: cmctl check api --wait=5m - name: Run chart-testing (install) - run: ct install --config ct.yaml + run: | + if [ "${{ matrix.version }}" == "v1" ]; then + ct install --config ct.yaml + elif [ "${{ matrix.version }}" == "v2" ]; then + ct install --config ct.yaml --helm-extra-set-args "--set v2.enabled=true --set provisionDataStore.cassandra=false --set storage.type=memory --set allInOne.enabled=true --set agent.enabled=false --set collector.enabled=false --set query.enabled=false" + fi diff --git a/charts/jaeger/templates/allinone-deploy.yaml b/charts/jaeger/templates/allinone-deploy.yaml index f60d078a..a9df9ae3 100644 --- a/charts/jaeger/templates/allinone-deploy.yaml +++ b/charts/jaeger/templates/allinone-deploy.yaml @@ -146,11 +146,11 @@ spec: {{- toYaml .Values.allInOne.podSecurityContext | nindent 8 }} serviceAccountName: {{ template "jaeger.fullname" . }} volumes: - {{- if .Values.v2.enabled }} + {{- if .Values.v2.enabled }} - name: jaeger-v2-config configMap: name: jaeger-v2-configmap - {{- end }} + {{- end }} {{- if not .Values.storage.badger.ephemeral }} - name: badger-data persistentVolumeClaim: diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index 1fd5d694..88f7df2a 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -29,7 +29,6 @@ extensions: traces: primary_store traces_archive: archive_store - jaeger_storage: backends: primary_store: @@ -44,7 +43,6 @@ receivers: protocols: grpc: http: - jaeger: protocols: grpc: @@ -56,7 +54,7 @@ processors: exporters: jaeger_storage_exporter: trace_storage: primary_store - +# The following settings apply to Jaeger v1 and partially to Jaeger v2 global: imageRegistry: From f7db758fc144238b158b450b67dc2866f69fafc7 Mon Sep 17 00:00:00 2001 From: mehul Date: Wed, 23 Oct 2024 02:19:26 +0530 Subject: [PATCH 03/28] added image changes Signed-off-by: mehul --- .github/workflows/lint-test-v2.yaml | 72 -------------------- charts/jaeger/templates/_helpers.tpl | 14 ++++ charts/jaeger/templates/allinone-deploy.yaml | 2 +- charts/jaeger/values.yaml | 8 ++- 4 files changed, 22 insertions(+), 74 deletions(-) delete mode 100644 .github/workflows/lint-test-v2.yaml diff --git a/.github/workflows/lint-test-v2.yaml b/.github/workflows/lint-test-v2.yaml deleted file mode 100644 index e0692419..00000000 --- a/.github/workflows/lint-test-v2.yaml +++ /dev/null @@ -1,72 +0,0 @@ -name: Lint and Test Charts v2 - -on: pull_request - -jobs: - lint-test-v2: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set up Helm - uses: azure/setup-helm@v4 - with: - version: v3.14.4 - - # Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and - # yamllint (https://github.com/adrienverge/yamllint) which require Python - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.7 - - - name: Set up chart-testing - uses: helm/chart-testing-action@v2.6.1 - with: - version: v3.10.1 - - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --config ct.yaml) - if [[ -n "$changed" ]]; then - echo "::set-output name=changed::true" - fi - - - name: Run chart-testing (lint) - run: ct lint --config ct.yaml - - - name: Create kind cluster - uses: helm/kind-action@v1.9.0 - if: steps.list-changed.outputs.changed == 'true' - - - name: Install kubectl - uses: azure/setup-kubectl@v4.0.0 - with: - version: 'v1.28.8' - id: install - - - name: Set up cert-manager - run: | - kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml --namespace ingress-nginx - kubectl label node --all ingress-ready=true - kubectl describe pod --selector=app.kubernetes.io/component=controller -n ingress-nginx - kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=5m - kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.6.1/cert-manager.yaml - - - name: Set up cmctl - run: | - curl -sSL -o cmctl.tar.gz https://github.com/cert-manager/cert-manager/releases/download/v1.6.1/cmctl-linux-amd64.tar.gz - tar xzf cmctl.tar.gz - sudo mv cmctl /usr/local/bin - cmctl version - - - name: Check if cert-manager is up - run: | - cmctl check api --wait=5m - - - name: Run chart-testing (install) - run: ct install --debug --config ct.yaml --helm-extra-set-args "--set v2.enabled=true --set provisionDataStore.cassandra=false --set storage.type=memory --set allInOne.enabled=true --set agent.enabled=false --set collector.enabled=false --set query.enabled=false" --helm-extra-args "--debug" diff --git a/charts/jaeger/templates/_helpers.tpl b/charts/jaeger/templates/_helpers.tpl index 9f90423a..70210241 100644 --- a/charts/jaeger/templates/_helpers.tpl +++ b/charts/jaeger/templates/_helpers.tpl @@ -572,6 +572,20 @@ Create pull secrets for all in one image {{- include "common.images.renderPullSecrets" (dict "images" (list .Values.allInOne.image) "context" $) -}} {{- end }} +{{/* +Create image name for v2 image +*/}} +{{- define "v2.image" -}} +{{- include "renderImage" ( dict "imageRoot" .Values.v2.image "context" $ ) -}} +{{- end -}} + +{{/* +Create pull secrets for all in one image +*/}} +{{- define "v2.imagePullSecrets" -}} +{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.v2.image) "context" $) -}} +{{- end }} + {{/* Create image name for schema image */}} diff --git a/charts/jaeger/templates/allinone-deploy.yaml b/charts/jaeger/templates/allinone-deploy.yaml index a9df9ae3..4d3e8a58 100644 --- a/charts/jaeger/templates/allinone-deploy.yaml +++ b/charts/jaeger/templates/allinone-deploy.yaml @@ -55,7 +55,7 @@ spec: securityContext: {{- toYaml .Values.allInOne.securityContext | nindent 12 }} {{- if .Values.v2.enabled }} - image: {{ .Values.v2.image }} + image: {{ include "v2.image" . }} {{- else }} image: {{ include "allInOne.image" . }} {{- end }} diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index 88f7df2a..12ba7f4b 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -4,7 +4,13 @@ v2: enabled: false - image: jaegertracing/jaeger:2.0.0-rc2 + image: + registry: "" + repository: jaegertracing/jaeger + tag: "2.0.0-rc2" + digest: "" + pullPolicy: IfNotPresent + pullSecrets: [] service: extensions: [jaeger_storage, jaeger_query, healthcheckv2] pipelines: From b980560d9a4e6d979bdcf1b4d1b750db0244df7b Mon Sep 17 00:00:00 2001 From: mehul Date: Wed, 23 Oct 2024 02:21:56 +0530 Subject: [PATCH 04/28] fix lint Signed-off-by: mehul --- charts/jaeger/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index 12ba7f4b..cc304d7e 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -4,7 +4,7 @@ v2: enabled: false - image: + image: registry: "" repository: jaegertracing/jaeger tag: "2.0.0-rc2" From d9aa942668f463efb0e92902ae50d610232b12e4 Mon Sep 17 00:00:00 2001 From: mehul Date: Sat, 26 Oct 2024 23:46:15 +0530 Subject: [PATCH 05/28] removed v1 allInOne and added jaeger-v2 Signed-off-by: mehul --- .github/workflows/lint-test.yaml | 8 - charts/jaeger/Chart.yaml | 2 +- charts/jaeger/templates/_helpers.tpl | 26 +-- charts/jaeger/templates/allinone-sa.yaml | 14 -- ...llinone-deploy.yaml => jaeger-deploy.yaml} | 76 +++------ ...gent-svc.yaml => jaeger-v2-agent-svc.yaml} | 4 +- ...-svc.yaml => jaeger-v2-collector-svc.yaml} | 10 +- ...ap-v2.yaml => jaeger-v2-configmap-v2.yaml} | 2 +- ...onfigmap.yaml => jaeger-v2-configmap.yaml} | 6 +- .../{allinone-ing.yaml => jaeger-v2-ing.yaml} | 20 +-- ...uery-svc.yaml => jaeger-v2-query-svc.yaml} | 4 +- charts/jaeger/templates/jaeger-v2-sa.yaml | 14 ++ charts/jaeger/values.yaml | 150 +++++++++--------- 13 files changed, 142 insertions(+), 194 deletions(-) delete mode 100644 charts/jaeger/templates/allinone-sa.yaml rename charts/jaeger/templates/{allinone-deploy.yaml => jaeger-deploy.yaml} (66%) rename charts/jaeger/templates/{allinone-agent-svc.yaml => jaeger-v2-agent-svc.yaml} (87%) rename charts/jaeger/templates/{allinone-collector-svc.yaml => jaeger-v2-collector-svc.yaml} (79%) rename charts/jaeger/templates/{allinone-configmap-v2.yaml => jaeger-v2-configmap-v2.yaml} (95%) rename charts/jaeger/templates/{allinone-configmap.yaml => jaeger-v2-configmap.yaml} (58%) rename charts/jaeger/templates/{allinone-ing.yaml => jaeger-v2-ing.yaml} (53%) rename charts/jaeger/templates/{allinone-query-svc.yaml => jaeger-v2-query-svc.yaml} (82%) create mode 100644 charts/jaeger/templates/jaeger-v2-sa.yaml diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 9ab4ec98..df23ed2f 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -5,10 +5,6 @@ on: pull_request jobs: lint-test: runs-on: ubuntu-latest - strategy: - matrix: - version: [v1, v2] # Define the matrix with v1 and v2 versions - steps: - name: Checkout uses: actions/checkout@v2 @@ -74,8 +70,4 @@ jobs: - name: Run chart-testing (install) run: | - if [ "${{ matrix.version }}" == "v1" ]; then - ct install --config ct.yaml - elif [ "${{ matrix.version }}" == "v2" ]; then ct install --config ct.yaml --helm-extra-set-args "--set v2.enabled=true --set provisionDataStore.cassandra=false --set storage.type=memory --set allInOne.enabled=true --set agent.enabled=false --set collector.enabled=false --set query.enabled=false" - fi diff --git a/charts/jaeger/Chart.yaml b/charts/jaeger/Chart.yaml index be86e1c2..b124478b 100644 --- a/charts/jaeger/Chart.yaml +++ b/charts/jaeger/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 1.53.0 +appVersion: 2.0.0-rc2 description: A Jaeger Helm chart for Kubernetes name: jaeger type: application diff --git a/charts/jaeger/templates/_helpers.tpl b/charts/jaeger/templates/_helpers.tpl index 70210241..298a9f71 100644 --- a/charts/jaeger/templates/_helpers.tpl +++ b/charts/jaeger/templates/_helpers.tpl @@ -559,31 +559,17 @@ If not tag is provided, it defaults to .Chart.AppVersion. {{- end -}} {{/* -Create image name for all in one image +Create image name for jaeger-v2 image */}} -{{- define "allInOne.image" -}} -{{- include "renderImage" ( dict "imageRoot" .Values.allInOne.image "context" $ ) -}} +{{- define "jaeger.image" -}} +{{- include "renderImage" ( dict "imageRoot" .Values.jaeger.image "context" $ ) -}} {{- end -}} {{/* -Create pull secrets for all in one image +Create pull secrets for jaeger-v2 image */}} -{{- define "allInOne.imagePullSecrets" -}} -{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.allInOne.image) "context" $) -}} -{{- end }} - -{{/* -Create image name for v2 image -*/}} -{{- define "v2.image" -}} -{{- include "renderImage" ( dict "imageRoot" .Values.v2.image "context" $ ) -}} -{{- end -}} - -{{/* -Create pull secrets for all in one image -*/}} -{{- define "v2.imagePullSecrets" -}} -{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.v2.image) "context" $) -}} +{{- define "jaeger.imagePullSecrets" -}} +{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.jaeger.image) "context" $) -}} {{- end }} {{/* diff --git a/charts/jaeger/templates/allinone-sa.yaml b/charts/jaeger/templates/allinone-sa.yaml deleted file mode 100644 index a0fbb5a0..00000000 --- a/charts/jaeger/templates/allinone-sa.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if .Values.allInOne.enabled -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "jaeger.fullname" . }} - labels: - {{- include "jaeger.labels" . | nindent 4 }} - app.kubernetes.io/component: all-in-one - {{- with .Values.allInOne.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -automountServiceAccountToken: {{ .Values.allInOne.serviceAccount.automountServiceAccountToken }} -{{- end -}} diff --git a/charts/jaeger/templates/allinone-deploy.yaml b/charts/jaeger/templates/jaeger-deploy.yaml similarity index 66% rename from charts/jaeger/templates/allinone-deploy.yaml rename to charts/jaeger/templates/jaeger-deploy.yaml index 4d3e8a58..4f4f39c0 100644 --- a/charts/jaeger/templates/allinone-deploy.yaml +++ b/charts/jaeger/templates/jaeger-deploy.yaml @@ -1,40 +1,40 @@ -{{- if .Values.allInOne.enabled -}} +{{- if .Values.jaeger.storage.memory.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "jaeger.fullname" . }} labels: {{- include "jaeger.labels" . | nindent 4 }} - app.kubernetes.io/component: all-in-one + app.kubernetes.io/component: jaeger-v2 prometheus.io/port: "14269" prometheus.io/scrape: "true" spec: - {{- if hasKey .Values.allInOne "replicas" }} - replicas: {{ .Values.allInOne.replicas }} + {{- if hasKey .Values.jaeger "replicas" }} + replicas: {{ .Values.jaeger.replicas }} {{- end }} strategy: type: Recreate selector: matchLabels: {{- include "jaeger.selectorLabels" . | nindent 6 }} - app.kubernetes.io/component: all-in-one + app.kubernetes.io/component: jaeger-v2 template: metadata: labels: {{- include "jaeger.selectorLabels" . | nindent 8 }} - app.kubernetes.io/component: all-in-one -{{- if .Values.allInOne.podLabels }} - {{- toYaml .Values.allInOne.podLabels | nindent 8 }} + app.kubernetes.io/component: jaeger-v2 +{{- if .Values.jaeger.podLabels }} + {{- toYaml .Values.jaeger.podLabels | nindent 8 }} {{- end }} annotations: prometheus.io/port: "14269" prometheus.io/scrape: "true" spec: - {{- include "allInOne.imagePullSecrets" . | nindent 6 }} + {{- include "jaeger.imagePullSecrets" . | nindent 6 }} containers: - env: - {{- if .Values.allInOne.extraEnv }} - {{- toYaml .Values.allInOne.extraEnv | nindent 12 }} + {{- if .Values.jaeger.extraEnv }} + {{- toYaml .Values.jaeger.extraEnv | nindent 12 }} {{- end }} - name: SPAN_STORAGE_TYPE value: {{ .Values.storage.type }} @@ -45,31 +45,21 @@ spec: value: "false" - name: COLLECTOR_OTLP_ENABLED value: "true" - {{- if .Values.allInOne.samplingConfig }} + {{- if .Values.jaeger.samplingConfig }} - name: SAMPLING_STRATEGIES_FILE value: /etc/conf/strategies.json {{- end }} - {{- with .Values.allInOne.envFrom }} + {{- with .Values.jaeger.envFrom }} envFrom: {{- toYaml . | nindent 12 }} {{- end }} securityContext: - {{- toYaml .Values.allInOne.securityContext | nindent 12 }} - {{- if .Values.v2.enabled }} - image: {{ include "v2.image" . }} - {{- else }} - image: {{ include "allInOne.image" . }} - {{- end }} - imagePullPolicy: {{ .Values.allInOne.image.pullPolicy }} + {{- toYaml .Values.jaeger.securityContext | nindent 12 }} + image: {{ include "jaeger.image" . }} + imagePullPolicy: {{ .Values.jaeger.image.pullPolicy }} name: jaeger args: - {{- if .Values.v2.enabled }} - "--config" - "/etc/jaeger/config.yaml" - {{- else }} - {{- range $arg := .Values.allInOne.args }} - - "{{ tpl $arg $ }}" - {{- end }} - {{- end }} ports: - containerPort: 5775 protocol: UDP @@ -93,13 +83,8 @@ spec: failureThreshold: 5 httpGet: scheme: HTTP - {{- if .Values.v2.enabled }} path: /status port: 13133 - {{- else }} - path: / - port: 14269 - {{- end }} initialDelaySeconds: 5 periodSeconds: 15 successThreshold: 1 @@ -108,77 +93,68 @@ spec: failureThreshold: 3 httpGet: scheme: HTTP - {{- if .Values.v2.enabled }} path: /status port: 13133 - {{- else }} - path: / - port: 14269 - {{- end }} initialDelaySeconds: 1 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 1 - {{- with .Values.allInOne.resources }} + {{- with .Values.jaeger.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} volumeMounts: - {{- if .Values.v2.enabled }} - name: jaeger-v2-config mountPath: /etc/jaeger - {{- end }} {{- if not .Values.storage.badger.ephemeral }} - name: badger-data mountPath: {{ .Values.storage.badger.persistence.mountPath }} {{- end }} - {{- if .Values.allInOne.samplingConfig}} + {{- if .Values.jaeger.samplingConfig}} - name: strategies mountPath: /etc/conf/ {{- end }} - {{- range .Values.allInOne.extraSecretMounts }} + {{- range .Values.jaeger.extraSecretMounts }} - name: {{ .name }} mountPath: {{ .mountPath }} subPath: {{ .subPath }} readOnly: {{ .readOnly }} {{- end }} securityContext: - {{- toYaml .Values.allInOne.podSecurityContext | nindent 8 }} + {{- toYaml .Values.jaeger.podSecurityContext | nindent 8 }} serviceAccountName: {{ template "jaeger.fullname" . }} volumes: - {{- if .Values.v2.enabled }} - name: jaeger-v2-config configMap: name: jaeger-v2-configmap - {{- end }} {{- if not .Values.storage.badger.ephemeral }} - name: badger-data persistentVolumeClaim: claimName: {{ .Values.storage.badger.persistence.useExistingPvcName | required "Using badger persistence it is required to set an existing PVC" }} {{- end }} - {{- if .Values.allInOne.samplingConfig}} + {{- if .Values.jaeger.samplingConfig}} - name: strategies configMap: name: {{ include "jaeger.fullname" . }}-sampling-strategies {{- end }} - {{- range .Values.allInOne.extraSecretMounts }} + {{- range .Values.jaeger.extraSecretMounts }} - name: {{ .name }} secret: secretName: {{ .secretName }} {{- end }} - {{- with .Values.allInOne.affinity }} + {{- with .Values.jaeger.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.allInOne.topologySpreadConstraints }} + {{- with .Values.jaeger.topologySpreadConstraints }} topologySpreadConstraints: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.allInOne.nodeSelector }} + {{- with .Values.jaeger.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.allInOne.tolerations }} + {{- with .Values.jaeger.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/jaeger/templates/allinone-agent-svc.yaml b/charts/jaeger/templates/jaeger-v2-agent-svc.yaml similarity index 87% rename from charts/jaeger/templates/allinone-agent-svc.yaml rename to charts/jaeger/templates/jaeger-v2-agent-svc.yaml index bc3c8b6c..e7d7d148 100644 --- a/charts/jaeger/templates/allinone-agent-svc.yaml +++ b/charts/jaeger/templates/jaeger-v2-agent-svc.yaml @@ -1,4 +1,4 @@ -{{- if .Values.allInOne.enabled -}} +{{- if .Values.jaeger.storage.memory.enabled -}} apiVersion: v1 kind: Service metadata: @@ -26,5 +26,5 @@ spec: targetPort: 0 selector: {{- include "jaeger.selectorLabels" . | nindent 4 }} - app.kubernetes.io/component: all-in-one + app.kubernetes.io/component: jaeger-v2 {{- end -}} diff --git a/charts/jaeger/templates/allinone-collector-svc.yaml b/charts/jaeger/templates/jaeger-v2-collector-svc.yaml similarity index 79% rename from charts/jaeger/templates/allinone-collector-svc.yaml rename to charts/jaeger/templates/jaeger-v2-collector-svc.yaml index 7f319cac..f2a5f0d4 100644 --- a/charts/jaeger/templates/allinone-collector-svc.yaml +++ b/charts/jaeger/templates/jaeger-v2-collector-svc.yaml @@ -1,4 +1,4 @@ -{{- if .Values.allInOne.enabled -}} +{{- if .Values.jaeger.storage.memory.enabled -}} apiVersion: v1 kind: Service metadata: @@ -7,7 +7,7 @@ metadata: {{- include "jaeger.labels" . | nindent 4 }} app.kubernetes.io/component: service-collector spec: - clusterIP: {{ .Values.allInOne.service.headless | ternary "None" "null" }} + clusterIP: {{ .Values.jaeger.service.headless | ternary "None" "null" }} ports: - name: http-zipkin port: 9411 @@ -30,13 +30,13 @@ spec: {{- if semverCompare ">=1.20" .Capabilities.KubeVersion.Version }} appProtocol: http {{- end }} - - name: {{ .Values.allInOne.service.collector.otlp.grpc.name }} + - name: {{ .Values.jaeger.service.collector.otlp.grpc.name }} port: 4317 targetPort: 0 {{- if semverCompare ">=1.20" .Capabilities.KubeVersion.Version }} appProtocol: grpc {{- end }} - - name: {{ .Values.allInOne.service.collector.otlp.http.name }} + - name: {{ .Values.jaeger.service.collector.otlp.http.name }} port: 4318 targetPort: 0 {{- if semverCompare ">=1.20" .Capabilities.KubeVersion.Version }} @@ -44,5 +44,5 @@ spec: {{- end }} selector: {{- include "jaeger.selectorLabels" . | nindent 4 }} - app.kubernetes.io/component: all-in-one + app.kubernetes.io/component: jaeger-v2 {{- end -}} diff --git a/charts/jaeger/templates/allinone-configmap-v2.yaml b/charts/jaeger/templates/jaeger-v2-configmap-v2.yaml similarity index 95% rename from charts/jaeger/templates/allinone-configmap-v2.yaml rename to charts/jaeger/templates/jaeger-v2-configmap-v2.yaml index 3f4324a4..466b8a4c 100644 --- a/charts/jaeger/templates/allinone-configmap-v2.yaml +++ b/charts/jaeger/templates/jaeger-v2-configmap-v2.yaml @@ -1,4 +1,4 @@ -{{- if .Values.v2.enabled -}} +{{- if .Values.jaeger.storage.memory.enabled -}} apiVersion: v1 kind: ConfigMap metadata: diff --git a/charts/jaeger/templates/allinone-configmap.yaml b/charts/jaeger/templates/jaeger-v2-configmap.yaml similarity index 58% rename from charts/jaeger/templates/allinone-configmap.yaml rename to charts/jaeger/templates/jaeger-v2-configmap.yaml index 99f93b61..31119d30 100644 --- a/charts/jaeger/templates/allinone-configmap.yaml +++ b/charts/jaeger/templates/jaeger-v2-configmap.yaml @@ -1,12 +1,12 @@ -{{- if .Values.allInOne.samplingConfig }} +{{- if .Values.jaeger.samplingConfig }} apiVersion: v1 kind: ConfigMap metadata: name: {{ include "jaeger.fullname" . }}-sampling-strategies labels: {{- include "jaeger.labels" . | nindent 4 }} - app.kubernetes.io/component: all-in-one + app.kubernetes.io/component: jeager-v2 data: strategies.json: |- -{{ tpl .Values.allInOne.samplingConfig . | indent 4 }} +{{ tpl .Values.jaeger.samplingConfig . | indent 4 }} {{- end }} diff --git a/charts/jaeger/templates/allinone-ing.yaml b/charts/jaeger/templates/jaeger-v2-ing.yaml similarity index 53% rename from charts/jaeger/templates/allinone-ing.yaml rename to charts/jaeger/templates/jaeger-v2-ing.yaml index 803748b1..ee5a4cdc 100644 --- a/charts/jaeger/templates/allinone-ing.yaml +++ b/charts/jaeger/templates/jaeger-v2-ing.yaml @@ -1,4 +1,4 @@ -{{- if and (.Values.allInOne.enabled) (.Values.allInOne.ingress.enabled) -}} +{{- if and (.Values.jaeger.storage.memory.enabled) (.Values.jaeger.ingress.enabled) -}} {{- $ingressSupportsIngressClassName := eq (include "common.ingress.supportsIngressClassname" .) "true" }} apiVersion: networking.k8s.io/v1 kind: Ingress @@ -6,26 +6,26 @@ metadata: name: {{ template "jaeger.query.name" . }} labels: {{- include "jaeger.labels" . | nindent 4 }} - app.kubernetes.io/component: all-in-one - {{- if .Values.allInOne.ingress.annotations }} + app.kubernetes.io/component: jaeger-v2 + {{- if .Values.jaeger.ingress.annotations }} annotations: - {{- toYaml .Values.allInOne.ingress.annotations | nindent 4 }} + {{- toYaml .Values.jaeger.ingress.annotations | nindent 4 }} {{- end }} spec: - {{- if and $ingressSupportsIngressClassName .Values.allInOne.ingress.ingressClassName }} - ingressClassName: {{ .Values.allInOne.ingress.ingressClassName }} + {{- if and $ingressSupportsIngressClassName .Values.jaeger.ingress.ingressClassName }} + ingressClassName: {{ .Values.jaeger.ingress.ingressClassName }} {{- end }} rules: - {{- range $host := .Values.allInOne.ingress.hosts }} + {{- range $host := .Values.jaeger.ingress.hosts }} - host: {{ $host }} http: paths: - path: / - pathType: {{ default "ImplementationSpecific" $.Values.allInOne.ingress.pathType }} + pathType: {{ default "ImplementationSpecific" $.Values.jaeger.ingress.pathType }} backend: {{- include "common.ingress.backend" (dict "serviceName" (include "jaeger.query.name" $) "servicePort" 16686 "context" $) | nindent 14 }} {{- end -}} - {{- if .Values.allInOne.ingress.tls }} + {{- if .Values.jaeger.ingress.tls }} tls: - {{- toYaml .Values.allInOne.ingress.tls | nindent 4 }} + {{- toYaml .Values.jeager.ingress.tls | nindent 4 }} {{- end -}} {{- end -}} diff --git a/charts/jaeger/templates/allinone-query-svc.yaml b/charts/jaeger/templates/jaeger-v2-query-svc.yaml similarity index 82% rename from charts/jaeger/templates/allinone-query-svc.yaml rename to charts/jaeger/templates/jaeger-v2-query-svc.yaml index 5f0c2f50..8467e59d 100644 --- a/charts/jaeger/templates/allinone-query-svc.yaml +++ b/charts/jaeger/templates/jaeger-v2-query-svc.yaml @@ -1,4 +1,4 @@ -{{- if .Values.allInOne.enabled -}} +{{- if .Values.jaeger.storage.memory.enabled -}} apiVersion: v1 kind: Service metadata: @@ -17,5 +17,5 @@ spec: targetPort: 16685 selector: {{- include "jaeger.selectorLabels" . | nindent 4 }} - app.kubernetes.io/component: all-in-one + app.kubernetes.io/component: jaeger-v2 {{- end -}} diff --git a/charts/jaeger/templates/jaeger-v2-sa.yaml b/charts/jaeger/templates/jaeger-v2-sa.yaml new file mode 100644 index 00000000..016e73d1 --- /dev/null +++ b/charts/jaeger/templates/jaeger-v2-sa.yaml @@ -0,0 +1,14 @@ +{{- if .Values.jaeger.storage.memory.enabled -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "jaeger.fullname" . }} + labels: + {{- include "jaeger.labels" . | nindent 4 }} + app.kubernetes.io/component: jaeger-v2 + {{- with .Values.jaeger.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.jaeger.serviceAccount.automountServiceAccountToken }} +{{- end -}} diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index cc304d7e..e4ff3453 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -2,8 +2,11 @@ # This is a YAML-formatted file. # Jaeger values are grouped by component. Cassandra values override subchart values -v2: - enabled: false +jaeger: + storage: + memory: + enabled: true + replicas: 1 image: registry: "" repository: jaegertracing/jaeger @@ -11,6 +14,73 @@ v2: digest: "" pullPolicy: IfNotPresent pullSecrets: [] + extraEnv: [] + extraSecretMounts: + [] + # - name: jaeger-tls + # mountPath: /tls + # subPath: "" + # secretName: jaeger-tls + # readOnly: true + # command line arguments / CLI flags + # See https://www.jaegertracing.io/docs/cli/ + args: [] + # samplingConfig: |- + # { + # "default_strategy": { + # "type": "probabilistic", + # "param": 1 + # } + # } + serviceAccount: + annotations: {} + automountServiceAccountToken: true + service: + headless: true + collector: + otlp: + grpc: + name: otlp-grpc + http: + name: otlp-http + ingress: + enabled: false + # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName + # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress + # ingressClassName: nginx + annotations: {} + labels: {} + # Used to create an Ingress record. + # hosts: + # - chart-example.local + # annotations: + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + # labels: + # app: jaeger + # tls: + # # Secrets must be manually created in the namespace. + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + pathType: + # resources: + # limits: + # cpu: 500m + # memory: 512Mi + # requests: + # cpu: 256m + # memory: 128Mi + nodeSelector: {} + tolerations: [] + affinity: {} + topologySpreadContraints: [] + podSecurityContext: + runAsUser: 10001 + runAsGroup: 10001 + fsGroup: 10001 + securityContext: {} + service: extensions: [jaeger_storage, jaeger_query, healthcheckv2] pipelines: @@ -79,82 +149,6 @@ tag: "" nameOverride: "" fullnameOverride: "" -allInOne: - enabled: false - replicas: 1 - image: - registry: "" - repository: jaegertracing/all-in-one - tag: "" - digest: "" - pullPolicy: IfNotPresent - pullSecrets: [] - extraEnv: [] - extraSecretMounts: - [] - # - name: jaeger-tls - # mountPath: /tls - # subPath: "" - # secretName: jaeger-tls - # readOnly: true - # command line arguments / CLI flags - # See https://www.jaegertracing.io/docs/cli/ - args: [] - # samplingConfig: |- - # { - # "default_strategy": { - # "type": "probabilistic", - # "param": 1 - # } - # } - serviceAccount: - annotations: {} - automountServiceAccountToken: true - service: - headless: true - collector: - otlp: - grpc: - name: otlp-grpc - http: - name: otlp-http - ingress: - enabled: false - # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName - # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress - # ingressClassName: nginx - annotations: {} - labels: {} - # Used to create an Ingress record. - # hosts: - # - chart-example.local - # annotations: - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - # labels: - # app: jaeger - # tls: - # # Secrets must be manually created in the namespace. - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - pathType: - # resources: - # limits: - # cpu: 500m - # memory: 512Mi - # requests: - # cpu: 256m - # memory: 128Mi - nodeSelector: {} - tolerations: [] - affinity: {} - topologySpreadContraints: [] - podSecurityContext: - runAsUser: 10001 - runAsGroup: 10001 - fsGroup: 10001 - securityContext: {} storage: # allowed values (cassandra, elasticsearch, grpc-plugin, badger, memory) From 01d341b432268989e8182aebc5137dc29c1f2ce4 Mon Sep 17 00:00:00 2001 From: mehul Date: Mon, 28 Oct 2024 21:39:32 +0530 Subject: [PATCH 06/28] removed v2 references Signed-off-by: mehul --- .github/workflows/lint-test.yaml | 2 +- charts/jaeger/templates/_helpers.tpl | 85 ++---------------- charts/jaeger/templates/jaeger-deploy.yaml | 12 +-- .../{jaeger-v2-ing.yaml => jaeger-ing.yaml} | 2 +- ....yaml => jaeger-memory-collector-svc.yaml} | 2 +- .../templates/jaeger-memory-config.yaml | 27 ++++++ ...gmap.yaml => jaeger-memory-configmap.yaml} | 2 +- ...-svc.yaml => jaeger-memory-query-svc.yaml} | 2 +- ...aeger-v2-sa.yaml => jaeger-memory-sa.yaml} | 2 +- .../templates/jaeger-v2-configmap-v2.yaml | 27 ------ ...-svc.yaml => jaeger_memory-agent-svc.yaml} | 2 +- charts/jaeger/values.yaml | 86 +++++++++---------- 12 files changed, 92 insertions(+), 159 deletions(-) rename charts/jaeger/templates/{jaeger-v2-ing.yaml => jaeger-ing.yaml} (96%) rename charts/jaeger/templates/{jaeger-v2-collector-svc.yaml => jaeger-memory-collector-svc.yaml} (97%) create mode 100644 charts/jaeger/templates/jaeger-memory-config.yaml rename charts/jaeger/templates/{jaeger-v2-configmap.yaml => jaeger-memory-configmap.yaml} (87%) rename charts/jaeger/templates/{jaeger-v2-query-svc.yaml => jaeger-memory-query-svc.yaml} (91%) rename charts/jaeger/templates/{jaeger-v2-sa.yaml => jaeger-memory-sa.yaml} (90%) delete mode 100644 charts/jaeger/templates/jaeger-v2-configmap-v2.yaml rename charts/jaeger/templates/{jaeger-v2-agent-svc.yaml => jaeger_memory-agent-svc.yaml} (93%) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index df23ed2f..f15fadd1 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -70,4 +70,4 @@ jobs: - name: Run chart-testing (install) run: | - ct install --config ct.yaml --helm-extra-set-args "--set v2.enabled=true --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 --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" diff --git a/charts/jaeger/templates/_helpers.tpl b/charts/jaeger/templates/_helpers.tpl index 298a9f71..5896b372 100644 --- a/charts/jaeger/templates/_helpers.tpl +++ b/charts/jaeger/templates/_helpers.tpl @@ -721,93 +721,26 @@ Create pull secrets for hotrod image {{- end }} - -{{- define "jaeger-v2.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- define "jaeger.extensionsConfig" -}} +{{ toYaml .Values.config.extensions | nindent 6 }} {{- 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 }} +{{- define "jaeger.receiversConfig" -}} +{{ toYaml .Values.config.receivers | nindent 6 }} {{- 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 "-" }} +{{- define "jaeger.processorsConfig" -}} +{{ toYaml .Values.config.processors | nindent 6 }} {{- 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 }} +{{- define "jaeger.exportersConfig" -}} +{{ toYaml .Values.config.exporters | nindent 6 }} {{- 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" -}} +{{- define "jaeger.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 }} diff --git a/charts/jaeger/templates/jaeger-deploy.yaml b/charts/jaeger/templates/jaeger-deploy.yaml index 4f4f39c0..fa3025da 100644 --- a/charts/jaeger/templates/jaeger-deploy.yaml +++ b/charts/jaeger/templates/jaeger-deploy.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "jaeger.fullname" . }} labels: {{- include "jaeger.labels" . | nindent 4 }} - app.kubernetes.io/component: jaeger-v2 + app.kubernetes.io/component: jaeger prometheus.io/port: "14269" prometheus.io/scrape: "true" spec: @@ -17,12 +17,12 @@ spec: selector: matchLabels: {{- include "jaeger.selectorLabels" . | nindent 6 }} - app.kubernetes.io/component: jaeger-v2 + app.kubernetes.io/component: jaeger template: metadata: labels: {{- include "jaeger.selectorLabels" . | nindent 8 }} - app.kubernetes.io/component: jaeger-v2 + app.kubernetes.io/component: jaeger {{- if .Values.jaeger.podLabels }} {{- toYaml .Values.jaeger.podLabels | nindent 8 }} {{- end }} @@ -104,7 +104,7 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} volumeMounts: - - name: jaeger-v2-config + - name: jaeger-config mountPath: /etc/jaeger {{- if not .Values.storage.badger.ephemeral }} - name: badger-data @@ -124,9 +124,9 @@ spec: {{- toYaml .Values.jaeger.podSecurityContext | nindent 8 }} serviceAccountName: {{ template "jaeger.fullname" . }} volumes: - - name: jaeger-v2-config + - name: jaeger-config configMap: - name: jaeger-v2-configmap + name: jaeger-configmap {{- if not .Values.storage.badger.ephemeral }} - name: badger-data persistentVolumeClaim: diff --git a/charts/jaeger/templates/jaeger-v2-ing.yaml b/charts/jaeger/templates/jaeger-ing.yaml similarity index 96% rename from charts/jaeger/templates/jaeger-v2-ing.yaml rename to charts/jaeger/templates/jaeger-ing.yaml index ee5a4cdc..2363b86d 100644 --- a/charts/jaeger/templates/jaeger-v2-ing.yaml +++ b/charts/jaeger/templates/jaeger-ing.yaml @@ -6,7 +6,7 @@ metadata: name: {{ template "jaeger.query.name" . }} labels: {{- include "jaeger.labels" . | nindent 4 }} - app.kubernetes.io/component: jaeger-v2 + app.kubernetes.io/component: jaeger {{- if .Values.jaeger.ingress.annotations }} annotations: {{- toYaml .Values.jaeger.ingress.annotations | nindent 4 }} diff --git a/charts/jaeger/templates/jaeger-v2-collector-svc.yaml b/charts/jaeger/templates/jaeger-memory-collector-svc.yaml similarity index 97% rename from charts/jaeger/templates/jaeger-v2-collector-svc.yaml rename to charts/jaeger/templates/jaeger-memory-collector-svc.yaml index f2a5f0d4..4eb47948 100644 --- a/charts/jaeger/templates/jaeger-v2-collector-svc.yaml +++ b/charts/jaeger/templates/jaeger-memory-collector-svc.yaml @@ -44,5 +44,5 @@ spec: {{- end }} selector: {{- include "jaeger.selectorLabels" . | nindent 4 }} - app.kubernetes.io/component: jaeger-v2 + app.kubernetes.io/component: jaeger {{- end -}} diff --git a/charts/jaeger/templates/jaeger-memory-config.yaml b/charts/jaeger/templates/jaeger-memory-config.yaml new file mode 100644 index 00000000..a0b17f28 --- /dev/null +++ b/charts/jaeger/templates/jaeger-memory-config.yaml @@ -0,0 +1,27 @@ +{{- if .Values.jaeger.storage.memory.enabled -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: jaeger-configmap + namespace: {{ include "jaeger.namespace" . }} + labels: + {{- include "jaeger.labels" . | nindent 4 }} +data: + config.yaml: | + service: + extensions: [{{ join ", " .Values.config.service.extensions }}] + pipelines: + traces: + receivers: [{{ join ", " .Values.config.service.pipelines.traces.receivers }}] + processors: [{{ join ", " .Values.config.service.pipelines.traces.processors }}] + exporters: [{{ join ", " .Values.config.service.pipelines.traces.exporters }}] + + extensions: + {{- include "jaeger.extensionsConfig" . | nindent 6 }} + receivers: + {{- include "jaeger.receiversConfig" . | nindent 6 }} + processors: + {{- include "jaeger.processorsConfig" . | nindent 6 }} + exporters: + {{- include "jaeger.exportersConfig" . | nindent 6 }} +{{- end }} \ No newline at end of file diff --git a/charts/jaeger/templates/jaeger-v2-configmap.yaml b/charts/jaeger/templates/jaeger-memory-configmap.yaml similarity index 87% rename from charts/jaeger/templates/jaeger-v2-configmap.yaml rename to charts/jaeger/templates/jaeger-memory-configmap.yaml index 31119d30..cd7d3406 100644 --- a/charts/jaeger/templates/jaeger-v2-configmap.yaml +++ b/charts/jaeger/templates/jaeger-memory-configmap.yaml @@ -5,7 +5,7 @@ metadata: name: {{ include "jaeger.fullname" . }}-sampling-strategies labels: {{- include "jaeger.labels" . | nindent 4 }} - app.kubernetes.io/component: jeager-v2 + app.kubernetes.io/component: jeager data: strategies.json: |- {{ tpl .Values.jaeger.samplingConfig . | indent 4 }} diff --git a/charts/jaeger/templates/jaeger-v2-query-svc.yaml b/charts/jaeger/templates/jaeger-memory-query-svc.yaml similarity index 91% rename from charts/jaeger/templates/jaeger-v2-query-svc.yaml rename to charts/jaeger/templates/jaeger-memory-query-svc.yaml index 8467e59d..63eb2563 100644 --- a/charts/jaeger/templates/jaeger-v2-query-svc.yaml +++ b/charts/jaeger/templates/jaeger-memory-query-svc.yaml @@ -17,5 +17,5 @@ spec: targetPort: 16685 selector: {{- include "jaeger.selectorLabels" . | nindent 4 }} - app.kubernetes.io/component: jaeger-v2 + app.kubernetes.io/component: jaeger {{- end -}} diff --git a/charts/jaeger/templates/jaeger-v2-sa.yaml b/charts/jaeger/templates/jaeger-memory-sa.yaml similarity index 90% rename from charts/jaeger/templates/jaeger-v2-sa.yaml rename to charts/jaeger/templates/jaeger-memory-sa.yaml index 016e73d1..e8979fea 100644 --- a/charts/jaeger/templates/jaeger-v2-sa.yaml +++ b/charts/jaeger/templates/jaeger-memory-sa.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "jaeger.fullname" . }} labels: {{- include "jaeger.labels" . | nindent 4 }} - app.kubernetes.io/component: jaeger-v2 + app.kubernetes.io/component: jaeger {{- with .Values.jaeger.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/charts/jaeger/templates/jaeger-v2-configmap-v2.yaml b/charts/jaeger/templates/jaeger-v2-configmap-v2.yaml deleted file mode 100644 index 466b8a4c..00000000 --- a/charts/jaeger/templates/jaeger-v2-configmap-v2.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.jaeger.storage.memory.enabled -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: jaeger-v2-configmap - 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 }} -{{- end }} \ No newline at end of file diff --git a/charts/jaeger/templates/jaeger-v2-agent-svc.yaml b/charts/jaeger/templates/jaeger_memory-agent-svc.yaml similarity index 93% rename from charts/jaeger/templates/jaeger-v2-agent-svc.yaml rename to charts/jaeger/templates/jaeger_memory-agent-svc.yaml index e7d7d148..025072d9 100644 --- a/charts/jaeger/templates/jaeger-v2-agent-svc.yaml +++ b/charts/jaeger/templates/jaeger_memory-agent-svc.yaml @@ -26,5 +26,5 @@ spec: targetPort: 0 selector: {{- include "jaeger.selectorLabels" . | nindent 4 }} - app.kubernetes.io/component: jaeger-v2 + app.kubernetes.io/component: jaeger {{- end -}} diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index e4ff3453..49409ffe 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -80,56 +80,56 @@ jaeger: runAsGroup: 10001 fsGroup: 10001 securityContext: {} +config: + service: + extensions: [jaeger_storage, jaeger_query, healthcheckv2] + pipelines: + traces: + receivers: [otlp, jaeger, zipkin] + processors: [batch] + exporters: [jaeger_storage_exporter] -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 + 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 + # 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_query: + storage: + traces: primary_store + traces_archive: archive_store - jaeger_storage: - backends: - primary_store: - memory: - max_traces: 100000 - archive_store: - memory: - max_traces: 100000 + jaeger_storage: + backends: + primary_store: + memory: + max_traces: 100000 + archive_store: + memory: + max_traces: 100000 -receivers: - otlp: - protocols: - grpc: - http: - jaeger: - protocols: - grpc: - zipkin: + receivers: + otlp: + protocols: + grpc: + http: + jaeger: + protocols: + grpc: + zipkin: -processors: - batch: + processors: + batch: -exporters: - jaeger_storage_exporter: - trace_storage: primary_store + exporters: + jaeger_storage_exporter: + trace_storage: primary_store # The following settings apply to Jaeger v1 and partially to Jaeger v2 global: From ee12ee4470c3b1736cc9704b23e8f92f904a854e Mon Sep 17 00:00:00 2001 From: mehul Date: Tue, 29 Oct 2024 22:51:18 +0530 Subject: [PATCH 07/28] added allInOne again Signed-off-by: mehul --- charts/jaeger/templates/_helpers.tpl | 12 +-- ...emory-config.yaml => allInOne-config.yaml} | 0 ...agent-svc.yaml => allinone-agent-svc.yaml} | 4 +- ...r-svc.yaml => allinone-collector-svc.yaml} | 10 +-- ...configmap.yaml => allinone-configmap.yaml} | 6 +- ...aeger-deploy.yaml => allinone-deploy.yaml} | 69 +++++++++-------- .../{jaeger-ing.yaml => allinone-ing.yaml} | 20 ++--- ...query-svc.yaml => allinone-query-svc.yaml} | 4 +- charts/jaeger/templates/allinone-sa.yaml | 14 ++++ charts/jaeger/templates/jaeger-memory-sa.yaml | 14 ---- charts/jaeger/values.yaml | 76 +++++++++++++++++++ ct-v2.yaml | 10 --- 12 files changed, 155 insertions(+), 84 deletions(-) rename charts/jaeger/templates/{jaeger-memory-config.yaml => allInOne-config.yaml} (100%) rename charts/jaeger/templates/{jaeger_memory-agent-svc.yaml => allinone-agent-svc.yaml} (87%) rename charts/jaeger/templates/{jaeger-memory-collector-svc.yaml => allinone-collector-svc.yaml} (80%) rename charts/jaeger/templates/{jaeger-memory-configmap.yaml => allinone-configmap.yaml} (58%) rename charts/jaeger/templates/{jaeger-deploy.yaml => allinone-deploy.yaml} (70%) rename charts/jaeger/templates/{jaeger-ing.yaml => allinone-ing.yaml} (53%) rename charts/jaeger/templates/{jaeger-memory-query-svc.yaml => allinone-query-svc.yaml} (82%) create mode 100644 charts/jaeger/templates/allinone-sa.yaml delete mode 100644 charts/jaeger/templates/jaeger-memory-sa.yaml delete mode 100644 ct-v2.yaml diff --git a/charts/jaeger/templates/_helpers.tpl b/charts/jaeger/templates/_helpers.tpl index 5896b372..3556e9d6 100644 --- a/charts/jaeger/templates/_helpers.tpl +++ b/charts/jaeger/templates/_helpers.tpl @@ -559,17 +559,17 @@ If not tag is provided, it defaults to .Chart.AppVersion. {{- end -}} {{/* -Create image name for jaeger-v2 image +Create image name for all-in-one image */}} -{{- define "jaeger.image" -}} -{{- include "renderImage" ( dict "imageRoot" .Values.jaeger.image "context" $ ) -}} +{{- define "allInOne.image" -}} +{{- include "renderImage" ( dict "imageRoot" .Values.allInOne.image "context" $ ) -}} {{- end -}} {{/* -Create pull secrets for jaeger-v2 image +Create pull secrets for all-in-one image */}} -{{- define "jaeger.imagePullSecrets" -}} -{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.jaeger.image) "context" $) -}} +{{- define "allInOne.imagePullSecrets" -}} +{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.allInOne.image) "context" $) -}} {{- end }} {{/* diff --git a/charts/jaeger/templates/jaeger-memory-config.yaml b/charts/jaeger/templates/allInOne-config.yaml similarity index 100% rename from charts/jaeger/templates/jaeger-memory-config.yaml rename to charts/jaeger/templates/allInOne-config.yaml diff --git a/charts/jaeger/templates/jaeger_memory-agent-svc.yaml b/charts/jaeger/templates/allinone-agent-svc.yaml similarity index 87% rename from charts/jaeger/templates/jaeger_memory-agent-svc.yaml rename to charts/jaeger/templates/allinone-agent-svc.yaml index 025072d9..bc3c8b6c 100644 --- a/charts/jaeger/templates/jaeger_memory-agent-svc.yaml +++ b/charts/jaeger/templates/allinone-agent-svc.yaml @@ -1,4 +1,4 @@ -{{- if .Values.jaeger.storage.memory.enabled -}} +{{- if .Values.allInOne.enabled -}} apiVersion: v1 kind: Service metadata: @@ -26,5 +26,5 @@ spec: targetPort: 0 selector: {{- include "jaeger.selectorLabels" . | nindent 4 }} - app.kubernetes.io/component: jaeger + app.kubernetes.io/component: all-in-one {{- end -}} diff --git a/charts/jaeger/templates/jaeger-memory-collector-svc.yaml b/charts/jaeger/templates/allinone-collector-svc.yaml similarity index 80% rename from charts/jaeger/templates/jaeger-memory-collector-svc.yaml rename to charts/jaeger/templates/allinone-collector-svc.yaml index 4eb47948..7f319cac 100644 --- a/charts/jaeger/templates/jaeger-memory-collector-svc.yaml +++ b/charts/jaeger/templates/allinone-collector-svc.yaml @@ -1,4 +1,4 @@ -{{- if .Values.jaeger.storage.memory.enabled -}} +{{- if .Values.allInOne.enabled -}} apiVersion: v1 kind: Service metadata: @@ -7,7 +7,7 @@ metadata: {{- include "jaeger.labels" . | nindent 4 }} app.kubernetes.io/component: service-collector spec: - clusterIP: {{ .Values.jaeger.service.headless | ternary "None" "null" }} + clusterIP: {{ .Values.allInOne.service.headless | ternary "None" "null" }} ports: - name: http-zipkin port: 9411 @@ -30,13 +30,13 @@ spec: {{- if semverCompare ">=1.20" .Capabilities.KubeVersion.Version }} appProtocol: http {{- end }} - - name: {{ .Values.jaeger.service.collector.otlp.grpc.name }} + - name: {{ .Values.allInOne.service.collector.otlp.grpc.name }} port: 4317 targetPort: 0 {{- if semverCompare ">=1.20" .Capabilities.KubeVersion.Version }} appProtocol: grpc {{- end }} - - name: {{ .Values.jaeger.service.collector.otlp.http.name }} + - name: {{ .Values.allInOne.service.collector.otlp.http.name }} port: 4318 targetPort: 0 {{- if semverCompare ">=1.20" .Capabilities.KubeVersion.Version }} @@ -44,5 +44,5 @@ spec: {{- end }} selector: {{- include "jaeger.selectorLabels" . | nindent 4 }} - app.kubernetes.io/component: jaeger + app.kubernetes.io/component: all-in-one {{- end -}} diff --git a/charts/jaeger/templates/jaeger-memory-configmap.yaml b/charts/jaeger/templates/allinone-configmap.yaml similarity index 58% rename from charts/jaeger/templates/jaeger-memory-configmap.yaml rename to charts/jaeger/templates/allinone-configmap.yaml index cd7d3406..99f93b61 100644 --- a/charts/jaeger/templates/jaeger-memory-configmap.yaml +++ b/charts/jaeger/templates/allinone-configmap.yaml @@ -1,12 +1,12 @@ -{{- if .Values.jaeger.samplingConfig }} +{{- if .Values.allInOne.samplingConfig }} apiVersion: v1 kind: ConfigMap metadata: name: {{ include "jaeger.fullname" . }}-sampling-strategies labels: {{- include "jaeger.labels" . | nindent 4 }} - app.kubernetes.io/component: jeager + app.kubernetes.io/component: all-in-one data: strategies.json: |- -{{ tpl .Values.jaeger.samplingConfig . | indent 4 }} +{{ tpl .Values.allInOne.samplingConfig . | indent 4 }} {{- end }} diff --git a/charts/jaeger/templates/jaeger-deploy.yaml b/charts/jaeger/templates/allinone-deploy.yaml similarity index 70% rename from charts/jaeger/templates/jaeger-deploy.yaml rename to charts/jaeger/templates/allinone-deploy.yaml index fa3025da..64630dbd 100644 --- a/charts/jaeger/templates/jaeger-deploy.yaml +++ b/charts/jaeger/templates/allinone-deploy.yaml @@ -1,40 +1,40 @@ -{{- if .Values.jaeger.storage.memory.enabled -}} +{{- if .Values.allInOne.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "jaeger.fullname" . }} labels: {{- include "jaeger.labels" . | nindent 4 }} - app.kubernetes.io/component: jaeger + app.kubernetes.io/component: all-in-one prometheus.io/port: "14269" prometheus.io/scrape: "true" spec: - {{- if hasKey .Values.jaeger "replicas" }} - replicas: {{ .Values.jaeger.replicas }} + {{- if hasKey .Values.allInOne "replicas" }} + replicas: {{ .Values.allInOne.replicas }} {{- end }} strategy: type: Recreate selector: matchLabels: {{- include "jaeger.selectorLabels" . | nindent 6 }} - app.kubernetes.io/component: jaeger + app.kubernetes.io/component: all-in-one template: metadata: labels: {{- include "jaeger.selectorLabels" . | nindent 8 }} - app.kubernetes.io/component: jaeger -{{- if .Values.jaeger.podLabels }} - {{- toYaml .Values.jaeger.podLabels | nindent 8 }} + app.kubernetes.io/component: all-in-one +{{- if .Values.allInOne.podLabels }} + {{- toYaml .Values.allInOne.podLabels | nindent 8 }} {{- end }} annotations: prometheus.io/port: "14269" prometheus.io/scrape: "true" spec: - {{- include "jaeger.imagePullSecrets" . | nindent 6 }} + {{- include "allInOne.imagePullSecrets" . | nindent 6 }} containers: - env: - {{- if .Values.jaeger.extraEnv }} - {{- toYaml .Values.jaeger.extraEnv | nindent 12 }} + {{- if .Values.allInOne.extraEnv }} + {{- toYaml .Values.allInOne.extraEnv | nindent 12 }} {{- end }} - name: SPAN_STORAGE_TYPE value: {{ .Values.storage.type }} @@ -45,21 +45,24 @@ spec: value: "false" - name: COLLECTOR_OTLP_ENABLED value: "true" - {{- if .Values.jaeger.samplingConfig }} + {{- if .Values.allInOne.samplingConfig }} - name: SAMPLING_STRATEGIES_FILE value: /etc/conf/strategies.json {{- end }} - {{- with .Values.jaeger.envFrom }} + {{- with .Values.allInOne.envFrom }} envFrom: {{- toYaml . | nindent 12 }} {{- end }} securityContext: - {{- toYaml .Values.jaeger.securityContext | nindent 12 }} - image: {{ include "jaeger.image" . }} - imagePullPolicy: {{ .Values.jaeger.image.pullPolicy }} + {{- toYaml .Values.allInOne.securityContext | nindent 12 }} + image: jaegertracing/jaeger:2.0.0-rc2 + imagePullPolicy: {{ .Values.allInOne.image.pullPolicy }} name: jaeger args: - - "--config" - - "/etc/jaeger/config.yaml" + - "--config" + - "/etc/jaeger/config.yaml" + {{- range $arg := .Values.allInOne.args }} + - "{{ tpl $arg $ }}" + {{- end }} ports: - containerPort: 5775 protocol: UDP @@ -79,12 +82,14 @@ spec: protocol: TCP - containerPort: 4318 protocol: TCP + - containerPort: 13133 + protocol: TCP livenessProbe: failureThreshold: 5 httpGet: - scheme: HTTP path: /status port: 13133 + scheme: HTTP initialDelaySeconds: 5 periodSeconds: 15 successThreshold: 1 @@ -92,14 +97,14 @@ spec: readinessProbe: failureThreshold: 3 httpGet: - scheme: HTTP path: /status port: 13133 + scheme: HTTP initialDelaySeconds: 1 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 1 - {{- with .Values.jaeger.resources }} + {{- with .Values.allInOne.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} @@ -110,51 +115,51 @@ spec: - name: badger-data mountPath: {{ .Values.storage.badger.persistence.mountPath }} {{- end }} - {{- if .Values.jaeger.samplingConfig}} + {{- if .Values.allInOne.samplingConfig}} - name: strategies mountPath: /etc/conf/ {{- end }} - {{- range .Values.jaeger.extraSecretMounts }} + {{- range .Values.allInOne.extraSecretMounts }} - name: {{ .name }} mountPath: {{ .mountPath }} subPath: {{ .subPath }} readOnly: {{ .readOnly }} {{- end }} securityContext: - {{- toYaml .Values.jaeger.podSecurityContext | nindent 8 }} + {{- toYaml .Values.allInOne.podSecurityContext | nindent 8 }} serviceAccountName: {{ template "jaeger.fullname" . }} volumes: - - name: jaeger-config - configMap: + - name: jaeger-config + configMap: name: jaeger-configmap {{- if not .Values.storage.badger.ephemeral }} - name: badger-data persistentVolumeClaim: claimName: {{ .Values.storage.badger.persistence.useExistingPvcName | required "Using badger persistence it is required to set an existing PVC" }} {{- end }} - {{- if .Values.jaeger.samplingConfig}} + {{- if .Values.allInOne.samplingConfig}} - name: strategies configMap: name: {{ include "jaeger.fullname" . }}-sampling-strategies {{- end }} - {{- range .Values.jaeger.extraSecretMounts }} + {{- range .Values.allInOne.extraSecretMounts }} - name: {{ .name }} secret: secretName: {{ .secretName }} {{- end }} - {{- with .Values.jaeger.affinity }} + {{- with .Values.allInOne.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.jaeger.topologySpreadConstraints }} + {{- with .Values.allInOne.topologySpreadConstraints }} topologySpreadConstraints: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.jaeger.nodeSelector }} + {{- with .Values.allInOne.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.jaeger.tolerations }} + {{- with .Values.allInOne.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/jaeger/templates/jaeger-ing.yaml b/charts/jaeger/templates/allinone-ing.yaml similarity index 53% rename from charts/jaeger/templates/jaeger-ing.yaml rename to charts/jaeger/templates/allinone-ing.yaml index 2363b86d..803748b1 100644 --- a/charts/jaeger/templates/jaeger-ing.yaml +++ b/charts/jaeger/templates/allinone-ing.yaml @@ -1,4 +1,4 @@ -{{- if and (.Values.jaeger.storage.memory.enabled) (.Values.jaeger.ingress.enabled) -}} +{{- if and (.Values.allInOne.enabled) (.Values.allInOne.ingress.enabled) -}} {{- $ingressSupportsIngressClassName := eq (include "common.ingress.supportsIngressClassname" .) "true" }} apiVersion: networking.k8s.io/v1 kind: Ingress @@ -6,26 +6,26 @@ metadata: name: {{ template "jaeger.query.name" . }} labels: {{- include "jaeger.labels" . | nindent 4 }} - app.kubernetes.io/component: jaeger - {{- if .Values.jaeger.ingress.annotations }} + app.kubernetes.io/component: all-in-one + {{- if .Values.allInOne.ingress.annotations }} annotations: - {{- toYaml .Values.jaeger.ingress.annotations | nindent 4 }} + {{- toYaml .Values.allInOne.ingress.annotations | nindent 4 }} {{- end }} spec: - {{- if and $ingressSupportsIngressClassName .Values.jaeger.ingress.ingressClassName }} - ingressClassName: {{ .Values.jaeger.ingress.ingressClassName }} + {{- if and $ingressSupportsIngressClassName .Values.allInOne.ingress.ingressClassName }} + ingressClassName: {{ .Values.allInOne.ingress.ingressClassName }} {{- end }} rules: - {{- range $host := .Values.jaeger.ingress.hosts }} + {{- range $host := .Values.allInOne.ingress.hosts }} - host: {{ $host }} http: paths: - path: / - pathType: {{ default "ImplementationSpecific" $.Values.jaeger.ingress.pathType }} + pathType: {{ default "ImplementationSpecific" $.Values.allInOne.ingress.pathType }} backend: {{- include "common.ingress.backend" (dict "serviceName" (include "jaeger.query.name" $) "servicePort" 16686 "context" $) | nindent 14 }} {{- end -}} - {{- if .Values.jaeger.ingress.tls }} + {{- if .Values.allInOne.ingress.tls }} tls: - {{- toYaml .Values.jeager.ingress.tls | nindent 4 }} + {{- toYaml .Values.allInOne.ingress.tls | nindent 4 }} {{- end -}} {{- end -}} diff --git a/charts/jaeger/templates/jaeger-memory-query-svc.yaml b/charts/jaeger/templates/allinone-query-svc.yaml similarity index 82% rename from charts/jaeger/templates/jaeger-memory-query-svc.yaml rename to charts/jaeger/templates/allinone-query-svc.yaml index 63eb2563..5f0c2f50 100644 --- a/charts/jaeger/templates/jaeger-memory-query-svc.yaml +++ b/charts/jaeger/templates/allinone-query-svc.yaml @@ -1,4 +1,4 @@ -{{- if .Values.jaeger.storage.memory.enabled -}} +{{- if .Values.allInOne.enabled -}} apiVersion: v1 kind: Service metadata: @@ -17,5 +17,5 @@ spec: targetPort: 16685 selector: {{- include "jaeger.selectorLabels" . | nindent 4 }} - app.kubernetes.io/component: jaeger + app.kubernetes.io/component: all-in-one {{- end -}} diff --git a/charts/jaeger/templates/allinone-sa.yaml b/charts/jaeger/templates/allinone-sa.yaml new file mode 100644 index 00000000..a0fbb5a0 --- /dev/null +++ b/charts/jaeger/templates/allinone-sa.yaml @@ -0,0 +1,14 @@ +{{- if .Values.allInOne.enabled -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "jaeger.fullname" . }} + labels: + {{- include "jaeger.labels" . | nindent 4 }} + app.kubernetes.io/component: all-in-one + {{- with .Values.allInOne.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.allInOne.serviceAccount.automountServiceAccountToken }} +{{- end -}} diff --git a/charts/jaeger/templates/jaeger-memory-sa.yaml b/charts/jaeger/templates/jaeger-memory-sa.yaml deleted file mode 100644 index e8979fea..00000000 --- a/charts/jaeger/templates/jaeger-memory-sa.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if .Values.jaeger.storage.memory.enabled -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "jaeger.fullname" . }} - labels: - {{- include "jaeger.labels" . | nindent 4 }} - app.kubernetes.io/component: jaeger - {{- with .Values.jaeger.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -automountServiceAccountToken: {{ .Values.jaeger.serviceAccount.automountServiceAccountToken }} -{{- end -}} diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index 49409ffe..1690ec9e 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -149,6 +149,82 @@ tag: "" nameOverride: "" fullnameOverride: "" +allInOne: + enabled: false + replicas: 1 + image: + registry: "" + repository: jaegertracing/all-in-one + tag: "" + digest: "" + pullPolicy: IfNotPresent + pullSecrets: [] + extraEnv: [] + extraSecretMounts: + [] + # - name: jaeger-tls + # mountPath: /tls + # subPath: "" + # secretName: jaeger-tls + # readOnly: true + # command line arguments / CLI flags + # See https://www.jaegertracing.io/docs/cli/ + args: [] + # samplingConfig: |- + # { + # "default_strategy": { + # "type": "probabilistic", + # "param": 1 + # } + # } + serviceAccount: + annotations: {} + automountServiceAccountToken: true + service: + headless: true + collector: + otlp: + grpc: + name: otlp-grpc + http: + name: otlp-http + ingress: + enabled: false + # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName + # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress + # ingressClassName: nginx + annotations: {} + labels: {} + # Used to create an Ingress record. + # hosts: + # - chart-example.local + # annotations: + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + # labels: + # app: jaeger + # tls: + # # Secrets must be manually created in the namespace. + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + pathType: + # resources: + # limits: + # cpu: 500m + # memory: 512Mi + # requests: + # cpu: 256m + # memory: 128Mi + nodeSelector: {} + tolerations: [] + affinity: {} + topologySpreadContraints: [] + podSecurityContext: + runAsUser: 10001 + runAsGroup: 10001 + fsGroup: 10001 + securityContext: {} storage: # allowed values (cassandra, elasticsearch, grpc-plugin, badger, memory) diff --git a/ct-v2.yaml b/ct-v2.yaml deleted file mode 100644 index 3447e9a6..00000000 --- a/ct-v2.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# See https://github.com/helm/chart-testing#configuration -remote: origin -chart-dirs: - - charts -chart-repos: - - incubator=https://charts.helm.sh/incubator - - elastic=https://helm.elastic.co - - bitnami=https://charts.bitnami.com/bitnami -helm-extra-args: --timeout=600s --debug -target-branch: main From 30126493119daeba89bf2a742750c241a603eee2 Mon Sep 17 00:00:00 2001 From: mehul Date: Tue, 29 Oct 2024 23:03:54 +0530 Subject: [PATCH 08/28] minor fix Signed-off-by: mehul --- charts/jaeger/templates/allInOne-config.yaml | 2 +- charts/jaeger/templates/allinone-deploy.yaml | 2 +- charts/jaeger/values.yaml | 80 +------------------- 3 files changed, 3 insertions(+), 81 deletions(-) diff --git a/charts/jaeger/templates/allInOne-config.yaml b/charts/jaeger/templates/allInOne-config.yaml index a0b17f28..3977e243 100644 --- a/charts/jaeger/templates/allInOne-config.yaml +++ b/charts/jaeger/templates/allInOne-config.yaml @@ -1,4 +1,4 @@ -{{- if .Values.jaeger.storage.memory.enabled -}} +{{- if .Values.allInOne.enabled -}} apiVersion: v1 kind: ConfigMap metadata: diff --git a/charts/jaeger/templates/allinone-deploy.yaml b/charts/jaeger/templates/allinone-deploy.yaml index 64630dbd..b94b921a 100644 --- a/charts/jaeger/templates/allinone-deploy.yaml +++ b/charts/jaeger/templates/allinone-deploy.yaml @@ -54,7 +54,7 @@ spec: {{- end }} securityContext: {{- toYaml .Values.allInOne.securityContext | nindent 12 }} - image: jaegertracing/jaeger:2.0.0-rc2 + image: {{ include "allInOne.image" . }} imagePullPolicy: {{ .Values.allInOne.image.pullPolicy }} name: jaeger args: diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index 1690ec9e..1f619eda 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -2,84 +2,6 @@ # This is a YAML-formatted file. # Jaeger values are grouped by component. Cassandra values override subchart values -jaeger: - storage: - memory: - enabled: true - replicas: 1 - image: - registry: "" - repository: jaegertracing/jaeger - tag: "2.0.0-rc2" - digest: "" - pullPolicy: IfNotPresent - pullSecrets: [] - extraEnv: [] - extraSecretMounts: - [] - # - name: jaeger-tls - # mountPath: /tls - # subPath: "" - # secretName: jaeger-tls - # readOnly: true - # command line arguments / CLI flags - # See https://www.jaegertracing.io/docs/cli/ - args: [] - # samplingConfig: |- - # { - # "default_strategy": { - # "type": "probabilistic", - # "param": 1 - # } - # } - serviceAccount: - annotations: {} - automountServiceAccountToken: true - service: - headless: true - collector: - otlp: - grpc: - name: otlp-grpc - http: - name: otlp-http - ingress: - enabled: false - # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName - # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress - # ingressClassName: nginx - annotations: {} - labels: {} - # Used to create an Ingress record. - # hosts: - # - chart-example.local - # annotations: - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - # labels: - # app: jaeger - # tls: - # # Secrets must be manually created in the namespace. - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - pathType: - # resources: - # limits: - # cpu: 500m - # memory: 512Mi - # requests: - # cpu: 256m - # memory: 128Mi - nodeSelector: {} - tolerations: [] - affinity: {} - topologySpreadContraints: [] - podSecurityContext: - runAsUser: 10001 - runAsGroup: 10001 - fsGroup: 10001 - securityContext: {} config: service: extensions: [jaeger_storage, jaeger_query, healthcheckv2] @@ -154,7 +76,7 @@ allInOne: replicas: 1 image: registry: "" - repository: jaegertracing/all-in-one + repository: jaegertracing/jaeger tag: "" digest: "" pullPolicy: IfNotPresent From 1ea257da21e0639c0087756348c8360dd77897c2 Mon Sep 17 00:00:00 2001 From: mehul Date: Wed, 30 Oct 2024 21:37:12 +0530 Subject: [PATCH 09/28] fixed how the config is being passed Signed-off-by: mehul --- charts/jaeger/Chart.yaml | 2 +- charts/jaeger/templates/_helpers.tpl | 50 ++++++++++++++++++++ charts/jaeger/templates/allInOne-config.yaml | 10 ++-- config-test.yaml | 49 +++++++++++++++++++ 4 files changed, 105 insertions(+), 6 deletions(-) create mode 100644 config-test.yaml diff --git a/charts/jaeger/Chart.yaml b/charts/jaeger/Chart.yaml index b124478b..6aba9d2c 100644 --- a/charts/jaeger/Chart.yaml +++ b/charts/jaeger/Chart.yaml @@ -3,7 +3,7 @@ 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: diff --git a/charts/jaeger/templates/_helpers.tpl b/charts/jaeger/templates/_helpers.tpl index 3556e9d6..03608bd5 100644 --- a/charts/jaeger/templates/_helpers.tpl +++ b/charts/jaeger/templates/_helpers.tpl @@ -722,20 +722,70 @@ Create pull secrets for hotrod image {{- 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 .Values.service.extensions -}} +[{{ join ", " .Values.service.extensions }}] +{{- else -}} +[{{ join ", " .Values.config.service.extensions }}] +{{- end -}} +{{- end }} + +{{- define "jaeger.serviceReceivers" -}} +{{- if .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 .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 .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 -}} diff --git a/charts/jaeger/templates/allInOne-config.yaml b/charts/jaeger/templates/allInOne-config.yaml index 3977e243..decd3edf 100644 --- a/charts/jaeger/templates/allInOne-config.yaml +++ b/charts/jaeger/templates/allInOne-config.yaml @@ -5,16 +5,16 @@ metadata: name: jaeger-configmap namespace: {{ include "jaeger.namespace" . }} labels: - {{- include "jaeger.labels" . | nindent 4 }} + {{- include "jaeger.labels" . | nindent 4 }} data: config.yaml: | service: - extensions: [{{ join ", " .Values.config.service.extensions }}] + extensions: {{ include "jaeger.serviceExtensions" . }} pipelines: traces: - receivers: [{{ join ", " .Values.config.service.pipelines.traces.receivers }}] - processors: [{{ join ", " .Values.config.service.pipelines.traces.processors }}] - exporters: [{{ join ", " .Values.config.service.pipelines.traces.exporters }}] + receivers: {{ include "jaeger.serviceReceivers" . }} + processors: {{ include "jaeger.serviceProcessors" . }} + exporters: {{ include "jaeger.serviceExporters" . }} extensions: {{- include "jaeger.extensionsConfig" . | nindent 6 }} diff --git a/config-test.yaml b/config-test.yaml new file mode 100644 index 00000000..aeb08e20 --- /dev/null +++ b/config-test.yaml @@ -0,0 +1,49 @@ + 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 \ No newline at end of file From 42c30a0efaba54cc20798df34dbdf2a272184263 Mon Sep 17 00:00:00 2001 From: mehul Date: Wed, 30 Oct 2024 21:45:58 +0530 Subject: [PATCH 10/28] fixed mirror template change Signed-off-by: mehul --- charts/jaeger/templates/_helpers.tpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/jaeger/templates/_helpers.tpl b/charts/jaeger/templates/_helpers.tpl index 03608bd5..410d3391 100644 --- a/charts/jaeger/templates/_helpers.tpl +++ b/charts/jaeger/templates/_helpers.tpl @@ -756,7 +756,7 @@ Create pull secrets for hotrod image {{- define "jaeger.serviceExtensions" -}} -{{- if .Values.service.extensions -}} +{{- if and .Values.service .Values.service.extensions -}} [{{ join ", " .Values.service.extensions }}] {{- else -}} [{{ join ", " .Values.config.service.extensions }}] @@ -764,7 +764,7 @@ Create pull secrets for hotrod image {{- end }} {{- define "jaeger.serviceReceivers" -}} -{{- if .Values.service.pipelines.traces.receivers -}} +{{- 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 }}] @@ -772,7 +772,7 @@ Create pull secrets for hotrod image {{- end }} {{- define "jaeger.serviceProcessors" -}} -{{- if .Values.service.pipelines.traces.processors -}} +{{- 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 }}] @@ -780,7 +780,7 @@ Create pull secrets for hotrod image {{- end }} {{- define "jaeger.serviceExporters" -}} -{{- if .Values.service.pipelines.traces.exporters -}} +{{- 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 }}] From f247a956abbefc8f1a35ca9e8d24cbb7d5fcb0df Mon Sep 17 00:00:00 2001 From: mehul Date: Sat, 2 Nov 2024 00:20:48 +0530 Subject: [PATCH 11/28] use --set-file for user config Signed-off-by: mehul --- charts/jaeger/templates/allInOne-config.yaml | 19 +---- charts/jaeger/templates/allinone-deploy.yaml | 6 ++ charts/jaeger/values.yaml | 3 + config-test.yaml | 81 +++++++++----------- es.txt | 0 5 files changed, 49 insertions(+), 60 deletions(-) create mode 100644 es.txt diff --git a/charts/jaeger/templates/allInOne-config.yaml b/charts/jaeger/templates/allInOne-config.yaml index decd3edf..eca21f20 100644 --- a/charts/jaeger/templates/allInOne-config.yaml +++ b/charts/jaeger/templates/allInOne-config.yaml @@ -1,4 +1,4 @@ -{{- if .Values.allInOne.enabled -}} +{{ if .Values.userconfig }} apiVersion: v1 kind: ConfigMap metadata: @@ -8,20 +8,5 @@ metadata: {{- include "jaeger.labels" . | nindent 4 }} data: config.yaml: | - service: - extensions: {{ include "jaeger.serviceExtensions" . }} - pipelines: - traces: - receivers: {{ include "jaeger.serviceReceivers" . }} - processors: {{ include "jaeger.serviceProcessors" . }} - exporters: {{ include "jaeger.serviceExporters" . }} - - extensions: - {{- include "jaeger.extensionsConfig" . | nindent 6 }} - receivers: - {{- include "jaeger.receiversConfig" . | nindent 6 }} - processors: - {{- include "jaeger.processorsConfig" . | nindent 6 }} - exporters: - {{- include "jaeger.exportersConfig" . | nindent 6 }} + {{ .Values.userconfig | nindent 8 }} {{- end }} \ No newline at end of file diff --git a/charts/jaeger/templates/allinone-deploy.yaml b/charts/jaeger/templates/allinone-deploy.yaml index b94b921a..8d5d02d0 100644 --- a/charts/jaeger/templates/allinone-deploy.yaml +++ b/charts/jaeger/templates/allinone-deploy.yaml @@ -58,8 +58,10 @@ spec: imagePullPolicy: {{ .Values.allInOne.image.pullPolicy }} name: jaeger args: + {{ if .Values.userconfig }} - "--config" - "/etc/jaeger/config.yaml" + {{- end }} {{- range $arg := .Values.allInOne.args }} - "{{ tpl $arg $ }}" {{- end }} @@ -109,8 +111,10 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} volumeMounts: + {{ if .Values.userconfig }} - name: jaeger-config mountPath: /etc/jaeger + {{- end }} {{- if not .Values.storage.badger.ephemeral }} - name: badger-data mountPath: {{ .Values.storage.badger.persistence.mountPath }} @@ -129,9 +133,11 @@ spec: {{- toYaml .Values.allInOne.podSecurityContext | nindent 8 }} serviceAccountName: {{ template "jaeger.fullname" . }} volumes: + {{ if .Values.userconfig }} - name: jaeger-config configMap: name: jaeger-configmap + {{- end }} {{- if not .Values.storage.badger.ephemeral }} - name: badger-data persistentVolumeClaim: diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index 1f619eda..8bc4296b 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -2,6 +2,9 @@ # 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: service: extensions: [jaeger_storage, jaeger_query, healthcheckv2] diff --git a/config-test.yaml b/config-test.yaml index aeb08e20..7a62ad62 100644 --- a/config-test.yaml +++ b/config-test.yaml @@ -1,49 +1,44 @@ - service: - extensions: [jaeger_storage, jaeger_query, healthcheckv2] - pipelines: - traces: - receivers: [otlp, jaeger, zipkin] - processors: [batch] - exporters: [jaeger_storage_exporter] +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 +extensions: + healthcheckv2: + use_v2: true + http: + endpoint: 0.0.0.0:13133 - jaeger_query: - storage: - traces: primary_store - traces_archive: archive_store + 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 + jaeger_storage: + backends: + primary_store: + memory: + max_traces: 100000 + archive_store: + memory: + max_traces: 100000 - receivers: - otlp: - protocols: - grpc: - http: - jaeger: - protocols: - grpc: - zipkin: +receivers: + otlp: + protocols: + grpc: + http: + jaeger: + protocols: + grpc: + zipkin: - processors: - batch: +processors: + batch: - exporters: - jaeger_storage_exporter: - trace_storage: primary_store \ No newline at end of file +exporters: + jaeger_storage_exporter: + trace_storage: primary_store diff --git a/es.txt b/es.txt new file mode 100644 index 00000000..e69de29b From 647f7faf125434ed83874a5b93f1eefeb2167541 Mon Sep 17 00:00:00 2001 From: mehul Date: Sat, 2 Nov 2024 14:34:49 +0530 Subject: [PATCH 12/28] removed config-test and updated configmap template Signed-off-by: mehul --- charts/jaeger/templates/allInOne-config.yaml | 2 +- config-test.yaml | 44 -------------------- 2 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 config-test.yaml diff --git a/charts/jaeger/templates/allInOne-config.yaml b/charts/jaeger/templates/allInOne-config.yaml index eca21f20..e4736188 100644 --- a/charts/jaeger/templates/allInOne-config.yaml +++ b/charts/jaeger/templates/allInOne-config.yaml @@ -8,5 +8,5 @@ metadata: {{- include "jaeger.labels" . | nindent 4 }} data: config.yaml: | - {{ .Values.userconfig | nindent 8 }} + {{- .Values.userconfig | nindent 4 }} {{- end }} \ No newline at end of file diff --git a/config-test.yaml b/config-test.yaml deleted file mode 100644 index 7a62ad62..00000000 --- a/config-test.yaml +++ /dev/null @@ -1,44 +0,0 @@ -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 - - 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 From 806991497e281fa1cbca97878d615ba6a6ae4315 Mon Sep 17 00:00:00 2001 From: mehul Date: Sat, 2 Nov 2024 23:36:57 +0530 Subject: [PATCH 13/28] fixed Signed-off-by: mehul --- charts/jaeger/templates/allinone-deploy.yaml | 8 ++++---- .../templates/{allInOne-config.yaml => user-config.yaml} | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) rename charts/jaeger/templates/{allInOne-config.yaml => user-config.yaml} (85%) diff --git a/charts/jaeger/templates/allinone-deploy.yaml b/charts/jaeger/templates/allinone-deploy.yaml index 8d5d02d0..b7255c58 100644 --- a/charts/jaeger/templates/allinone-deploy.yaml +++ b/charts/jaeger/templates/allinone-deploy.yaml @@ -60,7 +60,7 @@ spec: args: {{ if .Values.userconfig }} - "--config" - - "/etc/jaeger/config.yaml" + - "/etc/jaeger/user-config.yaml" {{- end }} {{- range $arg := .Values.allInOne.args }} - "{{ tpl $arg $ }}" @@ -112,7 +112,7 @@ spec: {{- end }} volumeMounts: {{ if .Values.userconfig }} - - name: jaeger-config + - name: user-config mountPath: /etc/jaeger {{- end }} {{- if not .Values.storage.badger.ephemeral }} @@ -134,9 +134,9 @@ spec: serviceAccountName: {{ template "jaeger.fullname" . }} volumes: {{ if .Values.userconfig }} - - name: jaeger-config + - name: user-config configMap: - name: jaeger-configmap + name: user-config {{- end }} {{- if not .Values.storage.badger.ephemeral }} - name: badger-data diff --git a/charts/jaeger/templates/allInOne-config.yaml b/charts/jaeger/templates/user-config.yaml similarity index 85% rename from charts/jaeger/templates/allInOne-config.yaml rename to charts/jaeger/templates/user-config.yaml index e4736188..6f9c27fb 100644 --- a/charts/jaeger/templates/allInOne-config.yaml +++ b/charts/jaeger/templates/user-config.yaml @@ -2,11 +2,11 @@ apiVersion: v1 kind: ConfigMap metadata: - name: jaeger-configmap + name: user-config namespace: {{ include "jaeger.namespace" . }} labels: {{- include "jaeger.labels" . | nindent 4 }} data: - config.yaml: | + user-config.yaml: | {{- .Values.userconfig | nindent 4 }} {{- end }} \ No newline at end of file From b6bbc4b690a85737c4d4413389eaec5e5379ac13 Mon Sep 17 00:00:00 2001 From: mehul Date: Sun, 3 Nov 2024 13:50:16 +0530 Subject: [PATCH 14/28] fixed minor naming Signed-off-by: mehul --- .github/workflows/lint-test.yaml | 11 +++++++++-- es.txt | 0 2 files changed, 9 insertions(+), 2 deletions(-) delete mode 100644 es.txt diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 76965d4e..f111cd29 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -38,7 +38,7 @@ jobs: - name: Run chart-testing (lint) run: ct lint --config ct.yaml - test-with-allInOne: + test-with-all-in-one: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -49,5 +49,12 @@ jobs: - 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 \ + --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 " diff --git a/es.txt b/es.txt deleted file mode 100644 index e69de29b..00000000 From 7a24558a1cb5ff72178287b42b15788f692f0552 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sun, 3 Nov 2024 12:53:07 -0400 Subject: [PATCH 15/28] indentation Signed-off-by: Yuri Shkuro --- charts/jaeger/templates/user-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/jaeger/templates/user-config.yaml b/charts/jaeger/templates/user-config.yaml index 6f9c27fb..2e33f33b 100644 --- a/charts/jaeger/templates/user-config.yaml +++ b/charts/jaeger/templates/user-config.yaml @@ -8,5 +8,5 @@ metadata: {{- include "jaeger.labels" . | nindent 4 }} data: user-config.yaml: | - {{- .Values.userconfig | nindent 4 }} + {{- .Values.userconfig | nindent 4 }} {{- end }} \ No newline at end of file From 5c0e7ba0382933454bb68613439c413bb3a8f16a Mon Sep 17 00:00:00 2001 From: mehul Date: Fri, 8 Nov 2024 17:27:23 +0530 Subject: [PATCH 16/28] v2-elasticsearch Signed-off-by: mehul --- .github/workflows/lint-test.yaml | 23 ++++++- charts/jaeger/Chart.yaml | 2 + charts/jaeger/templates/_helpers.tpl | 3 +- charts/jaeger/templates/collector-deploy.yaml | 16 ++++- charts/jaeger/templates/collector-svc.yaml | 2 +- charts/jaeger/templates/es-user-config.yaml | 62 +++++++++++++++++++ charts/jaeger/templates/query-deploy.yaml | 15 ++++- charts/jaeger/templates/query-svc.yaml | 2 +- charts/jaeger/values.yaml | 6 +- user-config.yaml | 45 ++++++++++++++ 10 files changed, 164 insertions(+), 12 deletions(-) create mode 100644 charts/jaeger/templates/es-user-config.yaml create mode 100644 user-config.yaml diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index f111cd29..9b1ef67d 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -50,11 +50,32 @@ jobs: - name: Run chart-testing (install) run: | ct install --config ct.yaml \ - --helm-extra-set-args " + --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 + + - 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" diff --git a/charts/jaeger/Chart.yaml b/charts/jaeger/Chart.yaml index 6aba9d2c..0974f9f3 100644 --- a/charts/jaeger/Chart.yaml +++ b/charts/jaeger/Chart.yaml @@ -4,6 +4,8 @@ description: A Jaeger Helm chart for Kubernetes name: jaeger type: application version: 4.0.0 +annotations: + Jaegerv1Version: "1.53.0" # CronJobs require v1.21 kubeVersion: ">= 1.21-0" keywords: diff --git a/charts/jaeger/templates/_helpers.tpl b/charts/jaeger/templates/_helpers.tpl index e1b77802..b7490b19 100644 --- a/charts/jaeger/templates/_helpers.tpl +++ b/charts/jaeger/templates/_helpers.tpl @@ -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 -}} {{/* diff --git a/charts/jaeger/templates/collector-deploy.yaml b/charts/jaeger/templates/collector-deploy.yaml index 86e15ed8..2d06f756 100644 --- a/charts/jaeger/templates/collector-deploy.yaml +++ b/charts/jaeger/templates/collector-deploy.yaml @@ -43,6 +43,7 @@ spec: url="{{ include "elasticsearch.client.url" . }}" until [ "$(curl -s -o /dev/null -w '%{http_code}' "$url/_cluster/health")" = "200" ]; do echo "Waiting for Elasticsearch at $url" + echo "$(curl -s "$url/_cluster/health")" sleep 5 done {{- end}} @@ -64,6 +65,8 @@ spec: image: {{ include "collector.image" . }} imagePullPolicy: {{ .Values.collector.image.pullPolicy }} args: + - "--config" + - "/etc/jaeger/user-config.yaml" {{ include "extra.cmdArgs" ( dict "cmdlineParams" .Values.collector.cmdlineParams ) | nindent 10 }} {{- if not .Values.ingester.enabled -}} {{- include "storage.cmdArgs" . | nindent 10 }} @@ -123,7 +126,7 @@ spec: - containerPort: {{ .Values.collector.service.http.port }} name: http protocol: TCP - - containerPort: 14269 + - containerPort: 13133 name: admin protocol: TCP {{- if .Values.collector.service.zipkin }} @@ -141,15 +144,19 @@ spec: {{- end }} readinessProbe: httpGet: - path: / + path: /status port: admin + scheme: HTTP livenessProbe: httpGet: - path: / + path: /status port: admin + scheme: HTTP resources: {{- toYaml .Values.collector.resources | nindent 10 }} volumeMounts: + - name: user-config + mountPath: /etc/jaeger {{- range .Values.collector.extraConfigmapMounts }} - name: {{ .name }} mountPath: {{ .mountPath }} @@ -189,6 +196,9 @@ spec: dnsPolicy: {{ .Values.collector.dnsPolicy }} restartPolicy: Always volumes: + - name: user-config + configMap: + name: user-config {{- range .Values.collector.extraConfigmapMounts }} - name: {{ .name }} configMap: diff --git a/charts/jaeger/templates/collector-svc.yaml b/charts/jaeger/templates/collector-svc.yaml index efa820d1..7930e36a 100644 --- a/charts/jaeger/templates/collector-svc.yaml +++ b/charts/jaeger/templates/collector-svc.yaml @@ -61,7 +61,7 @@ spec: targetPort: {{ .Values.collector.service.otlp.http.name }} {{- end }} - name: {{ .Values.collector.service.admin.name }} - port: 14269 + port: 13133 targetPort: {{ .Values.collector.service.admin.targetPort }} selector: {{- include "jaeger.selectorLabels" . | nindent 4 }} diff --git a/charts/jaeger/templates/es-user-config.yaml b/charts/jaeger/templates/es-user-config.yaml new file mode 100644 index 00000000..1fdb39a2 --- /dev/null +++ b/charts/jaeger/templates/es-user-config.yaml @@ -0,0 +1,62 @@ +{{ if (and (not .Values.userconfig) .Values.provisionDataStore.elasticsearch) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: user-config + namespace: {{ include "jaeger.namespace" . }} + labels: + {{- include "jaeger.labels" . | nindent 4 }} +data: + user-config.yaml: | + service: + extensions: [jaeger_storage, jaeger_query, healthcheckv2] + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [jaeger_storage_exporter] + + extensions: + healthcheckv2: + use_v2: true + http: + endpoint: 0.0.0.0:13133 + + jaeger_query: + storage: + traces: some_storage + traces_archive: another_storage + + + jaeger_storage: + backends: + some_storage: + elasticsearch: + index_prefix: {{- .Values.storage.elasticsearch.index_prefix | quote | indent 2 }} + server_urls: ["{{ include "elasticsearch.client.url" . }}"] + username: {{- .Values.storage.elasticsearch.user | quote | indent 2 }} + {{- if .Values.storage.elasticsearch.password }} + password: {{- .Values.storage.elasticsearch.password | quote | indent 2 }} + {{- end }} + another_storage: + elasticsearch: + index_prefix: {{- .Values.storage.elasticsearch.index_prefix_archive | quote | indent 2 }} + server_urls: ["{{ include "elasticsearch.client.url" . }}"] + username: {{- .Values.storage.elasticsearch.user | quote | indent 2 }} + {{- if .Values.storage.elasticsearch.password }} + password: {{- .Values.storage.elasticsearch.password | quote | indent 2 }} + {{- end }} + + receivers: + otlp: + protocols: + grpc: + http: + + processors: + batch: + + exporters: + jaeger_storage_exporter: + trace_storage: some_storage +{{- end }} diff --git a/charts/jaeger/templates/query-deploy.yaml b/charts/jaeger/templates/query-deploy.yaml index dc6ece41..e6999238 100644 --- a/charts/jaeger/templates/query-deploy.yaml +++ b/charts/jaeger/templates/query-deploy.yaml @@ -70,6 +70,8 @@ spec: image: {{ include "query.image" . }} imagePullPolicy: {{ .Values.query.image.pullPolicy }} args: + - "--config" + - "/etc/jaeger/user-config.yaml" {{ include "extra.cmdArgs" ( dict "cmdlineParams" .Values.query.cmdlineParams ) | nindent 10 }} {{- include "storage.cmdArgs" . | nindent 10 }} env: @@ -100,11 +102,13 @@ spec: containerPort: 16685 protocol: TCP - name: admin - containerPort: 16687 + containerPort: 13133 protocol: TCP resources: {{- toYaml .Values.query.resources | nindent 10 }} volumeMounts: + - name: user-config + mountPath: /etc/jaeger {{- range .Values.query.extraSecretMounts }} - name: {{ .name }} mountPath: {{ .mountPath }} @@ -143,12 +147,14 @@ spec: {{- end }} livenessProbe: httpGet: - path: / + path: /status port: admin + scheme: HTTP readinessProbe: httpGet: - path: / + path: /status port: admin + scheme: HTTP {{- if .Values.query.oAuthSidecar.enabled }} - name: {{ template "jaeger.agent.name" . }}-oauth2-sidecar securityContext: @@ -247,6 +253,9 @@ spec: dnsPolicy: {{ .Values.query.dnsPolicy }} restartPolicy: Always volumes: + - name: user-config + configMap: + name: user-config {{- range .Values.query.extraConfigmapMounts }} - name: {{ .name }} configMap: diff --git a/charts/jaeger/templates/query-svc.yaml b/charts/jaeger/templates/query-svc.yaml index 37f7d160..e2e58ecf 100644 --- a/charts/jaeger/templates/query-svc.yaml +++ b/charts/jaeger/templates/query-svc.yaml @@ -24,7 +24,7 @@ spec: protocol: TCP targetPort: grpc - name: {{ .Values.query.service.admin.name }} - port: 16687 + port: 13133 protocol: TCP targetPort: {{ .Values.query.service.admin.targetPort }} selector: diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index 8bc4296b..fd5de6f5 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -195,6 +195,8 @@ storage: user: elastic usePassword: true password: changeme + index_prefix: jaeger-main + index_prefix_archive: jaeger-archive # indexPrefix: test ## Use existing secret (ignores previous password) # existingSecret: @@ -516,7 +518,7 @@ collector: annotations: {} image: registry: "" - repository: jaegertracing/jaeger-collector + repository: jaegertracing/jaeger tag: "" digest: "" pullPolicy: IfNotPresent @@ -732,7 +734,7 @@ query: annotations: {} image: registry: "" - repository: jaegertracing/jaeger-query + repository: jaegertracing/jaeger tag: "" digest: "" pullPolicy: IfNotPresent diff --git a/user-config.yaml b/user-config.yaml new file mode 100644 index 00000000..90894046 --- /dev/null +++ b/user-config.yaml @@ -0,0 +1,45 @@ +service: + extensions: [jaeger_storage, jaeger_query, healthcheckv2] + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [jaeger_storage_exporter] + +extensions: + healthcheckv2: + use_v2: true + http: + endpoint: 0.0.0.0:13133 + + jaeger_query: + storage: + traces: some_storage + traces_archive: another_storage + + + jaeger_storage: + backends: + some_storage: + elasticsearch: + index_prefix: "jaeger-main" + server_urls: ["http://es-elasticsearch:9200"] + + another_storage: + elasticsearch: + index_prefix: "jaeger-archive" + server_urls: ["http://es-elasticsearch:9200"] + username: {{- .Values.storage.elasticsearch.username | quote }} + +receivers: + otlp: + protocols: + grpc: + http: + +processors: + batch: + +exporters: + jaeger_storage_exporter: + trace_storage: some_storage \ No newline at end of file From 69455e7858e060cd049931b59151563ebd3933bb Mon Sep 17 00:00:00 2001 From: mehul Date: Fri, 8 Nov 2024 17:45:54 +0530 Subject: [PATCH 17/28] fix ci Signed-off-by: mehul --- .github/workflows/lint-test.yaml | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 9b1ef67d..deee23b2 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -58,24 +58,24 @@ jobs: --set collector.enabled=false \ --set query.enabled=false " test-with-elasticsearch: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 - - uses: ./.github/actions/prepare-k8s + - uses: ./.github/actions/prepare-k8s - - 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" + - 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" From 44c7298a87704cf2a7d08e8b39a888b2f699ab81 Mon Sep 17 00:00:00 2001 From: mehul Date: Fri, 8 Nov 2024 17:46:49 +0530 Subject: [PATCH 18/28] fix ci Signed-off-by: mehul --- .github/workflows/lint-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index deee23b2..94ad4f72 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -57,7 +57,7 @@ jobs: --set agent.enabled=false \ --set collector.enabled=false \ --set query.enabled=false " - test-with-elasticsearch: + test-with-elasticsearch: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From 6fdf55a6890b0240480913012de00014a8a82674 Mon Sep 17 00:00:00 2001 From: mehul Date: Tue, 12 Nov 2024 01:27:57 +0530 Subject: [PATCH 19/28] fixed Signed-off-by: mehul --- .github/workflows/lint-test.yaml | 4 ++-- charts/jaeger/Chart.yaml | 2 +- charts/jaeger/templates/collector-svc.yaml | 4 ++-- .../{es-user-config.yaml => es-configmap.yaml} | 10 +++++----- charts/jaeger/values.yaml | 10 +++++++--- user-config.yaml | 1 - 6 files changed, 17 insertions(+), 14 deletions(-) rename charts/jaeger/templates/{es-user-config.yaml => es-configmap.yaml} (71%) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 94ad4f72..bbb5c8f4 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -50,7 +50,7 @@ jobs: - name: Run chart-testing (install) run: | ct install --config ct.yaml \ - --helm-extra-set-args " + --helm-extra-set-args " \ --set provisionDataStore.cassandra=false \ --set storage.type=memory \ --set allInOne.enabled=true \ @@ -69,7 +69,7 @@ jobs: - name: Run chart-testing (install) run: | ct install --config ct.yaml \ - --helm-extra-set-args " + --helm-extra-set-args " \ --set provisionDataStore.cassandra=false \ --set provisionDataStore.elasticsearch=true \ --set storage.type=elasticsearch \ diff --git a/charts/jaeger/Chart.yaml b/charts/jaeger/Chart.yaml index 0974f9f3..01dc6ac0 100644 --- a/charts/jaeger/Chart.yaml +++ b/charts/jaeger/Chart.yaml @@ -5,7 +5,7 @@ name: jaeger type: application version: 4.0.0 annotations: - Jaegerv1Version: "1.53.0" + Jaegerv1Version: "1.62.0" # CronJobs require v1.21 kubeVersion: ">= 1.21-0" keywords: diff --git a/charts/jaeger/templates/collector-svc.yaml b/charts/jaeger/templates/collector-svc.yaml index 7930e36a..9b2c56e7 100644 --- a/charts/jaeger/templates/collector-svc.yaml +++ b/charts/jaeger/templates/collector-svc.yaml @@ -60,9 +60,9 @@ spec: protocol: TCP targetPort: {{ .Values.collector.service.otlp.http.name }} {{- end }} - - name: {{ .Values.collector.service.admin.name }} + - name: {{ .Values.collector.service.healthCheck.name }} port: 13133 - targetPort: {{ .Values.collector.service.admin.targetPort }} + targetPort: {{ .Values.collector.service.healthCheck.targetPort }} selector: {{- include "jaeger.selectorLabels" . | nindent 4 }} app.kubernetes.io/component: collector diff --git a/charts/jaeger/templates/es-user-config.yaml b/charts/jaeger/templates/es-configmap.yaml similarity index 71% rename from charts/jaeger/templates/es-user-config.yaml rename to charts/jaeger/templates/es-configmap.yaml index 1fdb39a2..2704b852 100644 --- a/charts/jaeger/templates/es-user-config.yaml +++ b/charts/jaeger/templates/es-configmap.yaml @@ -32,7 +32,7 @@ data: backends: some_storage: elasticsearch: - index_prefix: {{- .Values.storage.elasticsearch.index_prefix | quote | indent 2 }} + index_prefix: {{- .Values.config.extensions.jaeger_storage.backends.elasticsearch.index_prefix | quote | indent 2 }} server_urls: ["{{ include "elasticsearch.client.url" . }}"] username: {{- .Values.storage.elasticsearch.user | quote | indent 2 }} {{- if .Values.storage.elasticsearch.password }} @@ -40,11 +40,11 @@ data: {{- end }} another_storage: elasticsearch: - index_prefix: {{- .Values.storage.elasticsearch.index_prefix_archive | quote | indent 2 }} + index_prefix: {{- .Values.config.extensions.jaeger_storage.backends.elasticsearch.index_prefix_archive | quote | indent 2 }} server_urls: ["{{ include "elasticsearch.client.url" . }}"] - username: {{- .Values.storage.elasticsearch.user | quote | indent 2 }} - {{- if .Values.storage.elasticsearch.password }} - password: {{- .Values.storage.elasticsearch.password | quote | indent 2 }} + username: {{- .Values.config.extensions.jaeger_storage.backends.elasticsearch.user | quote | indent 2 }} + {{- if .Values.config.extensions.jaeger_storage.backends.elasticsearch.password }} + password: {{- .Values.config.extensions.jaeger_storage.backends.elasticsearch.password | quote | indent 2 }} {{- end }} receivers: diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index fd5de6f5..334ed763 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -32,6 +32,12 @@ config: jaeger_storage: backends: + elasticsearch: + index_prefix: jaeger + index_prefix_archive: jaeger-archive + server_urls: ["http://elasticsearch-master:9200"] + username: elastic + password: changeme primary_store: memory: max_traces: 100000 @@ -195,8 +201,6 @@ storage: user: elastic usePassword: true password: changeme - index_prefix: jaeger-main - index_prefix_archive: jaeger-archive # indexPrefix: test ## Use existing secret (ignores previous password) # existingSecret: @@ -568,7 +572,7 @@ collector: # name: otlp-http # port: 4318 # nodePort: - admin: + healthCheck: name: admin targetPort: admin ingress: diff --git a/user-config.yaml b/user-config.yaml index 90894046..a36349dd 100644 --- a/user-config.yaml +++ b/user-config.yaml @@ -29,7 +29,6 @@ extensions: elasticsearch: index_prefix: "jaeger-archive" server_urls: ["http://es-elasticsearch:9200"] - username: {{- .Values.storage.elasticsearch.username | quote }} receivers: otlp: From 912de0335fe5e7a346748bfc38a260a7ebfe713a Mon Sep 17 00:00:00 2001 From: mehul Date: Tue, 12 Nov 2024 12:32:20 +0530 Subject: [PATCH 20/28] fixed and added docs Signed-off-by: mehul --- charts/jaeger/README-v2.md | 109 ++++++++++++++++++++++ charts/jaeger/templates/es-configmap.yaml | 26 +++--- charts/jaeger/values.yaml | 16 ++-- 3 files changed, 132 insertions(+), 19 deletions(-) create mode 100644 charts/jaeger/README-v2.md diff --git a/charts/jaeger/README-v2.md b/charts/jaeger/README-v2.md new file mode 100644 index 00000000..82e50aa1 --- /dev/null +++ b/charts/jaeger/README-v2.md @@ -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 charts/jaeger \ + --set provisionDataStore.cassandra=false \ + --set storage.type=memory \ + --set allInOne.enabled=true \ + --set agent.enabled=false \ + --set collector.enabled=false \ + --set query.enabled=false \ + --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 charts/jaeger \ + --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 \ + --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 charts/jaeger \ + --set provisionDataStore.cassandra=false \ + --set provisionDataStore.elasticsearch=true \ + --set storage.type=elasticsearch \ + --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` + +--- diff --git a/charts/jaeger/templates/es-configmap.yaml b/charts/jaeger/templates/es-configmap.yaml index 2704b852..99042e3a 100644 --- a/charts/jaeger/templates/es-configmap.yaml +++ b/charts/jaeger/templates/es-configmap.yaml @@ -24,27 +24,27 @@ data: jaeger_query: storage: - traces: some_storage - traces_archive: another_storage + traces: primary_store + traces_archive: archive_store jaeger_storage: backends: - some_storage: + primary_store: elasticsearch: - index_prefix: {{- .Values.config.extensions.jaeger_storage.backends.elasticsearch.index_prefix | quote | indent 2 }} + index_prefix: {{- .Values.config.extensions.jaeger_storage.backends.primary_store.elasticsearch.index_prefix | quote | indent 2 }} server_urls: ["{{ include "elasticsearch.client.url" . }}"] - username: {{- .Values.storage.elasticsearch.user | quote | indent 2 }} - {{- if .Values.storage.elasticsearch.password }} - password: {{- .Values.storage.elasticsearch.password | quote | indent 2 }} + username: {{- .Values.config.extensions.jaeger_storage.backends.primary_store.elasticsearch.user | quote | indent 2 }} + {{- if .Values.config.extensions.jaeger_storage.backends.primary_store.elasticsearch.password }} + password: {{- .Values.config.extensions.jaeger_storage.backends.primary_store.elasticsearch.password | quote | indent 2 }} {{- end }} - another_storage: + archive_store: elasticsearch: - index_prefix: {{- .Values.config.extensions.jaeger_storage.backends.elasticsearch.index_prefix_archive | quote | indent 2 }} + index_prefix: {{- .Values.config.extensions.jaeger_storage.backends.archive_store.elasticsearch.index_prefix | quote | indent 2 }} server_urls: ["{{ include "elasticsearch.client.url" . }}"] - username: {{- .Values.config.extensions.jaeger_storage.backends.elasticsearch.user | quote | indent 2 }} - {{- if .Values.config.extensions.jaeger_storage.backends.elasticsearch.password }} - password: {{- .Values.config.extensions.jaeger_storage.backends.elasticsearch.password | quote | indent 2 }} + username: {{- .Values.config.extensions.jaeger_storage.backends.archive_store.elasticsearch.user | quote | indent 2 }} + {{- if .Values.config.extensions.jaeger_storage.backends.archive_store.elasticsearch.password }} + password: {{- .Values.config.extensions.jaeger_storage.backends.archive_store.elasticsearch.password | quote | indent 2 }} {{- end }} receivers: @@ -58,5 +58,5 @@ data: exporters: jaeger_storage_exporter: - trace_storage: some_storage + trace_storage: primary_store {{- end }} diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index 334ed763..c1585094 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -32,16 +32,20 @@ config: jaeger_storage: backends: - elasticsearch: - index_prefix: jaeger - index_prefix_archive: jaeger-archive - server_urls: ["http://elasticsearch-master:9200"] - username: elastic - password: changeme primary_store: + elasticsearch: + index_prefix: jaeger + server_urls: ["http://elasticsearch-master:9200"] + username: elastic + password: changeme memory: max_traces: 100000 archive_store: + elasticsearch: + index_prefix: jaeger-archive + server_urls: ["http://elasticsearch-master:9200"] + username: elastic + password: changeme memory: max_traces: 100000 From d82e1cbf0eabafac81b7aa7cb2d8456cd98e01ec Mon Sep 17 00:00:00 2001 From: mehul Date: Mon, 18 Nov 2024 21:33:20 +0530 Subject: [PATCH 21/28] fixed Signed-off-by: mehul --- .github/workflows/lint-test.yaml | 10 +--------- charts/jaeger/Chart.yaml | 2 -- charts/jaeger/templates/agent-ds.yaml | 2 +- charts/jaeger/templates/agent-sa.yaml | 2 +- charts/jaeger/templates/agent-servicemonitor.yaml | 2 +- charts/jaeger/templates/agent-svc.yaml | 2 +- charts/jaeger/templates/cassandra-schema-job.yaml | 2 +- charts/jaeger/templates/collector-deploy.yaml | 2 +- charts/jaeger/templates/collector-hpa.yaml | 2 +- charts/jaeger/templates/collector-sa.yaml | 2 +- charts/jaeger/templates/collector-servicemonitor.yaml | 2 +- charts/jaeger/templates/collector-svc.yaml | 2 +- charts/jaeger/templates/query-deploy.yaml | 2 +- charts/jaeger/templates/query-sa.yaml | 2 +- charts/jaeger/templates/query-servicemonitor.yaml | 2 +- charts/jaeger/templates/query-svc.yaml | 2 +- charts/jaeger/templates/user-config.yaml | 1 + charts/jaeger/values.yaml | 10 +++++----- 18 files changed, 21 insertions(+), 30 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index bbb5c8f4..6060ab37 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -49,14 +49,7 @@ jobs: - 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: @@ -70,7 +63,6 @@ jobs: 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 \ diff --git a/charts/jaeger/Chart.yaml b/charts/jaeger/Chart.yaml index 01dc6ac0..73b2f65c 100644 --- a/charts/jaeger/Chart.yaml +++ b/charts/jaeger/Chart.yaml @@ -18,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 diff --git a/charts/jaeger/templates/agent-ds.yaml b/charts/jaeger/templates/agent-ds.yaml index 7194d65e..824a730d 100644 --- a/charts/jaeger/templates/agent-ds.yaml +++ b/charts/jaeger/templates/agent-ds.yaml @@ -1,4 +1,4 @@ -{{- if .Values.agent.enabled -}} +{{- if and .Values.agent.enabled (not .Values.allInOne.enabled) -}} apiVersion: apps/v1 kind: DaemonSet metadata: diff --git a/charts/jaeger/templates/agent-sa.yaml b/charts/jaeger/templates/agent-sa.yaml index 1a8d7f45..ca8ec4f3 100644 --- a/charts/jaeger/templates/agent-sa.yaml +++ b/charts/jaeger/templates/agent-sa.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.agent.enabled .Values.agent.serviceAccount.create -}} +{{- if and .Values.agent.enabled (not .Values.allInOne.enabled) .Values.agent.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/jaeger/templates/agent-servicemonitor.yaml b/charts/jaeger/templates/agent-servicemonitor.yaml index 255a6a73..d740af01 100644 --- a/charts/jaeger/templates/agent-servicemonitor.yaml +++ b/charts/jaeger/templates/agent-servicemonitor.yaml @@ -1,4 +1,4 @@ -{{- if and (.Values.agent.enabled) (.Values.agent.serviceMonitor.enabled)}} +{{- if and (.Values.agent.enabled) (not .Values.allInOne.enabled) (.Values.agent.serviceMonitor.enabled)}} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/charts/jaeger/templates/agent-svc.yaml b/charts/jaeger/templates/agent-svc.yaml index e4243f2c..439836ea 100644 --- a/charts/jaeger/templates/agent-svc.yaml +++ b/charts/jaeger/templates/agent-svc.yaml @@ -1,4 +1,4 @@ -{{- if .Values.agent.enabled -}} +{{- if and .Values.agent.enabled (not .Values.allInOne.enabled) -}} apiVersion: v1 kind: Service metadata: diff --git a/charts/jaeger/templates/cassandra-schema-job.yaml b/charts/jaeger/templates/cassandra-schema-job.yaml index b6aec4e9..3f94e5f1 100644 --- a/charts/jaeger/templates/cassandra-schema-job.yaml +++ b/charts/jaeger/templates/cassandra-schema-job.yaml @@ -1,4 +1,4 @@ -{{- if .Values.collector.enabled -}} +{{- if and .Values.collector.enabled (not .Values.allInOne.enabled) -}} {{- if eq .Values.storage.type "cassandra" -}} {{- if .Values.storage.cassandra.schemaJobEnabled -}} apiVersion: batch/v1 diff --git a/charts/jaeger/templates/collector-deploy.yaml b/charts/jaeger/templates/collector-deploy.yaml index 2d06f756..c006a2e4 100644 --- a/charts/jaeger/templates/collector-deploy.yaml +++ b/charts/jaeger/templates/collector-deploy.yaml @@ -1,4 +1,4 @@ -{{- if .Values.collector.enabled -}} +{{- if and .Values.collector.enabled (not .Values.allInOne.enabled) -}} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/charts/jaeger/templates/collector-hpa.yaml b/charts/jaeger/templates/collector-hpa.yaml index 18e6e1ed..4b6cb65d 100644 --- a/charts/jaeger/templates/collector-hpa.yaml +++ b/charts/jaeger/templates/collector-hpa.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.collector.enabled .Values.collector.autoscaling.enabled }} +{{- if and .Values.collector.enabled (not .Values.allInOne.enabled) .Values.collector.autoscaling.enabled }} apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }} kind: HorizontalPodAutoscaler metadata: diff --git a/charts/jaeger/templates/collector-sa.yaml b/charts/jaeger/templates/collector-sa.yaml index c3444535..d4cb3188 100644 --- a/charts/jaeger/templates/collector-sa.yaml +++ b/charts/jaeger/templates/collector-sa.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.collector.enabled .Values.collector.serviceAccount.create -}} +{{- if and .Values.collector.enabled (not .Values.allInOne.enabled) .Values.collector.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/jaeger/templates/collector-servicemonitor.yaml b/charts/jaeger/templates/collector-servicemonitor.yaml index fbd94fe5..adc8b4b6 100644 --- a/charts/jaeger/templates/collector-servicemonitor.yaml +++ b/charts/jaeger/templates/collector-servicemonitor.yaml @@ -1,4 +1,4 @@ -{{- if and (.Values.collector.enabled) (.Values.collector.serviceMonitor.enabled)}} +{{- if and (.Values.collector.enabled) (not .Values.allInOne.enabled) (.Values.collector.serviceMonitor.enabled)}} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/charts/jaeger/templates/collector-svc.yaml b/charts/jaeger/templates/collector-svc.yaml index 9b2c56e7..07efd355 100644 --- a/charts/jaeger/templates/collector-svc.yaml +++ b/charts/jaeger/templates/collector-svc.yaml @@ -1,4 +1,4 @@ -{{- if .Values.collector.enabled -}} +{{- if and .Values.collector.enabled (not .Values.allInOne.enabled) -}} apiVersion: v1 kind: Service metadata: diff --git a/charts/jaeger/templates/query-deploy.yaml b/charts/jaeger/templates/query-deploy.yaml index e6999238..a69fcb2d 100644 --- a/charts/jaeger/templates/query-deploy.yaml +++ b/charts/jaeger/templates/query-deploy.yaml @@ -1,4 +1,4 @@ -{{- if .Values.query.enabled -}} +{{- if and .Values.query.enabled (not .Values.allInOne.enabled) -}} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/charts/jaeger/templates/query-sa.yaml b/charts/jaeger/templates/query-sa.yaml index da6ac97d..d2424016 100644 --- a/charts/jaeger/templates/query-sa.yaml +++ b/charts/jaeger/templates/query-sa.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.query.enabled .Values.query.serviceAccount.create -}} +{{- if and .Values.query.enabled (not .Values.allInOne.enabled) .Values.query.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/jaeger/templates/query-servicemonitor.yaml b/charts/jaeger/templates/query-servicemonitor.yaml index e52086b7..37bdca19 100644 --- a/charts/jaeger/templates/query-servicemonitor.yaml +++ b/charts/jaeger/templates/query-servicemonitor.yaml @@ -1,4 +1,4 @@ -{{- if and (.Values.query.enabled) (.Values.query.serviceMonitor.enabled)}} +{{- if and (.Values.query.enabled) (not .Values.allInOne.enabled) (.Values.query.serviceMonitor.enabled)}} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/charts/jaeger/templates/query-svc.yaml b/charts/jaeger/templates/query-svc.yaml index e2e58ecf..44dd62a1 100644 --- a/charts/jaeger/templates/query-svc.yaml +++ b/charts/jaeger/templates/query-svc.yaml @@ -1,4 +1,4 @@ -{{- if .Values.query.enabled -}} +{{- if and .Values.query.enabled (not .Values.allInOne.enabled) -}} apiVersion: v1 kind: Service metadata: diff --git a/charts/jaeger/templates/user-config.yaml b/charts/jaeger/templates/user-config.yaml index 2e33f33b..69132bd9 100644 --- a/charts/jaeger/templates/user-config.yaml +++ b/charts/jaeger/templates/user-config.yaml @@ -1,3 +1,4 @@ +# this is a user-provided config file that will be mounted into the all-in-one deployments {{ if .Values.userconfig }} apiVersion: v1 kind: ConfigMap diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index c1585094..6a63d038 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -71,7 +71,7 @@ global: imageRegistry: provisionDataStore: - cassandra: true + cassandra: false elasticsearch: false kafka: false @@ -85,7 +85,7 @@ nameOverride: "" fullnameOverride: "" allInOne: - enabled: false + enabled: true replicas: 1 image: registry: "" @@ -163,7 +163,7 @@ allInOne: storage: # allowed values (cassandra, elasticsearch, grpc-plugin, badger, memory) - type: cassandra + type: memory cassandra: host: cassandra port: 9042 @@ -577,8 +577,8 @@ collector: # port: 4318 # nodePort: healthCheck: - name: admin - targetPort: admin + name: healthCheck + targetPort: healthCheck ingress: enabled: false # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName From e70863b33a6def1eb77b2c5d19e7d3fa98f4486a Mon Sep 17 00:00:00 2001 From: mehul Date: Mon, 18 Nov 2024 21:36:30 +0530 Subject: [PATCH 22/28] added port Signed-off-by: mehul --- charts/jaeger/templates/es-configmap.yaml | 4 ++-- charts/jaeger/values.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/jaeger/templates/es-configmap.yaml b/charts/jaeger/templates/es-configmap.yaml index 99042e3a..3afc4d38 100644 --- a/charts/jaeger/templates/es-configmap.yaml +++ b/charts/jaeger/templates/es-configmap.yaml @@ -50,8 +50,8 @@ data: receivers: otlp: protocols: - grpc: - http: + grpc: {{ .Values.config.receivers.otlp.protocols.grpc | indent 4 }} + http: {{ .Values.config.receivers.otlp.protocols.http | indent 4 }} processors: batch: diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index 6a63d038..d90d260f 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -52,8 +52,8 @@ config: receivers: otlp: protocols: - grpc: - http: + grpc: 0.0.0.0:4317 + http: 0.0.0.0:4318 jaeger: protocols: grpc: From b2a39776827eab72d4c37d1a6fff937867eba005 Mon Sep 17 00:00:00 2001 From: mehul Date: Tue, 19 Nov 2024 03:35:56 +0530 Subject: [PATCH 23/28] fixed Signed-off-by: mehul --- .github/workflows/lint-test.yaml | 6 +++++- charts/jaeger/templates/agent-ds.yaml | 2 +- charts/jaeger/templates/agent-sa.yaml | 2 +- .../jaeger/templates/agent-servicemonitor.yaml | 2 +- charts/jaeger/templates/agent-svc.yaml | 2 +- .../jaeger/templates/cassandra-schema-job.yaml | 2 +- charts/jaeger/templates/collector-deploy.yaml | 2 +- charts/jaeger/templates/collector-hpa.yaml | 2 +- charts/jaeger/templates/collector-sa.yaml | 2 +- .../templates/collector-servicemonitor.yaml | 2 +- charts/jaeger/templates/collector-svc.yaml | 2 +- charts/jaeger/templates/es-configmap.yaml | 10 ++++++---- charts/jaeger/templates/query-deploy.yaml | 2 +- charts/jaeger/templates/query-sa.yaml | 2 +- .../jaeger/templates/query-servicemonitor.yaml | 2 +- charts/jaeger/templates/query-svc.yaml | 6 +++--- charts/jaeger/templates/user-config.yaml | 2 +- charts/jaeger/values.yaml | 16 ++++++++-------- 18 files changed, 36 insertions(+), 30 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 6060ab37..47a67c22 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -64,10 +64,14 @@ jobs: 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 elasticsearch.ingest.replicaCount=0 + --set agent.enabled=true \ + --set collector.enabled=true \ + --set query.enabled=true" diff --git a/charts/jaeger/templates/agent-ds.yaml b/charts/jaeger/templates/agent-ds.yaml index 824a730d..7194d65e 100644 --- a/charts/jaeger/templates/agent-ds.yaml +++ b/charts/jaeger/templates/agent-ds.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.agent.enabled (not .Values.allInOne.enabled) -}} +{{- if .Values.agent.enabled -}} apiVersion: apps/v1 kind: DaemonSet metadata: diff --git a/charts/jaeger/templates/agent-sa.yaml b/charts/jaeger/templates/agent-sa.yaml index ca8ec4f3..1a8d7f45 100644 --- a/charts/jaeger/templates/agent-sa.yaml +++ b/charts/jaeger/templates/agent-sa.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.agent.enabled (not .Values.allInOne.enabled) .Values.agent.serviceAccount.create -}} +{{- if and .Values.agent.enabled .Values.agent.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/jaeger/templates/agent-servicemonitor.yaml b/charts/jaeger/templates/agent-servicemonitor.yaml index d740af01..255a6a73 100644 --- a/charts/jaeger/templates/agent-servicemonitor.yaml +++ b/charts/jaeger/templates/agent-servicemonitor.yaml @@ -1,4 +1,4 @@ -{{- if and (.Values.agent.enabled) (not .Values.allInOne.enabled) (.Values.agent.serviceMonitor.enabled)}} +{{- if and (.Values.agent.enabled) (.Values.agent.serviceMonitor.enabled)}} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/charts/jaeger/templates/agent-svc.yaml b/charts/jaeger/templates/agent-svc.yaml index 439836ea..e4243f2c 100644 --- a/charts/jaeger/templates/agent-svc.yaml +++ b/charts/jaeger/templates/agent-svc.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.agent.enabled (not .Values.allInOne.enabled) -}} +{{- if .Values.agent.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/charts/jaeger/templates/cassandra-schema-job.yaml b/charts/jaeger/templates/cassandra-schema-job.yaml index 3f94e5f1..b6aec4e9 100644 --- a/charts/jaeger/templates/cassandra-schema-job.yaml +++ b/charts/jaeger/templates/cassandra-schema-job.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.collector.enabled (not .Values.allInOne.enabled) -}} +{{- if .Values.collector.enabled -}} {{- if eq .Values.storage.type "cassandra" -}} {{- if .Values.storage.cassandra.schemaJobEnabled -}} apiVersion: batch/v1 diff --git a/charts/jaeger/templates/collector-deploy.yaml b/charts/jaeger/templates/collector-deploy.yaml index c006a2e4..2d06f756 100644 --- a/charts/jaeger/templates/collector-deploy.yaml +++ b/charts/jaeger/templates/collector-deploy.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.collector.enabled (not .Values.allInOne.enabled) -}} +{{- if .Values.collector.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/charts/jaeger/templates/collector-hpa.yaml b/charts/jaeger/templates/collector-hpa.yaml index 4b6cb65d..18e6e1ed 100644 --- a/charts/jaeger/templates/collector-hpa.yaml +++ b/charts/jaeger/templates/collector-hpa.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.collector.enabled (not .Values.allInOne.enabled) .Values.collector.autoscaling.enabled }} +{{- if and .Values.collector.enabled .Values.collector.autoscaling.enabled }} apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }} kind: HorizontalPodAutoscaler metadata: diff --git a/charts/jaeger/templates/collector-sa.yaml b/charts/jaeger/templates/collector-sa.yaml index d4cb3188..c3444535 100644 --- a/charts/jaeger/templates/collector-sa.yaml +++ b/charts/jaeger/templates/collector-sa.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.collector.enabled (not .Values.allInOne.enabled) .Values.collector.serviceAccount.create -}} +{{- if and .Values.collector.enabled .Values.collector.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/jaeger/templates/collector-servicemonitor.yaml b/charts/jaeger/templates/collector-servicemonitor.yaml index adc8b4b6..fbd94fe5 100644 --- a/charts/jaeger/templates/collector-servicemonitor.yaml +++ b/charts/jaeger/templates/collector-servicemonitor.yaml @@ -1,4 +1,4 @@ -{{- if and (.Values.collector.enabled) (not .Values.allInOne.enabled) (.Values.collector.serviceMonitor.enabled)}} +{{- if and (.Values.collector.enabled) (.Values.collector.serviceMonitor.enabled)}} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/charts/jaeger/templates/collector-svc.yaml b/charts/jaeger/templates/collector-svc.yaml index 07efd355..9b2c56e7 100644 --- a/charts/jaeger/templates/collector-svc.yaml +++ b/charts/jaeger/templates/collector-svc.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.collector.enabled (not .Values.allInOne.enabled) -}} +{{- if .Values.collector.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/charts/jaeger/templates/es-configmap.yaml b/charts/jaeger/templates/es-configmap.yaml index 3afc4d38..59f2662d 100644 --- a/charts/jaeger/templates/es-configmap.yaml +++ b/charts/jaeger/templates/es-configmap.yaml @@ -34,7 +34,7 @@ data: elasticsearch: index_prefix: {{- .Values.config.extensions.jaeger_storage.backends.primary_store.elasticsearch.index_prefix | quote | indent 2 }} server_urls: ["{{ include "elasticsearch.client.url" . }}"] - username: {{- .Values.config.extensions.jaeger_storage.backends.primary_store.elasticsearch.user | quote | indent 2 }} + username: {{- .Values.config.extensions.jaeger_storage.backends.primary_store.elasticsearch.username | quote | indent 2 }} {{- if .Values.config.extensions.jaeger_storage.backends.primary_store.elasticsearch.password }} password: {{- .Values.config.extensions.jaeger_storage.backends.primary_store.elasticsearch.password | quote | indent 2 }} {{- end }} @@ -42,7 +42,7 @@ data: elasticsearch: index_prefix: {{- .Values.config.extensions.jaeger_storage.backends.archive_store.elasticsearch.index_prefix | quote | indent 2 }} server_urls: ["{{ include "elasticsearch.client.url" . }}"] - username: {{- .Values.config.extensions.jaeger_storage.backends.archive_store.elasticsearch.user | quote | indent 2 }} + username: {{- .Values.config.extensions.jaeger_storage.backends.archive_store.elasticsearch.username | quote | indent 2 }} {{- if .Values.config.extensions.jaeger_storage.backends.archive_store.elasticsearch.password }} password: {{- .Values.config.extensions.jaeger_storage.backends.archive_store.elasticsearch.password | quote | indent 2 }} {{- end }} @@ -50,8 +50,10 @@ data: receivers: otlp: protocols: - grpc: {{ .Values.config.receivers.otlp.protocols.grpc | indent 4 }} - http: {{ .Values.config.receivers.otlp.protocols.http | indent 4 }} + grpc: + endpoint:{{ .Values.config.receivers.otlp.protocols.grpc | indent 1 }} + http: + endpoint:{{ .Values.config.receivers.otlp.protocols.http | indent 1 }} processors: batch: diff --git a/charts/jaeger/templates/query-deploy.yaml b/charts/jaeger/templates/query-deploy.yaml index a69fcb2d..e6999238 100644 --- a/charts/jaeger/templates/query-deploy.yaml +++ b/charts/jaeger/templates/query-deploy.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.query.enabled (not .Values.allInOne.enabled) -}} +{{- if .Values.query.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/charts/jaeger/templates/query-sa.yaml b/charts/jaeger/templates/query-sa.yaml index d2424016..da6ac97d 100644 --- a/charts/jaeger/templates/query-sa.yaml +++ b/charts/jaeger/templates/query-sa.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.query.enabled (not .Values.allInOne.enabled) .Values.query.serviceAccount.create -}} +{{- if and .Values.query.enabled .Values.query.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/jaeger/templates/query-servicemonitor.yaml b/charts/jaeger/templates/query-servicemonitor.yaml index 37bdca19..e52086b7 100644 --- a/charts/jaeger/templates/query-servicemonitor.yaml +++ b/charts/jaeger/templates/query-servicemonitor.yaml @@ -1,4 +1,4 @@ -{{- if and (.Values.query.enabled) (not .Values.allInOne.enabled) (.Values.query.serviceMonitor.enabled)}} +{{- if and (.Values.query.enabled) (.Values.query.serviceMonitor.enabled)}} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/charts/jaeger/templates/query-svc.yaml b/charts/jaeger/templates/query-svc.yaml index 44dd62a1..75b8b3ee 100644 --- a/charts/jaeger/templates/query-svc.yaml +++ b/charts/jaeger/templates/query-svc.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.query.enabled (not .Values.allInOne.enabled) -}} +{{- if .Values.query.enabled -}} apiVersion: v1 kind: Service metadata: @@ -23,10 +23,10 @@ spec: port: 16685 protocol: TCP targetPort: grpc - - name: {{ .Values.query.service.admin.name }} + - name: {{ .Values.query.service.healthCheck.name }} port: 13133 protocol: TCP - targetPort: {{ .Values.query.service.admin.targetPort }} + targetPort: {{ .Values.query.service.healthCheck.targetPort }} selector: {{- include "jaeger.selectorLabels" . | nindent 4 }} app.kubernetes.io/component: query diff --git a/charts/jaeger/templates/user-config.yaml b/charts/jaeger/templates/user-config.yaml index 69132bd9..2fa9842b 100644 --- a/charts/jaeger/templates/user-config.yaml +++ b/charts/jaeger/templates/user-config.yaml @@ -1,4 +1,4 @@ -# this is a user-provided config file that will be mounted into the all-in-one deployments +# Generates a config map from a file provided by user via `--set-file userconfig=` {{ if .Values.userconfig }} apiVersion: v1 kind: ConfigMap diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index d90d260f..5896271a 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -440,7 +440,7 @@ ingester: agent: podSecurityContext: {} securityContext: {} - enabled: true + enabled: false annotations: {} image: registry: "" @@ -522,7 +522,7 @@ agent: collector: podSecurityContext: {} securityContext: {} - enabled: true + enabled: false annotations: {} image: registry: "" @@ -577,8 +577,8 @@ collector: # port: 4318 # nodePort: healthCheck: - name: healthCheck - targetPort: healthCheck + name: healthcheck + targetPort: healthcheck ingress: enabled: false # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName @@ -691,7 +691,7 @@ collector: # customRules: [] query: - enabled: true + enabled: false basePath: / initContainers: [] oAuthSidecar: @@ -762,9 +762,9 @@ query: # targetPort: 8080 # Specify a specific node port when type is NodePort # nodePort: 32500 - admin: - name: admin - targetPort: admin + healthCheck: + name: healthcheck + targetPort: healthcheck ingress: enabled: false # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName From 7eabf48b2d305d10f937059a817833738815ad2d Mon Sep 17 00:00:00 2001 From: mehul Date: Tue, 19 Nov 2024 20:39:22 +0530 Subject: [PATCH 24/28] fixed Signed-off-by: mehul --- charts/jaeger/templates/collector-deploy.yaml | 6 +++--- charts/jaeger/templates/collector-servicemonitor.yaml | 2 +- charts/jaeger/templates/es-configmap.yaml | 4 ++-- charts/jaeger/templates/query-deploy.yaml | 6 +++--- charts/jaeger/values.yaml | 6 ++++-- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/charts/jaeger/templates/collector-deploy.yaml b/charts/jaeger/templates/collector-deploy.yaml index 2d06f756..b2c911ff 100644 --- a/charts/jaeger/templates/collector-deploy.yaml +++ b/charts/jaeger/templates/collector-deploy.yaml @@ -127,7 +127,7 @@ spec: name: http protocol: TCP - containerPort: 13133 - name: admin + name: healthcheck protocol: TCP {{- if .Values.collector.service.zipkin }} - containerPort: {{ .Values.collector.service.zipkin.port }} @@ -145,12 +145,12 @@ spec: readinessProbe: httpGet: path: /status - port: admin + port: healthcheck scheme: HTTP livenessProbe: httpGet: path: /status - port: admin + port: healthcheck scheme: HTTP resources: {{- toYaml .Values.collector.resources | nindent 10 }} diff --git a/charts/jaeger/templates/collector-servicemonitor.yaml b/charts/jaeger/templates/collector-servicemonitor.yaml index fbd94fe5..8ddc3c9c 100644 --- a/charts/jaeger/templates/collector-servicemonitor.yaml +++ b/charts/jaeger/templates/collector-servicemonitor.yaml @@ -18,7 +18,7 @@ metadata: {{- end }} spec: endpoints: - - port: admin + - port: healthcheck path: /metrics {{- if .Values.collector.serviceMonitor.interval }} interval: {{ .Values.collector.serviceMonitor.interval }} diff --git a/charts/jaeger/templates/es-configmap.yaml b/charts/jaeger/templates/es-configmap.yaml index 59f2662d..5b9ec174 100644 --- a/charts/jaeger/templates/es-configmap.yaml +++ b/charts/jaeger/templates/es-configmap.yaml @@ -51,9 +51,9 @@ data: otlp: protocols: grpc: - endpoint:{{ .Values.config.receivers.otlp.protocols.grpc | indent 1 }} + endpoint:{{ .Values.config.receivers.otlp.protocols.endpoints.grpc | indent 1 }} http: - endpoint:{{ .Values.config.receivers.otlp.protocols.http | indent 1 }} + endpoint:{{ .Values.config.receivers.otlp.protocols.endpoints.http | indent 1 }} processors: batch: diff --git a/charts/jaeger/templates/query-deploy.yaml b/charts/jaeger/templates/query-deploy.yaml index e6999238..dd4f3eaf 100644 --- a/charts/jaeger/templates/query-deploy.yaml +++ b/charts/jaeger/templates/query-deploy.yaml @@ -101,7 +101,7 @@ spec: - name: grpc containerPort: 16685 protocol: TCP - - name: admin + - name: healthcheck containerPort: 13133 protocol: TCP resources: @@ -148,12 +148,12 @@ spec: livenessProbe: httpGet: path: /status - port: admin + port: healthcheck scheme: HTTP readinessProbe: httpGet: path: /status - port: admin + port: healthcheck scheme: HTTP {{- if .Values.query.oAuthSidecar.enabled }} - name: {{ template "jaeger.agent.name" . }}-oauth2-sidecar diff --git a/charts/jaeger/values.yaml b/charts/jaeger/values.yaml index 5896271a..43791ec7 100644 --- a/charts/jaeger/values.yaml +++ b/charts/jaeger/values.yaml @@ -52,8 +52,10 @@ config: receivers: otlp: protocols: - grpc: 0.0.0.0:4317 - http: 0.0.0.0:4318 + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 jaeger: protocols: grpc: From 0ad61d2c016393cea5d31ab2494c0b6fa70c0e42 Mon Sep 17 00:00:00 2001 From: mehul Date: Tue, 19 Nov 2024 20:44:21 +0530 Subject: [PATCH 25/28] fixed typo Signed-off-by: mehul --- charts/jaeger/templates/es-configmap.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/jaeger/templates/es-configmap.yaml b/charts/jaeger/templates/es-configmap.yaml index 5b9ec174..9f86ef21 100644 --- a/charts/jaeger/templates/es-configmap.yaml +++ b/charts/jaeger/templates/es-configmap.yaml @@ -51,9 +51,9 @@ data: otlp: protocols: grpc: - endpoint:{{ .Values.config.receivers.otlp.protocols.endpoints.grpc | indent 1 }} + endpoint:{{ .Values.config.receivers.otlp.protocols.endpoint.grpc | indent 1 }} http: - endpoint:{{ .Values.config.receivers.otlp.protocols.endpoints.http | indent 1 }} + endpoint:{{ .Values.config.receivers.otlp.protocols.endpoint.http | indent 1 }} processors: batch: From c07f325b8381216bade5174f8ec1f8124a69caf9 Mon Sep 17 00:00:00 2001 From: mehul Date: Tue, 19 Nov 2024 21:10:59 +0530 Subject: [PATCH 26/28] fixed Signed-off-by: mehul --- charts/jaeger/templates/es-configmap.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/jaeger/templates/es-configmap.yaml b/charts/jaeger/templates/es-configmap.yaml index 9f86ef21..a9ab40fb 100644 --- a/charts/jaeger/templates/es-configmap.yaml +++ b/charts/jaeger/templates/es-configmap.yaml @@ -51,9 +51,9 @@ data: otlp: protocols: grpc: - endpoint:{{ .Values.config.receivers.otlp.protocols.endpoint.grpc | indent 1 }} + endpoint:{{ .Values.config.receivers.otlp.protocols.grpc.endpoint | indent 1 }} http: - endpoint:{{ .Values.config.receivers.otlp.protocols.endpoint.http | indent 1 }} + endpoint:{{ .Values.config.receivers.otlp.protocols.http.endpoint | indent 1 }} processors: batch: From 8700626747e31aee254be88cc3010907bf1cd852 Mon Sep 17 00:00:00 2001 From: mehul Date: Tue, 19 Nov 2024 23:09:46 +0530 Subject: [PATCH 27/28] removed test config Signed-off-by: mehul --- user-config.yaml | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 user-config.yaml diff --git a/user-config.yaml b/user-config.yaml deleted file mode 100644 index a36349dd..00000000 --- a/user-config.yaml +++ /dev/null @@ -1,44 +0,0 @@ -service: - extensions: [jaeger_storage, jaeger_query, healthcheckv2] - pipelines: - traces: - receivers: [otlp] - processors: [batch] - exporters: [jaeger_storage_exporter] - -extensions: - healthcheckv2: - use_v2: true - http: - endpoint: 0.0.0.0:13133 - - jaeger_query: - storage: - traces: some_storage - traces_archive: another_storage - - - jaeger_storage: - backends: - some_storage: - elasticsearch: - index_prefix: "jaeger-main" - server_urls: ["http://es-elasticsearch:9200"] - - another_storage: - elasticsearch: - index_prefix: "jaeger-archive" - server_urls: ["http://es-elasticsearch:9200"] - -receivers: - otlp: - protocols: - grpc: - http: - -processors: - batch: - -exporters: - jaeger_storage_exporter: - trace_storage: some_storage \ No newline at end of file From 37eb6ecd48eac7373feffc8e1a55607839ff2be2 Mon Sep 17 00:00:00 2001 From: mehul Date: Wed, 20 Nov 2024 00:22:23 +0530 Subject: [PATCH 28/28] updated docs Signed-off-by: mehul --- charts/jaeger/README-v2.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/charts/jaeger/README-v2.md b/charts/jaeger/README-v2.md index 82e50aa1..f4407b4f 100644 --- a/charts/jaeger/README-v2.md +++ b/charts/jaeger/README-v2.md @@ -16,12 +16,6 @@ Jaeger’s all-in-one mode combines the Jaeger Agent, Collector, and Query into ```bash helm install charts/jaeger \ - --set provisionDataStore.cassandra=false \ - --set storage.type=memory \ - --set allInOne.enabled=true \ - --set agent.enabled=false \ - --set collector.enabled=false \ - --set query.enabled=false \ --set-file userconfig=path/to/configfile.yaml # Optional: user-specific config ``` @@ -46,14 +40,17 @@ This mode configures Jaeger to store trace data in an Elasticsearch backend, sui ```bash helm install charts/jaeger \ - --set provisionDataStore.cassandra=false \ --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 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 ``` @@ -62,9 +59,12 @@ This mode configures Jaeger to store trace data in an Elasticsearch backend, sui ```bash helm install charts/jaeger \ - --set provisionDataStore.cassandra=false \ --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 ```