-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArgoCD UI Ingress go-to links use wrong URL scheme (HTTP) #8021
Comments
Found some relevant snippets here:
|
It looks like the crux of this happens here: argo-cd/controller/cache/info.go Line 163 in a940cb5
with the determination of The defect of how So, it seems like:
|
On 2nd bullet above, perhaps the ArgoCD controller could listen to an environment variable such as |
I think that using an environment variable for this would be too narrow as well An idea would be to use an annotation on the resource itself to specify the URL for the link-out directly, either an URL or just the protocol, and use this value for rendering the link. We do have a mechanism to add links to the Application resource itself using the For example: # will use the URL from the Ingress, and will use https as protocol scheme without applying logic to determine the protocol
link.argocd.argoproj.io/external-protocol: https
# will use the complete URL instead of the one specified in the Ingress
link.argocd.argoproj.io/external-url: https://some.rand.om/link/to/the/app /cc @alexmt @jessesuen |
From a k8s admin perspective, my only gripe with this is it now introduces some necessary duplication, it seems. Let's say I have 10 different |
A workaround we've found for this is to have the ingress controller just issue an 80->443 redirect rather than removing the port 80 listener entirely. I realize that setup doesn't describe everyone's situation, though. |
#6901 uses https if you have any tls hosts, which is good enough for me. |
I have a similar problem. And I'm definitely on @brsolomon-deloitte s side with the duplication: I have multiple clusters with hundreds of applications. I would need to add the annotation to all of their ingress resources. I'm using Traefik as my ingress controller and in most of my clusters Traefik is configured with a wildcard certificate. So no Ingress resource has any TLS configuration on its own. My idea would be a config key for the cluster like: apiVersion: v1
kind: Secret
metadata:
name: mycluster-secret
labels:
argocd.argoproj.io/secret-type: cluster
type: Opaque
stringData:
name: mycluster.com
server: https://mycluster.com
config: |
{
...
"defaultIngressProtocol": "https", # optional, one of null or "", "http", "https"
...
} argo-cd/controller/cache/info.go Lines 163 to 187 in a940cb5
And then in this controller we could do something like:
What do you think? |
Checklist:
argocd version
.Describe the bug
In the ArgoCD UI, the external link button for Ingress resources points to http rather than https. Our load balancer is only exposed over https/443 (TLS termination occurs there), so the links from ArgoCD are effectively dead links with the wrong scheme. Is there a way to configure this to generate HTTPS links?
To Reproduce
Deploy ArgoCD, nginx-ingress-controller, and any Ingress resource.
Expected behavior
Link uses HTTPS scheme or is configurable in some way to use HTTPS by default, not HTTP.
Screenshots
The generated HTML looks like:
Whereas the link should be
"https://jupyter.example.com/"
Version
The text was updated successfully, but these errors were encountered: