---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: hello-world
  labels:
    app: hello
spec:
  replicas: 1
  selector:
    matchLabels:
      app: hello
  template:
    metadata:
      labels:
        app: hello
    spec:
      containers:
        - name: nginx
          image: 'nginx:alpine'
          resources: {}
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: IfNotPresent
          volumeMounts:
            - name: httproot
              mountPath: /usr/share/nginx/html
            - name: health-script
              mountPath: /script
        - name: health-cron
          image: 'nginx:alpine'
          command: 
            - sh
            - "/script/run-health-script.sh"
          imagePullPolicy: IfNotPresent
          volumeMounts:
            - name: httproot
              mountPath: /httproot
            - name: health-script
              mountPath: /script
      volumes:
        - name: httproot
          emptyDir: {}
        - name: health-script
          configMap:
            name: hello-health
            defaultMode: 0755
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      securityContext: {}
      schedulerName: default-scheduler
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%
  revisionHistoryLimit: 10
  progressDeadlineSeconds: 600

