---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: rest-hello-deployment
spec:
  replicas: 2
  selector:
    matchLabels:
      app: rest-hello
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: rest-hello
    spec:
      containers:
        - image: registry.gitlab.com/petrelevich/dockerregistry/rest-hello:2.0.2-1.2d40be46.dirty-SNAPSHOT
          name: rest-hello
          ports:
            - containerPort: 8080
          envFrom:
            - configMapRef:
                name: rest-service-config
          resources:
            requests:
              memory: "256M"
            limits:
              memory: "256M"
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /actuator/health/readiness
              port: 8090
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /actuator/health/liveness
              port: 8090
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
            initialDelaySeconds: 10
      imagePullSecrets:
        - name: regcred
