Skip to content

Commit

Permalink
Request more memory for embedded device registry type
Browse files Browse the repository at this point in the history
The JDBC based registry, when used with an embedded H2 DB, will require
more memory to accommodate the additional H2 DB functionality.

The resource requests and limits of the device registry can now also be
set at the particular registry type level, falling back to the default
values specified at the registry example level.

Signed-off-by: Kai Hudalla <[email protected]>
  • Loading branch information
sophokles73 committed Jun 2, 2021
1 parent 96debc8 commit b798a1a
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/hono/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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: 1.8.2
version: 1.8.3
# Version of Hono being deployed by the chart
appVersion: 1.8.0
keywords:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ spec:
{{- include "hono.container.secretVolumeMounts" ( dict "name" $args.name "componentConfig" .Values.deviceRegistryExample ) | indent 8 }}
- name: "registry"
mountPath: "/var/lib/hono/device-registry"
{{- with .Values.deviceRegistryExample.resources }}
{{- with ( default .Values.deviceRegistryExample.resources $args.componentConfig.resources ) }}
resources:
{{- . | toYaml | nindent 10 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ spec:
{{- include "hono.container.secretVolumeMounts" ( dict "name" $args.name "componentConfig" .Values.deviceRegistryExample ) | indent 8 }}
- name: "registry"
mountPath: "/var/lib/hono/device-registry"
{{- with .Values.deviceRegistryExample.resources }}
{{- with ( default .Values.deviceRegistryExample.resources $args.componentConfig.resources ) }}
resources:
{{- . | toYaml | nindent 10 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
privileged: false
volumeMounts:
{{- include "hono.container.secretVolumeMounts" ( dict "name" $args.name "componentConfig" .Values.deviceRegistryExample ) | indent 8 }}
{{- with .Values.deviceRegistryExample.resources }}
{{- with ( default .Values.deviceRegistryExample.resources $args.componentConfig.resources ) }}
resources:
{{- . | toYaml | nindent 10 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
privileged: false
volumeMounts:
{{- include "hono.container.secretVolumeMounts" ( dict "name" $args.name "componentConfig" .Values.deviceRegistryExample ) | indent 8 }}
{{- with .Values.deviceRegistryExample.resources }}
{{- with ( default .Values.deviceRegistryExample.resources $args.componentConfig.resources ) }}
resources:
{{- . | toYaml | nindent 10 }}
{{- end }}
Expand Down
24 changes: 24 additions & 0 deletions charts/hono/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,10 @@ deviceRegistryExample:
# configuration property of the component's readiness probe.
# The value of the top level "readinessProbeInitialDelaySeconds" property will be used if not set.
readinessProbeInitialDelaySeconds:
# If not specified here, then the values from "deviceRegistryExample.resources" are used.
# Refer to https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
# for a description of the properties' semantics.
resources:

# embeddedJdbcDeviceRegistry contains configuration properties specific to the
# embedded JDBC device registry.
Expand Down Expand Up @@ -1257,6 +1261,18 @@ deviceRegistryExample:
# configuration property of the component's readiness probe.
# The value of the top level "readinessProbeInitialDelaySeconds" property will be used if not set.
readinessProbeInitialDelaySeconds:
# resources contains the container's requests and limits for CPU and memory
# as defined by the Kubernetes API.
# If not specified here, then the values from "deviceRegistryExample.resources" are used.
# Refer to https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
# for a description of the properties' semantics.
resources:
requests:
cpu: "200m"
memory: "400Mi"
limits:
cpu: "1"
memory: "500Mi"

# mongoDBBasedDeviceRegistry contains configuration properties specific to the
# MongoDB based device registry.
Expand All @@ -1282,6 +1298,10 @@ deviceRegistryExample:
# configuration property of the component's readiness probe.
# The value of the top level "readinessProbeInitialDelaySeconds" property will be used if not set.
readinessProbeInitialDelaySeconds:
# If not specified here, then the values from "deviceRegistryExample.resources" are used.
# Refer to https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
# for a description of the properties' semantics.
resources:
# mongodb contains the configuration properties to connect to the MongoDB database instance.
# If you would like to use an already existing MongoDB database instance, then configure
# the below section accordingly.
Expand Down Expand Up @@ -1321,6 +1341,10 @@ deviceRegistryExample:
# configuration property of the component's readiness probe.
# The value of the top level "readinessProbeInitialDelaySeconds" property will be used if not set.
readinessProbeInitialDelaySeconds:
# If not specified here, then the values from "deviceRegistryExample.resources" are used.
# Refer to https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
# for a description of the properties' semantics.
resources:
# registry.jdbc contains the configuration properties for device registry
# to connect to the database.
registry:
Expand Down

0 comments on commit b798a1a

Please sign in to comment.