---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: postamates-frontend
  namespace: spatial
  labels:
    app.kubernetes.io/name: postamates-frontend
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: postamates-frontend
  template:
    metadata:
      labels:
        app.kubernetes.io/name: postamates-frontend
    spec:
      containers:
      - name: nginx
        image: DEPLOY_IMAGE_TAG
        ports:
          - containerPort: 80
        resources:
          requests:
            memory: "64Mi"
            cpu: "20m"
          limits:
            memory: "64Mi"
            cpu: "20m"
        readinessProbe:
          httpGet:
            path: /nginx-health
            port: 8888
          initialDelaySeconds: 3
          periodSeconds: 3
        livenessProbe:
          httpGet:
            path: /nginx-health
            port: 8888
          initialDelaySeconds: 3
          periodSeconds: 3
---
apiVersion: v1
kind: Service
metadata:
  name: postamates-frontend
  namespace: spatial
spec:
  selector:
    app.kubernetes.io/name: postamates-frontend
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: postamates-frontend
  namespace: spatial
spec:
  ingressClassName: nginx-internal
  rules:
  - host: ADDRESS_INGRESS_HOST
    http:
      paths:
      - backend:
          service:
            name: postamates-frontend
            port:
              number: 80
        path: /
        pathType: ImplementationSpecific
