apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: petclinic
    app.kubernetes.io/component: petclinic
    app.kubernetes.io/instance: petclinic
    app.kubernetes.io/part-of: petclinic
  name: petclinic
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: petclinic
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: petclinic
        deploymentconfig: petclinic
    spec:
      containers:
      - env: []
        image: petclinic:latest
        imagePullPolicy: Always
        name: petclinic
        resources:
          limits:
            memory: 512Mi
            cpu: '1'
          requests:
            memory: 512Mi
            cpu: 250m
        readinessProbe:
          httpGet:
            path: /
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 20
          timeoutSeconds: 1
          periodSeconds: 10
          successThreshold: 1
          failureThreshold: 3
        livenessProbe:
          httpGet:
            path: /
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 60
          timeoutSeconds: 1
          periodSeconds: 10
          successThreshold: 1
          failureThreshold: 3
        ports:
        - containerPort: 8080
          protocol: TCP
        - containerPort: 8443
          protocol: TCP
        - containerPort: 8778
          protocol: TCP
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      terminationGracePeriodSeconds: 30
