helm chart setup for realtime project

This commit is contained in:
deityhub 2021-07-25 21:37:11 +01:00
parent c423c2868d
commit a5f53bb037
2 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,60 @@
########-REALTIME-#################
#realtime service and deployement
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ printf "%s-%s" .Release.Name "realtime" }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ printf "%s-%s" .Release.Name "realtime" }}
app.kubernetes.io/part-of: fyipe
app.kubernetes.io/managed-by: Helm
spec:
selector:
matchLabels:
app: {{ printf "%s-%s" .Release.Name "realtime" }}
replicas: {{ .Values.replicaCount }}
template:
metadata:
labels:
app: {{ printf "%s-%s" .Release.Name "realtime" }}
spec:
containers:
- image: {{ printf "%s/%s/%s:%s" .Values.image.registry .Values.image.repository "realtime" .Values.image.tag }}
name: {{ printf "%s-%s" .Release.Name "realtime" }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: PORT
value: {{ .Values.host.realtimePort | quote }}
- name: CLUSTER_KEY
valueFrom:
configMapKeyRef:
name: {{ printf "%s-%s" .Release.Name "configmap" }}
key: clusterkey
- name: NODE_ENV
value: 'production'
ports:
- containerPort: {{ .Values.host.realtimePort }}
hostPort: {{ .Values.host.realtimePort }}
name: {{ printf "%s-%s" .Release.Name "realtime" }}
restartPolicy: {{ .Values.image.restartPolicy }}
---
apiVersion: v1
kind: Service
metadata:
labels:
app: {{ printf "%s-%s" .Release.Name "realtime" }}
app.kubernetes.io/part-of: fyipe
app.kubernetes.io/managed-by: Helm
name: {{ printf "%s-%s" .Release.Name "realtime" }}
namespace: {{ .Release.Namespace }}
spec:
ports:
- port: {{ .Values.host.realtimeServicePort }}
targetPort: {{ .Values.host.realtimePort }}
selector:
app: {{ printf "%s-%s" .Release.Name "realtime" }}
type: ClusterIP
---
###########################

View File

@ -206,6 +206,7 @@ haraka:
host:
backendPort: 3002
dataIngestorPort: 3200
realtimePort: 3300
homePort: 1444
licensingPort: 3004
statusPageHttpPort: 3006
@ -222,6 +223,7 @@ host:
adminDashboardPort: 3100
backendServicePort: 80
dataIngestorServicePort: 80
realtimeServicePort: 80
homeServicePort: 80
apiDocsServicePort: 80
statusPageHttpServicePort: 80