Skip to content

Commit

Permalink
Jaeger allInOne allow different storage types (jaegertracing#603)
Browse files Browse the repository at this point in the history
Signed-off-by: Reddysekhar Gaduputi <[email protected]>

upgrade jaeger-operator to latest 1.61.0 (jaegertracing#605)

Signed-off-by: Blair Bowden <[email protected]>

added all-in-one deployment and configmap for jaeger-v2

Signed-off-by: Mehul <[email protected]>

lint fix

Signed-off-by: Mehul <[email protected]>

fixed

Signed-off-by: Mehul <[email protected]>

lint fix

Signed-off-by: Mehul <[email protected]>

lint fix

Signed-off-by: Mehul <[email protected]>

fixed using pre-hook

Signed-off-by: Mehul <[email protected]>

fixed --config flag is not been passed

Signed-off-by: mehul <[email protected]>

release ns for config-map.yaml

Signed-off-by: mehul <[email protected]>

testing ci

Signed-off-by: mehul <[email protected]>

testing ci

Signed-off-by: mehul <[email protected]>

fixed ns

Signed-off-by: mehul <[email protected]>

fixed ns

Signed-off-by: mehul <[email protected]>

fixed template

Signed-off-by: mehul <[email protected]>

removed sampling

Signed-off-by: mehul <[email protected]>

removed adaptive sampling from processors

Signed-off-by: mehul <[email protected]>

Revert "Jaeger v2 test2"

Signed-off-by: mehul <[email protected]>

attempt to create v2 chart in v1

Signed-off-by: mehul <[email protected]>

enabled collector query and agent

Signed-off-by: mehul <[email protected]>

version bump

Signed-off-by: mehul <[email protected]>

testing-v2-ci

Signed-off-by: mehul <[email protected]>

testing-v2-ci

Signed-off-by: mehul <[email protected]>

added --helm-extra-set-args flag

Signed-off-by: mehul <[email protected]>

fixed healthcheck port-v2

Signed-off-by: mehul <[email protected]>

Fix health check path

Signed-off-by: Yuri Shkuro <[email protected]>

minor changes

Signed-off-by: mehul <[email protected]>
  • Loading branch information
rgaduput authored and mehul committed Oct 20, 2024
1 parent 2ee81aa commit 22c8ade
Show file tree
Hide file tree
Showing 11 changed files with 294 additions and 18 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/lint-test-v2.yaml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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/[email protected]
if: steps.list-changed.outputs.changed == 'true'

- name: Install kubectl
uses: azure/[email protected]
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"
1 change: 1 addition & 0 deletions charts/jaeger-operator/COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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+ |
Expand Down
4 changes: 2 additions & 2 deletions charts/jaeger-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion charts/jaeger-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | `{}` |
Expand Down
2 changes: 1 addition & 1 deletion charts/jaeger-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

image:
repository: jaegertracing/jaeger-operator
tag: 1.57.0
tag: 1.61.0
pullPolicy: IfNotPresent
imagePullSecrets: []

Expand Down
2 changes: 1 addition & 1 deletion charts/jaeger/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
102 changes: 92 additions & 10 deletions charts/jaeger/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
27 changes: 27 additions & 0 deletions charts/jaeger/templates/allinone-configmap-v2.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
34 changes: 31 additions & 3 deletions charts/jaeger/templates/allinone-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -83,19 +92,29 @@ 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
timeoutSeconds: 1
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
Expand All @@ -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 }}
Expand All @@ -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:
Expand Down
Loading

0 comments on commit 22c8ade

Please sign in to comment.