We have a setup with Traefik as the Ingress Controller / CRD and ArgoCD. We installed ArgoCD into our EKS setup as described in the Argo getting stared guide:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
Now as the docs state the IngressRoute
object to configure Traefik correctly looks like this:
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: argocd-server
namespace: argocd
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`argocd.tekton-argocd.de`)
priority: 10
services:
- name: argocd-server
port: 80
- kind: Rule
match: Host(`argocd.tekton-argocd.de`) && Headers(`Content-Type`, `application/grpc`)
priority: 11
services:
- name: argocd-server
port: 80
scheme: h2c
tls:
certResolver: default
Right now there's a bug in the docs - so be sure to remove the options: {}
in order to let Traefik accept the configuration.
Traefik shows everything is fine in the dashboard:
But if we try to access the ArgoCD dashboard at https://argocd.tekton-argocd.de we get multiple HTTP 307
redirects and can't access the dashboard in the end. You can see the redirects inside the developer tools:
Searching for a solution we already found this issue where the problem is described:
The problem is that by default Argo-CD handles TLS termination itself and always redirects HTTP requests to HTTPS. Combine that with an ingress controller that also handles TLS termination and always communicates with the backend service with HTTP and you get Argo-CD's server always responding with a redirects to HTTPS.
Also the solution is sketched:
So one of the solutions would be to disable HTTPS on Argo-CD, which you can do by using the --insecure flag on argocd-server.
But how can we configure the argocd-server
Deployment to add the --insecure
flag to the argocd-server command - as it is also stated inside the ArgoCD docs?