apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: hello-kubernetes
    version: "0.2"
  name: hello-kubernetes
spec:
  replicas: 1
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      app: hello-kubernetes
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: hello-kubernetes
    spec:
      containers:
      - image: hazim/hello-kubernetes:latest
        imagePullPolicy: Always
        name: hello-kubernetes
        env:
          - name: TEST_VAR
            value: "v1"
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        livenessProbe:
          failureThreshold: 30
          httpGet:
            path: /
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 20
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 10
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 20
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 10
        securityContext:
          privileged: false
      securityContext: {}
      terminationGracePeriodSeconds: 30
