apiVersion: apps/v1
kind: Deployment
metadata:
  name: demo-app-deployment
spec:
  selector:
    matchLabels:
      app: demo-app
  replicas: 1
  template:
    metadata:
      labels:
        app: demo-app
    spec:
      containers:
      - name: demo-app
        image: gitlab:5000/k8s-demo-app:latest
        ports:
        - containerPort: 8080
          name: server
        readinessProbe:
          httpGet:
            port: 8080
            path: /actuator/health
            scheme: HTTP
          initialDelaySeconds: 10
          periodSeconds: 5
          timeoutSeconds: 5
          successThreshold: 1
          failureThreshold: 10
        livenessProbe:
          httpGet:
            port: 8080
            path: /actuator/health
            scheme: HTTP
          initialDelaySeconds: 10
          periodSeconds: 20
          timeoutSeconds: 10
          successThreshold: 1
          failureThreshold: 3
