apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: app
  name: app
spec:
  replicas: 3
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      name: app
  template:
    metadata:
      labels:
        name: app
    spec:
      containers:
        - image: dsvologdin/app:0.1.0
          imagePullPolicy: IfNotPresent
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /healthz
              port: 8000
              scheme: HTTP
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          name: app
          ports:
            - containerPort: 8000
              name: app
              protocol: TCP
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /healthz
              port: 8000
              scheme: HTTP
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          resources:
            limits:
              cpu: 100m
              memory: 128Mi
            requests:
              cpu: 100m
              memory: 32Mi
          volumeMounts:
            - mountPath: /config/
              name: app-config
              readOnly: true
      restartPolicy: Always
      volumes:
        - name: app-config
          secret:
            defaultMode: 420
            secretName: app-config
