Skip to content

Commit

Permalink
Add kafka-bridge chart services and mqtt-bridge deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
wagmarcel committed Nov 29, 2023
1 parent 9b011dc commit a708759
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
65 changes: 65 additions & 0 deletions helm/charts/kafka-bridges/templates/mqtt-bridge-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
# yamllint disable rule:line-length
# yamllint disable rule:braces
apiVersion: apps/v1
kind: Deployment
metadata:
name: mqtt-bridge
namespace: {{ .Release.Namespace }}
labels:
app: mqtt-bridge
spec:
replicas: {{ .Values.kafkaBridge.mqtt.replicaCount }}
selector:
matchLabels:
app: mqtt-bridge
template:
metadata:
labels:
app: mqtt-bridge
annotations:
checksum/config: {{ include (print $.Template.BasePath "/bridge-configmap.yaml") . | sha256sum }}
spec:
containers:
- name: mqtt-bridge
image: '{{ .Values.mainRepo }}/kafka-bridge:{{ .Values.mainVersion }}'
command: ["node"]
args: ["/opt/mqttBridge/app.js"]
imagePullPolicy: IfNotPresent
ports:
- containerPort: {{ .Values.mqtt.bridge.port }}
name: rest
env:
- name: MQTT_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: keycloak-client-secret-mqtt-broker
key: CLIENT_SECRET
livenessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 300
readinessProbe:
exec:
command:
- cat
- /tmp/ready
initialDelaySeconds: 5
volumeMounts:
- name: config
mountPath: /opt/config
readOnly: true
resources:
volumes:
- name: config
configMap:
# Provide the name of the ConfigMap you want to mount.
name: bridge-configmap
# An array of keys from the ConfigMap to create as files
items:
- key: "config.json"
path: "config.json"
imagePullSecrets:
- name: {{ .Values.pullSecretCredentials }}
15 changes: 15 additions & 0 deletions helm/charts/kafka-bridges/templates/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: mqtt-bridge
namespace: {{ .Release.Namespace }}
labels:
app: mqtt-bridge
spec:
type: ClusterIP
ports:
- port: {{ .Values.mqtt.bridge.port }}
protocol: TCP
name: http
selector:
app: mqtt-bridge

0 comments on commit a708759

Please sign in to comment.