apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-srv
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/use-regex: 'true'
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/proxy-body-size: "0"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
    cert-manager.io/cluster-issuer: "letsencrypt"
spec:
  tls:
    - hosts:
      - news-platform.ru
      secretName: letsencrypt
  rules:
    - host: news-platform.ru
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: academaticaweb
                port:
                  number: 80
          - path: /connect
            pathType: Prefix
            backend:
              service:
                name: academaticaapiauth
                port:
                  number: 80
          - path: /.well-known
            pathType: Prefix
            backend:
              service:
                name: academaticaapiauth
                port:
                  number: 80
          - path: /api/course
            pathType: Prefix
            backend:
              service:
                name: academaticaapicourse
                port:
                  number: 80
          - path: /api/leaderboard
            pathType: Prefix
            backend:
              service:
                name: academaticaapileaderboards
                port:
                  number: 80
          - path: /api/users
            pathType: Prefix
            backend:
              service:
                name: academaticaapiusers
                port:
                  number: 80