Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jaeger v2 with v1 #609

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,5 @@ jobs:
cmctl check api --wait=5m

- name: Run chart-testing (install)
run: ct install --config ct.yaml
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"
4 changes: 2 additions & 2 deletions charts/jaeger/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v2
appVersion: 1.53.0
appVersion: 2.0.0-rc2
description: A Jaeger Helm chart for Kubernetes
name: jaeger
type: application
version: 3.3.1
version: 3.3.2
Copy link
Contributor

Choose a reason for hiding this comment

The 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:
Expand Down
37 changes: 31 additions & 6 deletions charts/jaeger/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -559,17 +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" $) -}}
{{- define "jaeger.imagePullSecrets" -}}
{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.jaeger.image) "context" $) -}}
{{- end }}

{{/*
Expand Down Expand Up @@ -719,3 +719,28 @@ Create pull secrets for hotrod image
{{- define "hotrod.imagePullSecrets" -}}
{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.hotrod.image) "context" $) -}}
{{- end }}


{{- define "jaeger.extensionsConfig" -}}
{{ toYaml .Values.config.extensions | nindent 6 }}
{{- end }}

{{- define "jaeger.receiversConfig" -}}
{{ toYaml .Values.config.receivers | nindent 6 }}
{{- end }}

{{- define "jaeger.processorsConfig" -}}
{{ toYaml .Values.config.processors | nindent 6 }}
{{- end }}

{{- define "jaeger.exportersConfig" -}}
{{ toYaml .Values.config.exporters | nindent 6 }}
{{- end }}

{{- define "jaeger.namespace" -}}
{{- if .Values.namespaceOverride -}}
{{- .Values.namespaceOverride -}}
{{- else -}}
{{- .Release.Namespace -}}
{{- end -}}
{{- end -}}
14 changes: 0 additions & 14 deletions charts/jaeger/templates/allinone-sa.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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
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
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
{{- 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 }}
Expand All @@ -45,22 +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 }}
image: {{ include "allInOne.image" . }}
imagePullPolicy: {{ .Values.allInOne.image.pullPolicy }}
{{- toYaml .Values.jaeger.securityContext | nindent 12 }}
image: {{ include "jaeger.image" . }}
imagePullPolicy: {{ .Values.jaeger.image.pullPolicy }}
name: jaeger
args:
{{- range $arg := .Values.allInOne.args }}
- "{{ tpl $arg $ }}"
{{- end }}
- "--config"
- "/etc/jaeger/config.yaml"
ports:
- containerPort: 5775
protocol: UDP
Expand All @@ -83,74 +82,79 @@ spec:
livenessProbe:
failureThreshold: 5
httpGet:
path: /
port: 14269
scheme: HTTP
path: /status
port: 13133
initialDelaySeconds: 5
periodSeconds: 15
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
failureThreshold: 3
httpGet:
path: /
port: 14269
scheme: HTTP
path: /status
port: 13133
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
{{- with .Values.allInOne.resources }}
{{- with .Values.jaeger.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- name: jaeger-config
mountPath: /etc/jaeger
{{- 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:
- 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.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 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{{- 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
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
{{- 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 -}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.allInOne.enabled -}}
{{- if .Values.jaeger.storage.memory.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -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
Expand All @@ -30,19 +30,19 @@ 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 }}
appProtocol: http
{{- end }}
selector:
{{- include "jaeger.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: all-in-one
app.kubernetes.io/component: jaeger
{{- end -}}
27 changes: 27 additions & 0 deletions charts/jaeger/templates/jaeger-memory-config.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
Original file line number Diff line number Diff line change
@@ -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
data:
strategies.json: |-
{{ tpl .Values.allInOne.samplingConfig . | indent 4 }}
{{ tpl .Values.jaeger.samplingConfig . | indent 4 }}
{{- end }}
Loading
Loading