adding frontend to the helm chart

This commit is contained in:
Arsham Teymourı
2021-08-10 13:36:28 +03:00
parent 2dae6c90ce
commit ac20d3d845
7 changed files with 184 additions and 43 deletions
+68
View File
@@ -0,0 +1,68 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: telemetry-frontend
labels:
{{- include "substrate-telemetry.labels" . | nindent 4 }}
telemetry-component: frontend
spec:
{{- if not .Values.autoscaling.frontend.enabled }}
replicas: {{ .Values.replicaCount.frontend }}
{{- end }}
selector:
matchLabels:
{{- include "substrate-telemetry.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "substrate-telemetry.selectorLabels" . | nindent 8 }}
telemetry-component: frontend
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "substrate-telemetry.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- "telemetry_frontend"
args:
- "--listen"
- "0.0.0.0:{{ .Values.service.frontend.targetPort }}"
ports:
- name: http
containerPort: {{ .Values.service.frontend.targetPort }}
protocol: TCP
livenessProbe:
httpGet:
path: /health
port: http
readinessProbe:
httpGet:
path: /health
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}