apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: poker-web
  name: poker-web
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: poker-web
  template:
    metadata:
      labels:
        app: poker-web
    spec:
      containers:
        - image: carlschader/poker-web:latest
          name: poker-web
          env:
            - name: PORT
              value: "80"
            - name: API_URL
              value: http://poker-go-api.default.svc.cluster.local
          livenessProbe:
            httpGet:
              path: /health
              port: 80
            initialDelaySeconds: 5
            timeoutSeconds: 5
            periodSeconds: 60
            failureThreshold: 3
          ports:
            - containerPort: 80
              name: http
              protocol: TCP
