From ccd0582780a54c0f80032305d1f90d6e71674336 Mon Sep 17 00:00:00 2001 From: Carsten Lohmann Date: Tue, 30 Jan 2024 23:34:20 +0100 Subject: [PATCH] [#522] Add useLegacyTraceContextFormat property in values.yaml. --- charts/hono/README.md | 2 ++ charts/hono/templates/_helpers.tpl | 4 +++- .../hono-service-command-router-secret.yaml | 3 ++- charts/hono/values.yaml | 10 +++++++++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/charts/hono/README.md b/charts/hono/README.md index 3889b119..3d9d7b3f 100644 --- a/charts/hono/README.md +++ b/charts/hono/README.md @@ -106,6 +106,8 @@ The command removes all the Kubernetes components associated with the chart and * Use Hono 2.5.0 container images. * Update bitnami/kafka chart to version 26.8.x which uses Kafka 3.6 in Kraft mode. * Update to latest MongoDB chart version 13.x. +* Add a `useLegacyAmqpTraceContextFormat` configuration property, allowing usage of a more generic format + for storing OpenTelemetry trace context information in messages exchanged with an AMQP messaging network. ### 2.5.6 diff --git a/charts/hono/templates/_helpers.tpl b/charts/hono/templates/_helpers.tpl index 76d13556..a4b356d2 100644 --- a/charts/hono/templates/_helpers.tpl +++ b/charts/hono/templates/_helpers.tpl @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2019 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. @@ -266,6 +266,7 @@ messaging: certPath: {{ .dot.Values.adapters.amqpMessagingNetworkSpec.certPath | quote }} trustStorePath: {{ .dot.Values.adapters.amqpMessagingNetworkSpec.trustStorePath | quote }} hostnameVerificationRequired: {{ .dot.Values.adapters.amqpMessagingNetworkSpec.hostnameVerificationRequired }} + useLegacyTraceContextFormat: {{ .dot.Values.useLegacyAmqpTraceContextFormat }} {{- else }} {{- required ".Values.adapters.amqpMessagingNetworkSpec MUST be set if example AMQP Messaging Network is disabled" .dot.Values.adapters.amqpMessagingNetworkSpec | toYaml | nindent 2 }} {{- end }} @@ -372,6 +373,7 @@ command: certPath: {{ .dot.Values.adapters.commandAndControlSpec.certPath | quote }} trustStorePath: {{ .dot.Values.adapters.commandAndControlSpec.trustStorePath | quote }} hostnameVerificationRequired: {{ .dot.Values.adapters.commandAndControlSpec.hostnameVerificationRequired }} + useLegacyTraceContextFormat: {{ .dot.Values.useLegacyAmqpTraceContextFormat }} {{- else }} {{- required ".Values.adapters.commandAndControlSpec MUST be set if example AMQP Messaging Network is disabled" .dot.Values.adapters.commandAndControlSpec | toYaml | nindent 2 }} {{- end -}} diff --git a/charts/hono/templates/hono-service-command-router/hono-service-command-router-secret.yaml b/charts/hono/templates/hono-service-command-router/hono-service-command-router-secret.yaml index 4dab06b2..3963d1c7 100644 --- a/charts/hono/templates/hono-service-command-router/hono-service-command-router-secret.yaml +++ b/charts/hono/templates/hono-service-command-router/hono-service-command-router-secret.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation +# Copyright (c) 2021 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. @@ -88,6 +88,7 @@ stringData: certPath: {{ .Values.adapters.commandAndControlSpec.certPath }} trustStorePath: {{ .Values.adapters.commandAndControlSpec.trustStorePath }} hostnameVerificationRequired: {{ .Values.adapters.commandAndControlSpec.hostnameVerificationRequired }} + useLegacyTraceContextFormat: {{ .Values.useLegacyAmqpTraceContextFormat }} {{- else }} {{- required ".Values.adapters.commandAndControlSpec MUST be set if example AMQP Messaging Network is disabled" .Values.adapters.commandAndControlSpec | toYaml | nindent 8 }} {{- end }} diff --git a/charts/hono/values.yaml b/charts/hono/values.yaml index b020f44d..7c443002 100755 --- a/charts/hono/values.yaml +++ b/charts/hono/values.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2019 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. @@ -105,6 +105,14 @@ serviceType: messagingNetworkTypes: - "kafka" +# useLegacyAmqpTraceContextFormat determines how OpenTelemetry trace context information +# is stored in an AMQP 1.0 message sent to the AMQP Messaging Network. A "true" value here +# configures the format used in previous Hono versions, while setting "false" chooses a more +# generic format (compatible with e.g. Eclipse Ditto). Refer to +# https://www.eclipse.org/hono/docs/admin-guide/hono-client-configuration/ +# for the documentation of the corresponding "useLegacyTraceContextFormat" Hono client property. +useLegacyAmqpTraceContextFormat: true + # Configuration properties for protocol adapters. adapters: