# Copyright (c) 2021 SIGHUP s.r.l All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: pomerium
  annotations:
    forecastle.stakater.com/expose: "true"
    forecastle.stakater.com/appName: "Pomerium"
    forecastle.stakater.com/icon: "https://pbs.twimg.com/profile_images/1161448498849390592/fJZaKEGR.png"
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
    nginx.ingress.kubernetes.io/proxy-buffer-size: "16k"
    kubernetes.io/tls-acme: "true"
spec:
  ingressClassName: internal
  rules:
    - host: $(AUTHENTICATE_SERVICE_HOST)
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: pomerium
                port:
                  number: 80
  tls:
    - hosts:
        - $(AUTHENTICATE_SERVICE_HOST)
      secretName: pomerium-tls
