diff --git a/hack/observability/jaeger/chart/Chart.yaml b/hack/observability/jaeger/chart/Chart.yaml index d5e1484032e..c4fca49f69b 100644 --- a/hack/observability/jaeger/chart/Chart.yaml +++ b/hack/observability/jaeger/chart/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 1.22.0 +appVersion: "1.47" description: Jaeger all-in-one helm chart for Kubernetes home: https://github.com/hansehe/jaeger-all-in-one icon: https://raw.githubusercontent.com/hansehe/jaeger-all-in-one/master/helm/jaeger.png @@ -13,4 +13,4 @@ name: jaeger-all-in-one sources: - https://github.com/hansehe/jaeger-all-in-one type: application -version: 0.1.5 +version: 0.1.11 diff --git a/hack/observability/jaeger/chart/templates/_helpers.tpl b/hack/observability/jaeger/chart/templates/_helpers.tpl index 180494054e2..fc2cc53eb81 100644 --- a/hack/observability/jaeger/chart/templates/_helpers.tpl +++ b/hack/observability/jaeger/chart/templates/_helpers.tpl @@ -37,12 +37,21 @@ Common labels {{- define "jaeger-all-in-one.labels" -}} helm.sh/chart: {{ include "jaeger-all-in-one.chart" . }} {{ include "jaeger-all-in-one.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} +app.kubernetes.io/version: "{{ include "jaeger-all-in-one.jaegerVersion" . }}" app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} +{{/* +Version is either the Chart's AppVersion or the image versionOverride, if specified +*/}} +{{- define "jaeger-all-in-one.jaegerVersion" -}} +{{- if ne .Values.image.versionOverride "*" -}} +{{- .Values.image.versionOverride -}} +{{- else -}} +{{ .Chart.AppVersion }} +{{- end -}} +{{- end -}} + {{/* Selector labels */}} diff --git a/hack/observability/jaeger/chart/templates/ingress.yaml b/hack/observability/jaeger/chart/templates/ingress.yaml index 6a0781204e2..efdb8c93d95 100644 --- a/hack/observability/jaeger/chart/templates/ingress.yaml +++ b/hack/observability/jaeger/chart/templates/ingress.yaml @@ -2,7 +2,14 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "jaeger-all-in-one.fullname" . -}} {{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: networking.k8s.io/v1beta1 {{- else -}} apiVersion: extensions/v1beta1 @@ -10,6 +17,7 @@ apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ $fullName }} + namespace: {{ .Release.Namespace }} labels: {{- include "jaeger-all-in-one.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} @@ -17,27 +25,40 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: -{{- if .Values.ingress.tls }} + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} tls: - {{- range .Values.ingress.tls }} + {{- range .Values.ingress.tls }} - hosts: - {{- range .hosts }} + {{- range .hosts }} - {{ . | quote }} - {{- end }} + {{- end }} secretName: {{ .secretName }} + {{- end }} {{- end }} -{{- end }} rules: - {{- range .Values.ingress.hosts }} + {{- range .Values.ingress.hosts }} - host: {{ .host | quote }} http: paths: - {{- range .paths }} - - path: {{ . }} + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} serviceName: {{ $fullName }} servicePort: {{ $svcPort }} - {{- end }} - {{- end }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} {{- end }} -{{- end }} \ No newline at end of file diff --git a/hack/observability/jaeger/chart/templates/jaeger-volume.yaml b/hack/observability/jaeger/chart/templates/jaeger-volume.yaml index b9e93b3dc8b..1cd8cbc2a23 100644 --- a/hack/observability/jaeger/chart/templates/jaeger-volume.yaml +++ b/hack/observability/jaeger/chart/templates/jaeger-volume.yaml @@ -4,6 +4,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: {{ include "jaeger-all-in-one.fullname" . }} + namespace: {{ .Release.Namespace }} spec: {{- if .Values.volume.className }} storageClassName: {{ .Values.volume.className }} @@ -14,4 +15,4 @@ spec: requests: storage: {{ .Values.volume.size }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/hack/observability/jaeger/chart/templates/service-headless.yaml b/hack/observability/jaeger/chart/templates/service-headless.yaml index f77017a50a8..6ebf6795272 100644 --- a/hack/observability/jaeger/chart/templates/service-headless.yaml +++ b/hack/observability/jaeger/chart/templates/service-headless.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "jaeger-all-in-one.fullname" . }}-headless + namespace: {{ .Release.Namespace }} labels: {{- include "jaeger-all-in-one.labels" . | nindent 4 }} {{- with .Values.service.headless.annotations }} @@ -28,6 +29,16 @@ spec: targetPort: http-configs protocol: TCP name: http-configs + {{- if .Values.enableHttpOpenTelemetryCollector }} + - port: 4317 + targetPort: http-otlp-grpc + protocol: TCP + name: http-otlp-grpc + - port: 4318 + targetPort: http-otlp + protocol: TCP + name: http-otlp + {{- end }} - port: {{ .Values.service.port }} targetPort: http-ui protocol: TCP @@ -49,7 +60,7 @@ spec: targetPort: http-zipkin protocol: TCP name: http-zipkin - {{- end }} + {{- end }} selector: {{- include "jaeger-all-in-one.selectorLabels" . | nindent 4 }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/hack/observability/jaeger/chart/templates/service.yaml b/hack/observability/jaeger/chart/templates/service.yaml index df7a7903222..c238b0fcf5a 100644 --- a/hack/observability/jaeger/chart/templates/service.yaml +++ b/hack/observability/jaeger/chart/templates/service.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "jaeger-all-in-one.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "jaeger-all-in-one.labels" . | nindent 4 }} {{- with .Values.service.annotations }} @@ -28,6 +29,16 @@ spec: targetPort: http-configs protocol: TCP name: http-configs + {{- if .Values.enableHttpOpenTelemetryCollector }} + - port: 4317 + targetPort: http-otlp-grpc + protocol: TCP + name: http-otlp-grpc + - port: 4318 + targetPort: http-otlp + protocol: TCP + name: http-otlp + {{- end }} - port: {{ .Values.service.port }} targetPort: http-ui protocol: TCP @@ -49,7 +60,7 @@ spec: targetPort: http-zipkin protocol: TCP name: http-zipkin - {{- end }} + {{- end }} selector: {{- include "jaeger-all-in-one.selectorLabels" . | nindent 4 }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/hack/observability/jaeger/chart/templates/serviceaccount.yaml b/hack/observability/jaeger/chart/templates/serviceaccount.yaml index 4d60e1566df..146ac8fd3a5 100644 --- a/hack/observability/jaeger/chart/templates/serviceaccount.yaml +++ b/hack/observability/jaeger/chart/templates/serviceaccount.yaml @@ -4,7 +4,8 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "jaeger-all-in-one.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} labels: {{ include "jaeger-all-in-one.labels" . | nindent 4 }} {{- end -}} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/hack/observability/jaeger/chart/templates/statefulset.yaml b/hack/observability/jaeger/chart/templates/statefulset.yaml index c32881ed62c..cc17c9e1f72 100644 --- a/hack/observability/jaeger/chart/templates/statefulset.yaml +++ b/hack/observability/jaeger/chart/templates/statefulset.yaml @@ -3,6 +3,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ include "jaeger-all-in-one.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "jaeger-all-in-one.labels" . | nindent 4 }} spec: @@ -38,7 +39,7 @@ spec: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" + image: "{{ .Values.image.repository }}:{{ include "jaeger-all-in-one.jaegerVersion" . }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: udp-com-thr @@ -53,6 +54,14 @@ spec: - name: http-configs containerPort: 5778 protocol: TCP + {{- if .Values.enableHttpOpenTelemetryCollector }} + - name: http-otlp-grpc + containerPort: 4317 + protocol: TCP + - name: http-otlp + containerPort: 4318 + protocol: TCP + {{- end }} - name: http-ui containerPort: 16686 protocol: TCP @@ -69,7 +78,7 @@ spec: - name: http-zipkin containerPort: 9411 protocol: TCP - {{- end }} + {{- end }} {{- if .Values.volume.enabled }} volumeMounts: - mountPath: "/badger" @@ -90,10 +99,14 @@ spec: - name: {{ $key }} value: {{ $value | quote }} {{- end }} + {{- if .Values.enableHttpOpenTelemetryCollector }} + - name: COLLECTOR_OTLP_ENABLED + value: "true" + {{- end }} {{- if .Values.enableHttpZipkinCollector }} - name: COLLECTOR_ZIPKIN_HOST_PORT - value: "9411" - {{- end }} + value: ":9411" + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/hack/observability/jaeger/chart/templates/tests/test-connection.yaml b/hack/observability/jaeger/chart/templates/tests/test-connection.yaml index ed0bbc9e68b..df151bc3fe6 100644 --- a/hack/observability/jaeger/chart/templates/tests/test-connection.yaml +++ b/hack/observability/jaeger/chart/templates/tests/test-connection.yaml @@ -1,3 +1,4 @@ +{{- if .Values.tests.enabled }} apiVersion: v1 kind: Pod metadata: @@ -13,3 +14,4 @@ spec: command: ['wget'] args: ['{{ include "jaeger-all-in-one.fullname" . }}:{{ .Values.service.port }}'] restartPolicy: Never +{{- end }} diff --git a/hack/observability/jaeger/chart/values.yaml b/hack/observability/jaeger/chart/values.yaml index acc581f55c6..fd31847bafe 100644 --- a/hack/observability/jaeger/chart/values.yaml +++ b/hack/observability/jaeger/chart/values.yaml @@ -8,6 +8,7 @@ replicaCount: 1 image: repository: jaegertracing/all-in-one pullPolicy: IfNotPresent + versionOverride: "*" healthCheckUrl: / imagePullSecrets: [] @@ -22,6 +23,7 @@ environmentVariables: BADGER_DIRECTORY_KEY: /badger/key enableHttpZipkinCollector: false +enableHttpOpenTelemetryCollector: false serviceAccount: # Specifies whether a service account should be created @@ -30,7 +32,7 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: -podAnnotations: +podAnnotations: prometheus.io/scrape: "true" prometheus.io/path: "/metrics" prometheus.io/port: "14269" @@ -57,19 +59,21 @@ service: ingress: enabled: false + className: "" annotations: {} # kubernetes.io/ingress.class: nginx # cert-manager.io/cluster-issuer: letsencrypt # nginx.ingress.kubernetes.io/force-ssl-redirect: "true" # nginx.ingress.kubernetes.io/from-to-www-redirect: "true" - hosts: [] - # - host: jaeger.localhost - # paths: - # - / + hosts: + - host: jaeger.local + paths: + - path: / + pathType: ImplementationSpecific tls: [] - # - secretName: tls-secret - # hosts: - # - jaeger.localhost + # - secretName: jaeger-tls + # hosts: + # - jaeger.local resources: {} # We usually recommend not to specify default resources and to leave this as a conscious @@ -92,4 +96,7 @@ affinity: {} volume: enabled: true className: "" - size: 3Gi \ No newline at end of file + size: 3Gi + +tests: + enabled: true diff --git a/hack/observability/jaeger/fetch-jaeger-resources.sh b/hack/observability/jaeger/fetch-jaeger-resources.sh index cd5e08d0013..9fb6180621d 100755 --- a/hack/observability/jaeger/fetch-jaeger-resources.sh +++ b/hack/observability/jaeger/fetch-jaeger-resources.sh @@ -18,7 +18,7 @@ set -o errexit set -o nounset set -o pipefail -CHART_RELEASE=${CHART_RELEASE:-0.1.5} +CHART_RELEASE=${CHART_RELEASE:-0.1.11} JAEGER_ROOT=$(dirname "${BASH_SOURCE[0]}") CHART_ROOT=$JAEGER_ROOT/chart