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

[#522] Update to Hono 2.5.0 #523

Merged
merged 2 commits into from
Feb 12, 2024
Merged
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
10 changes: 5 additions & 5 deletions charts/hono/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -15,9 +15,9 @@ name: hono
description: |
Eclipse Hono™ provides remote service interfaces for connecting large numbers of IoT devices to a back end and
interacting with them in a uniform way regardless of the device communication protocol.
version: 2.5.6
version: 2.6.0
# Version of Hono being deployed by the chart
appVersion: 2.4.0
appVersion: 2.5.0
keywords:
- iot-chart
- IoT
Expand Down Expand Up @@ -46,9 +46,9 @@ dependencies:
condition: "grafana.enabled"
- name: "mongodb"
repository: "oci://registry-1.docker.io/bitnamicharts"
version: "~13.16.x"
version: "~13.x"
condition: "mongodb.createInstance"
- name: "kafka"
repository: "oci://registry-1.docker.io/bitnamicharts"
version: "^21.x"
version: "^26.8"
condition: "kafkaMessagingClusterExample.enabled"
26 changes: 16 additions & 10 deletions charts/hono/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,17 @@ Kubernetes *Services*. The following command lists all services and their endpoi
kubectl get service -n hono

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
eclipse-hono-adapter-amqp LoadBalancer 10.99.197.79 127.0.0.1 5672:32672/TCP,5671:32671/TCP 2m30s
eclipse-hono-adapter-http LoadBalancer 10.102.247.45 127.0.0.1 8080:30080/TCP,8443:30443/TCP 2m29s
eclipse-hono-adapter-mqtt LoadBalancer 10.98.68.57 127.0.0.1 1883:31883/TCP,8883:30883/TCP 2m29s
eclipse-hono-kafka ClusterIP 10.104.176.12 <none> 9092/TCP 2m30s
eclipse-hono-kafka-0-external LoadBalancer 10.98.132.252 127.0.0.1 9094:32094/TCP 2m29s
eclipse-hono-kafka-headless ClusterIP None <none> 9092/TCP,9093/TCP 2m30s
eclipse-hono-service-auth ClusterIP 10.99.220.217 <none> 5671/TCP 2m29s
eclipse-hono-adapter-amqp LoadBalancer 10.99.197.79 127.0.0.1 5671:32671/TCP 2m30s
eclipse-hono-adapter-http LoadBalancer 10.102.247.45 127.0.0.1 8443:30443/TCP 2m29s
eclipse-hono-adapter-mqtt LoadBalancer 10.98.68.57 127.0.0.1 8883:30883/TCP 2m29s
eclipse-hono-kafka ClusterIP 10.104.176.12 <none> 9092/TCP,9095/TCP 2m30s
eclipse-hono-kafka-controller0-external LoadBalancer 10.98.132.252 127.0.0.1 9094:32094/TCP 2m29s
eclipse-hono-kafka-controller-headless ClusterIP None <none> 9094/TCP,9092/TCP,9093/TCP 2m30s
eclipse-hono-service-auth ClusterIP 10.99.220.217 <none> 5671/TCP,8088/TCP 2m29s
eclipse-hono-service-command-router ClusterIP 10.98.52.92 <none> 5671/TCP 2m29s
eclipse-hono-service-device-registry ClusterIP 10.109.46.233 <none> 5671/TCP,8080/TCP,8443/TCP 2m29s
eclipse-hono-service-device-registry-ext LoadBalancer 10.97.217.173 127.0.0.1 28080:31080/TCP,28443:31443/TCP 2m29s
eclipse-hono-service-device-registry-ext LoadBalancer 10.97.217.173 127.0.0.1 28443:31443/TCP 2m29s
eclipse-hono-service-device-registry-headless ClusterIP None <none> <none> 2m30s
eclipse-hono-zookeeper ClusterIP 10.104.9.153 <none> 2181/TCP,2888/TCP,3888/TCP 2m29s
eclipse-hono-zookeeper-headless ClusterIP None <none> 2181/TCP,2888/TCP,3888/TCP 2m30s
```

The listing above has been retrieved from a Minikube cluster that emulates a load balancer via the `minikube tunnel`
Expand Down Expand Up @@ -103,6 +101,14 @@ The command removes all the Kubernetes components associated with the chart and

## Release Notes

### 2.6.0

* 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

* Update bitnami/kafka chart to version 21.x which uses Kafka 3.4.
Expand Down
10 changes: 2 additions & 8 deletions charts/hono/ci/datagrid-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020, 2022 Contributors to the Eclipse Foundation
# Copyright (c) 2020 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -24,13 +24,7 @@ dataGridExample:

kafka:
externalAccess:
autoDiscovery:
enabled: false
service:
type: "NodePort"
# length of the array must match replicaCount
nodePorts:
- "32094"
enabled: false
serviceAccount:
create: false
rbac:
Expand Down
10 changes: 2 additions & 8 deletions charts/hono/ci/mongodb-based-device-registry-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020, 2022 Contributors to the Eclipse Foundation
# Copyright (c) 2020 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand Down Expand Up @@ -30,13 +30,7 @@ mongodb:

kafka:
externalAccess:
autoDiscovery:
enabled: false
service:
type: "NodePort"
# length of the array must match replicaCount
nodePorts:
- "32094"
enabled: false
serviceAccount:
create: false
rbac:
Expand Down
23 changes: 15 additions & 8 deletions charts/hono/ci/quarkus-native-images-values.yaml
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -25,13 +25,7 @@ dataGridExample:

kafka:
externalAccess:
autoDiscovery:
enabled: false
service:
type: "NodePort"
# length of the array must match replicaCount
nodePorts:
- "32094"
enabled: false
serviceAccount:
create: false
rbac:
Expand Down Expand Up @@ -61,6 +55,19 @@ commandRouterService:
cpu:
memory: "120Mi"

deviceRegistryExample:
embeddedJdbcDeviceRegistry:
imageName: "eclipse/hono-service-device-registry-jdbc-native"
cmdLineArgs:
- "-Xmx160m"
resources:
requests:
cpu:
memory: "120Mi"
limits:
cpu:
memory: "120Mi"

adapters:
amqp:
enabled: false
Expand Down
11 changes: 4 additions & 7 deletions charts/hono/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ NAME {{ "READY STATUS RESTARTS AGE"
{{ include "hono.fullname" . }}-dispatch-router-6c77dc78bd-hjn4l 1/1 Running 0 5m51s
{{- end }}
{{- if ( has "kafka" .Values.messagingNetworkTypes ) }}
{{ include "hono.fullname" . }}-kafka-0 1/1 Running 0 5m51s
{{ include "hono.fullname" . }}-kafka-controller-0 1/1 Running 0 5m51s
{{- end }}
{{- if all .Values.deviceRegistryExample.enabled ( eq .Values.deviceRegistryExample.type "mongodb" ) }}
{{ include "hono.fullname" . }}-monogodb-server-77ffb85c97-78554 1/1 Running 0 5m51s
Expand All @@ -47,9 +47,6 @@ NAME {{ "READY STATUS RESTARTS AGE"
{{ include "hono.fullname" . }}-service-device-registry-64d645dd9c-q9c5q 1/1 Running 0 5m51s
{{- end }}
{{- end }}
{{- if ( has "kafka" .Values.messagingNetworkTypes ) }}
{{ include "hono.fullname" . }}-zookeeper-0 1/1 Running 0 5m51s
{{- end }}

Once all pods have reached the READY state, you can start using Hono.

Expand All @@ -58,15 +55,15 @@ https://eclipse.dev/hono/docs/getting-started/

{{- if ( has "kafka" .Values.messagingNetworkTypes ) }}
{{- if .Values.kafkaMessagingClusterExample.enabled }}
{{- $isKafkaTlsEnabled := ( eq .Values.kafka.auth.clientProtocol "sasl_tls" ) }}
{{- $isKafkaTlsEnabled := ( eq .Values.kafka.listeners.external.protocol "SASL_SSL" ) }}
Hono is configured with an example Kafka cluster for messaging. Clients can connect to the
example Kafka cluster using the configuration properties below.
Please refer to the guide mentioned above for details on how to determine the values for
$KAFKA_IP{{ if $isKafkaTlsEnabled }} and $KAFKA_TRUSTSTORE_PATH{{ end }}.

bootstrap.servers=$KAFKA_IP:{{ .Values.kafka.externalAccess.service.ports.external }}
bootstrap.servers=$KAFKA_IP:{{ .Values.kafka.externalAccess.controller.service.ports.external }}
sasl.mechanism=SCRAM-SHA-512
sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="{{ first .Values.kafka.auth.sasl.jaas.clientUsers }}" password="{{ first .Values.kafka.auth.sasl.jaas.clientPasswords }}";
sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="{{ first .Values.kafka.sasl.client.users }}" password="{{ first .Values.kafka.sasl.client.passwords }}";
{{- if $isKafkaTlsEnabled }}
security.protocol=SASL_SSL
ssl.endpoint.identification.algorithm=""
Expand Down
26 changes: 14 additions & 12 deletions charts/hono/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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 }}
Expand All @@ -286,21 +287,21 @@ The scope passed in is expected to be a dict with keys
kafka:
{{- if .dot.Values.kafkaMessagingClusterExample.enabled }}
commonClientConfig:
{{- $bootstrapServers := printf "%[1]s-0.%[1]s-headless:%d" ( include "common.names.fullname" .dot.Subcharts.kafka ) ( .dot.Values.kafka.service.ports.client | int ) }}
{{- $bootstrapServers := printf "%[1]s-%[2]s-controller-headless:%d" .dot.Release.Name .dot.Values.kafka.nameOverride ( .dot.Values.kafka.service.ports.client | int ) }}
bootstrap.servers: {{ $bootstrapServers | quote }}
{{- if eq .dot.Values.kafka.auth.clientProtocol "sasl_tls" }}
{{- if eq .dot.Values.kafka.listeners.client.protocol "SASL_SSL" }}
security.protocol: "SASL_SSL"
sasl.mechanism: "SCRAM-SHA-512"
sasl.jaas.config: "org.apache.kafka.common.security.scram.ScramLoginModule required username=\"{{ first .dot.Values.kafka.auth.sasl.jaas.clientUsers }}\" password=\"{{ first .dot.Values.kafka.auth.sasl.jaas.clientPasswords }}\";"
sasl.jaas.config: "org.apache.kafka.common.security.scram.ScramLoginModule required username=\"{{ first .dot.Values.kafka.sasl.client.users }}\" password=\"{{ first .dot.Values.kafka.sasl.client.passwords }}\";"
ssl.truststore.type: "PEM"
ssl.truststore.location: "/opt/hono/tls/ca.crt"
ssl.endpoint.identification.algorithm: "" # Disables hostname verification. Don't do this in productive setups!
{{- else if eq .dot.Values.kafka.auth.clientProtocol "sasl" }}
{{- else if eq .dot.Values.kafka.listeners.client.protocol "SASL_PLAINTEXT" }}
security.protocol: "SASL_PLAINTEXT"
sasl.mechanism: "SCRAM-SHA-512"
sasl.jaas.config: "org.apache.kafka.common.security.scram.ScramLoginModule required username=\"{{ first .dot.Values.kafka.auth.sasl.jaas.clientUsers }}\" password=\"{{ first .dot.Values.kafka.auth.sasl.jaas.clientPasswords }}\";"
sasl.jaas.config: "org.apache.kafka.common.security.scram.ScramLoginModule required username=\"{{ first .dot.Values.kafka.sasl.client.users }}\" password=\"{{ first .dot.Values.kafka.sasl.client.passwords }}\";"
{{- else }}
{{- required ".Values.kafka.auth.clientProtocol has unsupported value" nil }}
{{- required ".Values.kafka.listeners.client.protocol has unsupported value" nil }}
{{- end }}
{{- else }}
{{- $bootstrapServers := dig "kafkaMessagingSpec" "commonClientConfig" "bootstrap.servers" "" . }}
Expand All @@ -324,13 +325,13 @@ The scope passed in is expected to be a dict with keys
- (mandatory) "dot": the root scope (".")
*/}}
{{- define "hono.kafkaConfigCheck" -}}
{{- if and (has "kafka" .dot.Values.messagingNetworkTypes) .dot.Values.kafkaMessagingClusterExample.enabled }}
{{- if and (has "kafka" .dot.Values.messagingNetworkTypes) .dot.Values.kafkaMessagingClusterExample.enabled .dot.Values.kafka.externalAccess.enabled }}
{{- if .dot.Values.useLoadBalancer }}
{{- if not (eq .dot.Values.kafka.externalAccess.service.type "LoadBalancer") }}
{{- required ".Values.kafka.externalAccess.service.type MUST be 'LoadBalancer' if .Values.useLoadBalancer is true" nil }}
{{- if not (and (eq .dot.Values.kafka.externalAccess.controller.service.type "LoadBalancer") (eq .dot.Values.kafka.externalAccess.broker.service.type "LoadBalancer") )}}
{{- required ".Values.kafka.externalAccess.(controller|broker).service.type MUST be 'LoadBalancer' if .Values.useLoadBalancer is true" nil }}
{{- end }}
{{- else if not (eq .dot.Values.kafka.externalAccess.service.type "NodePort") }}
{{- required ".Values.kafka.externalAccess.service.type MUST be 'NodePort' if .Values.useLoadBalancer is false" nil }}
{{- else if not (and (eq .dot.Values.kafka.externalAccess.controller.service.type "NodePort") (eq .dot.Values.kafka.externalAccess.broker.service.type "NodePort") )}}
{{- required ".Values.kafka.externalAccess.(controller|broker).service.type MUST be 'NodePort' if .Values.useLoadBalancer is false" nil }}
{{- end }}
{{- end }}
{{- end }}
Expand Down Expand Up @@ -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 -}}
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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 }}
Expand Down
Loading
Loading