apiVersion: apps/v1
kind: Deployment
metadata:
  name: blazorindocker
  labels:
    app: blazor
    owner: piotr1215
    env: dev
spec:
  selector:
    matchLabels:
      app: blazor
  replicas: 3
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: blazor
    spec:
      containers:
      - name: blazorindocker
        image: piotrzan/blazorindocker:1.0.0
        securityContext:
          runAsNonRoot: true
          capabilities:
            drop: ["ALL"]
          readOnlyRootFilesystem: true
        envFrom:
        - configMapRef:
           name: blazora-config
        ports:
        - containerPort: 80
        imagePullPolicy: Always
        resources:
          requests:
            memory: "64Mi"
            cpu: "250m"
          limits:
            memory: "128Mi"
            cpu: "500m"
        readinessProbe:
          tcpSocket:
            port: 8080
          initialDelaySeconds: 5
          periodSeconds: 10
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8080
            httpHeaders:
            - name: Custom-Header
              value: Awesome
          initialDelaySeconds: 3
          periodSeconds: 3
