-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jaeger v2 with v1 #609
Jaeger v2 with v1 #609
Changes from 6 commits
22c8ade
7212b86
9e73b35
0dd3924
f7db758
b980560
d9aa942
01d341b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ appVersion: 1.53.0 | |
description: A Jaeger Helm chart for Kubernetes | ||
name: jaeger | ||
type: application | ||
version: 3.3.1 | ||
version: 3.3.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be a major chart version as per the above comment, IMHO. |
||
# CronJobs require v1.21 | ||
kubeVersion: ">= 1.21-0" | ||
keywords: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" -}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again, there shouldn't be any |
||
{{- 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 | ||
*/}} | ||
|
@@ -719,3 +733,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" -}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why any of these changes below necessary? Doesn't the chart already have them all for v1? Can we not reuse the same variables? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes that is what i planed to do once i was sure that i was going in the right direction with v-2 deployment and config part |
||
{{- 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 }} |
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 }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I recommend not using templates here - all they do is resolve to a single line, it's better for readability to just inline that line here. |
||
receivers: | ||
{{- include "jaeger-v2.receiversConfig" . | nindent 6 }} | ||
processors: | ||
{{- include "jaeger-v2.processorsConfig" . | nindent 6 }} | ||
exporters: | ||
{{- include "jaeger-v2.exportersConfig" . | nindent 6 }} | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,13 +54,22 @@ spec: | |
{{- end }} | ||
securityContext: | ||
{{- toYaml .Values.allInOne.securityContext | nindent 12 }} | ||
{{- if .Values.v2.enabled }} | ||
yurishkuro marked this conversation as resolved.
Show resolved
Hide resolved
|
||
image: {{ include "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 }} | ||
yurishkuro marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- "{{ tpl $arg $ }}" | ||
{{- end }} | ||
{{- end }} | ||
ports: | ||
- containerPort: 5775 | ||
protocol: UDP | ||
|
@@ -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 | ||
|
@@ -105,6 +124,10 @@ spec: | |
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
volumeMounts: | ||
{{- if .Values.v2.enabled }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we should assume that v2 is always enabled and the only one we support from now on in the main branch. Then there can be v1 branch respectively. |
||
- 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: | ||
|
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -2,6 +2,66 @@ | |||||||
# This is a YAML-formatted file. | ||||||||
# Jaeger values are grouped by component. Cassandra values override subchart values | ||||||||
|
||||||||
v2: | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's not try to make this branch support both v1 and v2. We already have a chart which support v1, let's focus 100% on v2 from now on. |
||||||||
enabled: false | ||||||||
image: | ||||||||
registry: "" | ||||||||
repository: jaegertracing/jaeger | ||||||||
tag: "2.0.0-rc2" | ||||||||
digest: "" | ||||||||
pullPolicy: IfNotPresent | ||||||||
pullSecrets: [] | ||||||||
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 | ||||||||
|
||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
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 | ||||||||
# The following settings apply to Jaeger v1 and partially to Jaeger v2 | ||||||||
|
||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
global: | ||||||||
imageRegistry: | ||||||||
|
||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that the chart can have a breaking version and from this PR one we can support only V2. You shouldn't try to support both of them in the same code branch. V1 can be in a separate branch we can only update it in case of critical bugs or security issues but it will not be maintained in the long run. People should at some point switch to V2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pavelnikolov can you please propose a more concrete plan as far as organizing the repo? How will helm know about different branches?