apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: covid-webapp
  annotations:
    kubernetes.io/ingress.class: "public"
    cert-manager.io/issuer: "letsencrypt-prod"
    nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
    nginx.ingress.kubernetes.io/hsts: "true"
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
  tls:
  - hosts:
    - covid-africa.com
    - covid-africa.info
    - www.covid-africa.com
    - www.covid-africa.info
    secretName: covid-africa-tls
  rules:
  - host: covid-africa.com
    http: &http_rules
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: webapp
            port:
              number: 8000
  - host: covid-africa.info
    http: *http_rules
