# Based on Linode's example:
# https://www.linode.com/docs/guides/how-to-deploy-nginx-ingress-on-linode-kubernetes-engine/#configuring-the-ingress-controller

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    cert-manager.io/cluster-issuer: 'letsencrypt-prod'
    kubernetes.io/ingress.class: 'nginx'
  labels:
    app: chorro
    component: server
  name: chorro-server-ingress
spec:
  tls:
    - hosts:
        - chorro.app
      secretName: chorro-server-tls
  rules:
    - host: chorro.app
      http:
        paths:
          - pathType: Prefix
            path: '/api'
            backend:
              service:
                name: chorro-server-service
                port:
                  number: 80
