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.frontend.repository }}:{{ .Values.image.frontend.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.frontend.pullPolicy }} {{- if .Values.envVars.frontend }} env: {{- range $key, $val := .Values.envVars.frontend }} - name: {{ $key }} value: {{ $val | quote }} {{- end }} {{- end }} ports: - name: http containerPort: {{ .Values.service.frontend.targetPort }} protocol: TCP livenessProbe: httpGet: path: / port: http readinessProbe: httpGet: path: / port: http volumeMounts: - name: nginx mountPath: /etc/nginx/nginx.conf subPath: nginx.conf readOnly: true - name: env-config mountPath: /usr/share/nginx/html/env-config.js subPath: env-config.js readOnly: true resources: {{- toYaml .Values.resources | nindent 12 }} volumes: - name: nginx configMap: name: frontend-nginx - name: env-config configMap: name: frontend-env-config {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}