apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "lbtelegram.fullname" . }} labels: {{- include "lbtelegram.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: {{- include "lbtelegram.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "lbtelegram.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: lbtelegram image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} ports: - name: http containerPort: {{ .Values.service.port }} protocol: TCP envFrom: - secretRef: name: {{ include "lbtelegram.fullname" . }}-secrets env: {{- range $k, $v := .Values.env }} - name: {{ $k }} value: {{ $v | quote }} {{- end }} livenessProbe: tcpSocket: port: http initialDelaySeconds: 10 periodSeconds: 30 readinessProbe: tcpSocket: port: http initialDelaySeconds: 5 periodSeconds: 10 resources: {{- toYaml .Values.resources | nindent 12 }}