---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: cbr-rate
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cbr-rate
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: cbr-rate
    spec:
      containers:
        - image: registry.gitlab.com/petrelevich/dockerregistry/cbr-rate:v1
          name: cbr-rate
          ports:
            - containerPort: 8081
          envFrom:
            - configMapRef:
                name: currency-rate-config
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /actuator/health/readiness
              port: 8091
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /actuator/health/liveness
              port: 8091
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
            initialDelaySeconds: 10
      imagePullSecrets:
        - name: regcred
