apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    certmanager.k8s.io/cluster-issuer: letsencrypt-production
    kubernetes.io/ingress.class: nginx
    kubernetes.io/tls-acme: "true"
    kubernetes.io/ingress.allow-http: "false"
    nginx.ingress.kubernetes.io/configuration-snippet: |
      proxy_set_header  X-Forwarded-Proto https;
    nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
    nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
    nginx.ingress.kubernetes.io/proxy-body-size: "1G"
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "3"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
    nginx.ingress.kubernetes.io/server-snippet: |
      rewrite /discord https://discord.gg/AXSfWq permanent;
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
  name: default
  namespace: static
spec:
  tls:
    - hosts:
        - "*.tenlastic.com"
      secretName: default-tls
  rules:
    - host: api.tenlastic.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: api
                port:
                  number: 3000
    - host: cdn.tenlastic.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: api
                port:
                  number: 3000
    - host: docker-registry.tenlastic.com
      http:
        paths:
          - path: /v2/
            pathType: Prefix
            backend:
              service:
                name: docker-registry
                port:
                  number: 5000
    - host: grafana.tenlastic.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: grafana
                port:
                  number: 80
    - host: minio.tenlastic.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: minio
                port:
                  number: 9000
    - host: rabbitmq.tenlastic.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: rabbitmq
                port:
                  number: 15672
    - host: verdaccio.tenlastic.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: verdaccio-internal
                port:
                  number: 4873
    - host: wss.tenlastic.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: wss
                port:
                  number: 3000
    - host: www.tenlastic.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: home-ui
                port:
                  number: 80
