apiVersion: apps/v1
kind: Deployment
metadata:
  name: devops-challenge
  labels:
      run: devops-challenge
spec:
  selector:
    matchLabels:
      run: devops-challenge
  strategy:
      rollingUpdate:
        maxSurge: 25%
        maxUnavailable: 25%
      type: RollingUpdate
  replicas: 1
  template:
    metadata:
      labels:
        run: devops-challenge
    spec:
      containers:
      - image: url
        imagePullPolicy: Always
        name: devops-challenge
        ports:
        - containerPort: 8080
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        readinessProbe:
          httpGet:
            path: /health
            port: 8080
          initialDelaySeconds: 60
          timeoutSeconds: 2
          periodSeconds: 1
          failureThreshold: 3
        livenessProbe:
          httpGet:
            path: /health
            port: 8080
          initialDelaySeconds: 60
          timeoutSeconds: 2
          periodSeconds: 5
          failureThreshold: 3
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 120