---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: fred-the-guardian
spec:
  replicas: 1
  selector:
    matchLabels:
      name: fred-the-guardian
  template:
    metadata:
      labels:
        name: fred-the-guardian
    spec:
      containers:
      - name: application
        image: fr123k/fred-the-guardian:3.7
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 8080
        livenessProbe:
          httpGet:
            path: /status
            port: 8080
            httpHeaders:
            - name: X-SECRET-KEY
              value: top secret k8s
          initialDelaySeconds: 3
          periodSeconds: 3
        resources:
          requests:
            memory: "64Mi"
            cpu: "250m"
          limits:
            memory: "128Mi"
            cpu: "500m"
