apiVersion: apps/v1
kind: Deployment
metadata:
  name: web-console
  namespace: default
  labels:
    app: web-console
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: web-console
  template:
    metadata:
      labels:
        app: web-console
    spec:
      serviceAccountName: web-console
      containers:
        - name: web-console
          image: schnatterer/web-console:v0.9.7-1
          ports:
            - containerPort: 80
          resources:
            limits:
              cpu: 250m
              memory: 512Mi
            requests:
              cpu: 100m
              memory: 64Mi
          readinessProbe:
            httpGet:
              path: /
              port: 80
          livenessProbe:
            httpGet:
              path: /
              port: 80
            initialDelaySeconds: 15
          env:
            - name: USER
              valueFrom:
                secretKeyRef:
                  name: web-console
                  key: USERNAME
            - name: PASSWORD
              valueFrom:
                secretKeyRef:
                  name: web-console
                  key: PASSWORD