apiVersion: apps/v1
kind: Deployment
metadata:
  name: webapp
  namespace: demos
  annotations:
    kubernetes.io/change-cause: Annotation from deployment yaml
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 0
  selector:
    matchLabels:
      app: webapp
  template:
    metadata:
      labels:
        app: webapp
    spec:
      # Use these to force to use nodepool2
      # nodeSelector:
      #   usage: limitedaccess
      # tolerations:
      #   - key: "usage"
      #     operator: "Equal"
      #     value: "limitedaccess"
      #     effect: "NoSchedule"
      containers:
        # https://hub.docker.com/r/jannemattila/k8s-probe-demo/tags
        - image: jannemattila/k8s-probe-demo:1.0.11
          name: webapp
          resources:
            requests:
              cpu: 100m
              memory: 100Mi
            limits:
              cpu: 150m
              memory: 150Mi
          ports:
            - containerPort: 80
              name: http
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /api/HealthCheck/Liveness
              port: 80
            initialDelaySeconds: 5
            timeoutSeconds: 1
            periodSeconds: 10
            failureThreshold: 1
          readinessProbe:
            httpGet:
              path: /api/HealthCheck/Readiness
              port: 80
            initialDelaySeconds: 10
            timeoutSeconds: 1
            periodSeconds: 10
            failureThreshold: 1
