apiVersion: apps/v1 kind: Deployment metadata: name: telemetry-core labels: {{- include "substrate-telemetry.labels" . | nindent 4 }} telemetry-component: core spec: {{- if not .Values.autoscaling.core.enabled }} replicas: {{ .Values.replicaCount.core }} {{- 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: core 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.backend.repository }}:{{ .Values.image.backend.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.backend.pullPolicy }} {{- if .Values.envVars.core }} env: {{- range $key, $val := .Values.envVars.core }} - name: {{ $key }} value: {{ $val | quote }} {{- end }} {{- end }} command: - "telemetry_core" args: - "--listen" - "0.0.0.0:{{ .Values.service.core.targetPort }}" ports: - name: http containerPort: {{ .Values.service.core.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 }}