Skip to content
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

fix: Downgrade ArgoCD traffic to HTTP #30

Merged
merged 2 commits into from
Jan 23, 2023

Conversation

julianxhokaxhiu
Copy link
Member

What does this PR do?

This PR fixes the weird port-forwarding termination happening randomly while Tilt is forwarding the traffic on Windows and macOS. The workaround is about downgrading the default traffic from HTTPS to HTTP.

The long version of this issue can be found here: kubernetes/kubernetes#74551 but it triggers a lot more under TLS traffic than on plain HTTP, probably because of how encrypted packets look like and how they go back and forth through the TCP/IP stack.

Additionally, this downgrade will allow end-users to put an HTTPS Load Balancer in front of ArgoCD if required without further issues or configuration requirements.

Related issues

Fixes #18

Checklist before merging

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have checked the contributing document.
  • I have checked the existing Pull Requests to see whether someone else has raised a similar idea or question.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have upgraded the changelog according to the nature of the feature that I am adding to this Pull Request.

Allow a Load Balancer to be put in front without special tricks required
@julianxhokaxhiu julianxhokaxhiu added the bug Something isn't working label Jan 18, 2023
@julianxhokaxhiu julianxhokaxhiu added this to the 0.1.0 milestone Jan 18, 2023
@julianxhokaxhiu julianxhokaxhiu self-assigned this Jan 18, 2023
@mile-misan
Copy link
Contributor

Just did a test, for 3 mins it worked fine, but it went back to loosing connection. This time error is bit different:

E0119 10:40:02.403098 8424 portforward.go:346] error creating error stream for port 8080 -> 8080: Timeout occurred

@julianxhokaxhiu
Copy link
Member Author

I added one patch that will ensure the connection doesn't timeout at the first second that the service doesn't reply. Increasing it to 5s before hitting a timeout helped to keep the connection constantly alive.

Copy link
Collaborator

@zimny zimny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@julianxhokaxhiu julianxhokaxhiu merged commit 1a5b1c9 into main Jan 23, 2023
@julianxhokaxhiu julianxhokaxhiu deleted the bugfix/argocd-port-forwarding branch January 23, 2023 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ArgoCD] - Port forwarding keeps crashing on macOS/WSL2
3 participants