Skip to content

Commit

Permalink
Add service account for Hono adapter pods.
Browse files Browse the repository at this point in the history
Signed-off-by: Carsten Lohmann <[email protected]>
  • Loading branch information
calohmn committed Sep 22, 2023
1 parent ce36e7e commit 09b42cd
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 6 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: 2.5.3
version: 2.5.4
# Version of Hono being deployed by the chart
appVersion: 2.4.0
keywords:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if .Values.adapters.amqp.enabled }}
#
# Copyright (c) 2019, 2022 Contributors to the Eclipse Foundation
# Copyright (c) 2019, 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand Down Expand Up @@ -36,6 +36,7 @@ spec:
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
{{- include "hono.pod.affinity" $args | nindent 6 }}
serviceAccountName: {{ printf "%s-%s" ( include "hono.fullname" . ) "adapter" | quote }}
containers:
{{- include "hono.otel.agent" . | indent 6 }}
{{- include "hono.container" $args | indent 6 }}
Expand Down
21 changes: 21 additions & 0 deletions charts/hono/templates/hono-adapter-base/hono-adapter-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# Copyright (c) 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
#
{{- $args := dict "dot" . "name" "adapter" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
{{- include "hono.metadata" $args | nindent 2 }}
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# Copyright (c) 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
#
{{- $args := dict "dot" . "name" "adapter" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
{{- include "hono.metadata" $args | nindent 2 }}
roleRef:
kind: Role
name: {{ printf "%s-%s" ( include "hono.fullname" . ) $args.name | quote }}
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: {{ printf "%s-%s" ( include "hono.fullname" . ) $args.name | quote }}
namespace: {{ .Release.Namespace }}
17 changes: 17 additions & 0 deletions charts/hono/templates/hono-adapter-base/hono-adapter-sa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Copyright (c) 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
#
{{- $args := dict "dot" . "name" "adapter" }}
apiVersion: v1
kind: ServiceAccount
metadata:
{{- include "hono.metadata" $args | nindent 2 }}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if .Values.adapters.coap.enabled }}
#
# Copyright (c) 2019, 2022 Contributors to the Eclipse Foundation
# Copyright (c) 2019, 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand Down Expand Up @@ -36,6 +36,7 @@ spec:
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
{{- include "hono.pod.affinity" $args | nindent 6 }}
serviceAccountName: {{ printf "%s-%s" ( include "hono.fullname" . ) "adapter" | quote }}
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
@@ -1,6 +1,6 @@
{{- if .Values.adapters.http.enabled }}
#
# Copyright (c) 2019, 2022 Contributors to the Eclipse Foundation
# Copyright (c) 2019, 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand Down Expand Up @@ -36,6 +36,7 @@ spec:
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
{{- include "hono.pod.affinity" $args | nindent 6 }}
serviceAccountName: {{ printf "%s-%s" ( include "hono.fullname" . ) "adapter" | quote }}
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
@@ -1,6 +1,6 @@
{{- if .Values.adapters.lora.enabled }}
#
# Copyright (c) 2019, 2022 Contributors to the Eclipse Foundation
# Copyright (c) 2019, 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand Down Expand Up @@ -36,6 +36,7 @@ spec:
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
{{- include "hono.pod.affinity" $args | nindent 6 }}
serviceAccountName: {{ printf "%s-%s" ( include "hono.fullname" . ) "adapter" | quote }}
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
@@ -1,6 +1,6 @@
{{- if .Values.adapters.mqtt.enabled }}
#
# Copyright (c) 2019, 2022 Contributors to the Eclipse Foundation
# Copyright (c) 2019, 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand Down Expand Up @@ -36,6 +36,7 @@ spec:
{{- end }}
{{- include "hono.pod.priorityClassName" $args | nindent 6 }}
{{- include "hono.pod.affinity" $args | nindent 6 }}
serviceAccountName: {{ printf "%s-%s" ( include "hono.fullname" . ) "adapter" | quote }}
containers:
{{- include "hono.otel.agent" . | indent 6 }}
{{- include "hono.container" $args | indent 6 }}
Expand Down

0 comments on commit 09b42cd

Please sign in to comment.