apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    run: dictionary
  name: dictionary
spec:
  replicas: 5
  selector:
    matchLabels:
      run: dictionary
  strategy:
    rollingUpdate:
      maxSurge: 100%
      maxUnavailable: 20%
    type: RollingUpdate
  template:
    metadata:
      labels:
        run: dictionary
    spec:
      containers:
        - image: danielvaughan/word-game-tools-dictionary:latest
          imagePullPolicy: Always
          name: dictionary
          ports:
            - containerPort: 8080
              protocol: TCP
          readinessProbe:
            httpGet:
              path: /actuator/health
              port: 8080
            initialDelaySeconds: 30
            timeoutSeconds: 2
            periodSeconds: 3
            failureThreshold: 1
          livenessProbe:
            httpGet:
              path: /actuator/health
              port: 8080
            initialDelaySeconds: 60
            timeoutSeconds: 2
            periodSeconds: 8
            failureThreshold: 1
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      terminationGracePeriodSeconds: 30

