apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: nginx-ingress-be
  annotations:
    kubernetes.io/ingress.class: azure/application-gateway
    appgw.ingress.kubernetes.io/ssl-redirect: "true"
spec:
  tls:
    - secretName: nginx-cert
      hosts:
        - $dns_name
        
  rules:
  - host: $dns_name
    http:
      paths:
      - path: /voting
        pathType: Exact
        backend:
          service:
            name: node-voting-be-svc
            port:
              number: 8080

      - path: /vote/*
        pathType: Exact
        backend:
          service:
            name: node-voting-be-svc
            port:
              number: 8080
          
