apiVersion: apps/v1
kind: Deployment
metadata:
  name: healthapp
  labels:
    app: healthapp
spec:
  replicas: 1 # How many replicas we want
  selector:   # How do we indentify pods we should manage?
    matchLabels:
      app: healthapp # Match all nodes with this label
  template: # How should pods within this deployment be created?
    metadata:
      labels:
        app: healthapp # Specify a label, used in the above selector
    spec:
      containers:
        - name: healthapp
          image: gitlab.liu.se:5000/tddc88-company-2-2020/deploy/app-frontend:latest
          imagePullPolicy: Always
          ports:
          - containerPort: 80
            protocol: TCP
          readinessProbe:
            tcpSocket:
              port: 80
          resources: # Specify what resources we need...
            limits: # ...both absolute limits...
              cpu: 100m
              memory: 80Mi
            requests: # ...and what we probably will get by with.
              cpu: 10m
              memory: 42Mi
      imagePullSecrets:
        - name: regcred
      restartPolicy: Always
