# apiVersion: networking.k8s.io/v1
# kind: Ingress
# metadata:
#   name: argocd-server-http
#   annotations:
#     kubernetes.io/ingress.class: "nginx"
#     # nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
#     nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
# spec:
#   rules:
#   - http:
#       paths:
#       - pathType: Prefix
#         path: /
#         backend:
#           service:
#             name: argocd-server
#             port:
#               name: http
#     host: argocd.cicd.localhost
#   # tls:
#   # - hosts:
#   #   - argocd.example.com
#   #   secretName: argocd-secret # do not change, this is provided by Argo CD
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: argocd-server-http
  annotations:
    kubernetes.io/ingress.class: "nginx"
    # nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
    nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
    nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  rules:
  - http:
      paths:
      - pathType: Prefix
        path: /cicd/argo-cd(/|$)(.*)
        backend:
          service:
            name: argocd-server
            port:
              name: http
    host: localhost