apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-rgm
  namespace: rgm
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /
    nginx.ingress.kubernetes.io/use-regex: "true"
    # add an annotation indicating the issuer to use.
    cert-manager.io/cluster-issuer: letsencrypt-staging
    acme.cert-manager.io/http01-edit-in-place: "true"
    cert-manager.io/issue-temporary-certificate: "true"
spec:
  tls:
    #colocar tus propios dominios
    - hosts:
      - dev.rgm.gob.gt
      secretName: server-secret-rgm
  rules:
  - host: dev.rgm.gob.gt
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: payara-server-rgm
            port:
              number: 80
      # - path: /admin
      #   pathType: Prefix
      #   backend:
      #     service:
      #       name: service-payara
      #       port:
      #         number: 4848
