---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend
  namespace: comparisons
  labels:
    app: frontend
spec:
  replicas: 1
  selector:
    matchLabels:
      app: frontend
  template:
    metadata:
      labels:
        app: frontend
    spec:
      volumes:
        - name: nginx-configmap
          configMap:
            name: nginx-configmap
            items:
              - key: nginx.conf
                path: nginx.conf
      containers:
        - name: frontend
          image: cr.yandex/crp3ccidau046kdj8g9q/comparisons-frontend:prod_6dc6e0c2
          imagePullPolicy: IfNotPresent
          ports:
            - name: http
              containerPort: 80
              protocol: TCP
          resources:
            requests:
              cpu: 25m
              memory: 100Mi
          volumeMounts:
            - name: nginx-configmap
              mountPath: /etc/nginx/nginx.conf
              subPath: nginx.conf
          livenessProbe:
            httpGet:
              path: /ping
              port: 80
            initialDelaySeconds: 10
            periodSeconds: 10
            failureThreshold: 10
          readinessProbe:
            httpGet:
              path: /ping
              port: 80
            initialDelaySeconds: 10
            periodSeconds: 10
            failureThreshold: 20
      imagePullSecrets:
        - name: regcred
