Skip to content

Commit

Permalink
[#494] add priorityClass support
Browse files Browse the repository at this point in the history
Signed-off-by: Mathias Maes <[email protected]>
  • Loading branch information
WatcherWhale authored and calohmn committed Sep 22, 2023
1 parent 2f8d5cf commit 949e7c3
Show file tree
Hide file tree
Showing 18 changed files with 56 additions and 1 deletion.
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: 2.5.1
version: 2.5.2
# Version of Hono being deployed by the chart
appVersion: 2.4.0
keywords:
Expand Down
5 changes: 5 additions & 0 deletions charts/hono/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ helm uninstall eclipse-hono -n hono
The command removes all the Kubernetes components associated with the chart and deletes the release.

## Release Notes

### 2.5.2

* Allow setting the priorityClass for all pods to have more control over kubernetes scheduling.

### 2.5.1

* Allow customizing the PVC storage size for the Device Registry service.
Expand Down
13 changes: 13 additions & 0 deletions charts/hono/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,19 @@ The scope passed in is expected to be a dict with keys
{{- end }}
{{- end }}

{{/*
Adds a priority class name to a component's pod spec.
The scope passed in is expected to be a dict with keys
- (mandatory) "name": the name of the component
- (mandatory) "componentConfig": the component's configuration properties as defined in .Values
- (mandatory) "dot": the root scope (".")
*/}}
{{- define "hono.pod.priorityClassName" }}
{{- if .componentConfig.pod.priorityClassName }}
priorityClassName: {{ .componentConfig.pod.priorityClassName | quote }}
{{- end }}
{{- end }}

{{/*
Adds port type declarations to a component's service spec.
*/}}
Expand Down
1 change: 1 addition & 0 deletions charts/hono/templates/artemis/artemis-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
containers:
- name: apache-activemq-artemis
image: {{ .Values.amqpMessagingNetworkExample.broker.artemis.imageName | quote }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
containers:
- name: apache-qpid-dispatch-router
image: {{ .Values.amqpMessagingNetworkExample.dispatchRouter.imageName | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/hono/templates/example-data-grid/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
containers:
- image: {{ .Values.dataGridExample.imageName | quote }}
imagePullPolicy: IfNotPresent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
containers:
{{- include "hono.otel.agent" . | indent 6 }}
{{- include "hono.container" $args | indent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
containers:
{{- include "hono.otel.agent" . | indent 6 }}
{{- include "hono.container" $args | indent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
containers:
{{- include "hono.otel.agent" . | indent 6 }}
{{- include "hono.container" $args | indent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
containers:
{{- include "hono.otel.agent" . | indent 6 }}
{{- include "hono.container" $args | indent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
containers:
{{- include "hono.otel.agent" . | indent 6 }}
{{- include "hono.container" $args | indent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
containers:
{{- include "hono.container" $args | indent 6 }}
{{- with $args.componentConfig.cmdLineArgs }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
containers:
{{- include "hono.otel.agent" . | indent 6 }}
{{- include "hono.container" $args | indent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
containers:
{{- include "hono.otel.agent" . | indent 6 }}
{{- include "hono.container" $args | indent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
containers:
{{- include "hono.otel.agent" . | indent 6 }}
{{- include "hono.container" $args | indent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
containers:
{{- include "hono.otel.agent" . | indent 6 }}
{{- include "hono.container" $args | indent 6 }}
Expand Down
1 change: 1 addition & 0 deletions charts/hono/templates/jaeger/jaeger-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
containers:
- name: jaeger
image: {{ .Values.jaegerBackendExample.allInOneImage }}
Expand Down
23 changes: 23 additions & 0 deletions charts/hono/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ adapters:
pod:
labels: {}
annotations: {}
priorityClassName: ""

# extraVolumes contains additional kubernetes Volume definitions representing volumes
# that can mounted into the container's file system.
Expand Down Expand Up @@ -425,6 +426,7 @@ adapters:
pod:
labels: {}
annotations: {}
priorityClassName: ""

# extraVolumes contains additional kubernetes Volume definitions representing volumes
# that can mounted into the container's file system.
Expand Down Expand Up @@ -550,6 +552,7 @@ adapters:
pod:
labels: {}
annotations: {}
priorityClassName: ""

# extraVolumes contains additional kubernetes Volume definitions representing volumes
# that can mounted into the container's file system.
Expand Down Expand Up @@ -677,6 +680,7 @@ adapters:
pod:
labels: {}
annotations: {}
priorityClassName: ""

# extraVolumes contains additional kubernetes Volume definitions representing volumes
# that can mounted into the container's file system.
Expand Down Expand Up @@ -803,6 +807,7 @@ adapters:
pod:
labels: {}
annotations: {}
priorityClassName: ""

# extraVolumes contains additional kubernetes Volume definitions representing volumes
# that can mounted into the container's file system.
Expand Down Expand Up @@ -926,6 +931,7 @@ authServer:
pod:
labels: {}
annotations: {}
priorityClassName: ""

# extraVolumes contains additional kubernetes Volume definitions representing volumes
# that can mounted into the container's file system.
Expand Down Expand Up @@ -1192,6 +1198,7 @@ deviceRegistryExample:
pod:
labels: {}
annotations: {}
priorityClassName: ""

# The configMap to get additional environment variables from for this device registry.
envConfigMap:
Expand Down Expand Up @@ -1249,6 +1256,8 @@ deviceRegistryExample:
limits:
cpu: "1"
memory: "400Mi"


# 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 All @@ -1275,6 +1284,7 @@ deviceRegistryExample:
pod:
labels: {}
annotations: {}
priorityClassName: ""

# jdbcBasedDeviceRegistry contains configuration properties specific to the
# jdbc based device registry.
Expand Down Expand Up @@ -1335,6 +1345,7 @@ deviceRegistryExample:
pod:
labels: {}
annotations: {}
priorityClassName: ""

registry:
jdbc:
Expand Down Expand Up @@ -1488,6 +1499,7 @@ commandRouterService:
pod:
labels: {}
annotations: {}
priorityClassName: ""

# extraVolumes contains additional kubernetes Volume definitions representing volumes
# that can mounted into the container's file system.
Expand Down Expand Up @@ -1850,6 +1862,9 @@ amqpMessagingNetworkExample:
periodSeconds: 5
initialDelaySeconds: 20

pod:
priorityClassName: ""

svc:
annotations: {}
loadBalancerIP:
Expand Down Expand Up @@ -1946,6 +1961,9 @@ amqpMessagingNetworkExample:
cpu: "1"
memory: "600Mi"

pod:
priorityClassName: ""

# extraVolumes contains additional kubernetes Volume definitions representing volumes
# that can mounted into the container's file system.
# The syntax is defined in https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volume-v1-core
Expand Down Expand Up @@ -2016,6 +2034,10 @@ dataGridExample:
limits:
cpu: "1"
memory: "200Mi"

pod:
priorityClassName: ""

# authUsername contains the name of the user that is authorized to connect to the example data grid.
authUsername: "hono"
# authPassword contains the secret of the user that is authorized to connect to the example data grid
Expand Down Expand Up @@ -2066,6 +2088,7 @@ jaegerBackendExample:
pod:
labels: {}
annotations: {}
priorityClassName: ""

# env contains environment variables to set for the Jaeger all-in-one container.
# The default variables configure the container to keep up to 100000 traces in memory.
Expand Down

0 comments on commit 949e7c3

Please sign in to comment.