Files
pezkuwi-telemetry/helm/templates/shard-deployment.yaml
T
2021-08-02 14:16:20 +01:00

71 lines
2.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: telemetry-shard
labels:
{{- include "substrate-telemetry.labels" . | nindent 4 }}
telemetry-component: shard
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount.shard }}
{{- 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: shard
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_shard"
args:
- "--listen"
- "0.0.0.0:{{ .Values.service.shard.targetPort }}"
- "--core"
- "http://telemetry-core:{{ .Values.service.core.port }}/shard_submit"
ports:
- name: http
containerPort: {{ .Values.service.shard.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 }}