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

Runners and Istio #591

Closed
js-timbirkett opened this issue Jun 1, 2021 · 5 comments
Closed

Runners and Istio #591

js-timbirkett opened this issue Jun 1, 2021 · 5 comments

Comments

@js-timbirkett
Copy link
Contributor

Hi 👋

We deploy most of our services onto an Istio service mesh. We'd like to put the runners on "the mesh" so that they can take advantage of MUTUAL_TLS and reach services without needing to expose the service through ingressgateway for integration and e2e tests.

The trouble is that I don't think the Istio sidecar comes up before the runner tries to execute entrypoint.sh this causes the good old:

│ runner Starting Runner listener with startup type: service                                                                                                                                                          │
│ runner Started listener process                                                                                                                                                                                     │
│ runner An error occurred: Not configured                                                                                                                                                                            │
│ runner Runner listener exited with error code 2                                                                                                                                                                     │
│ runner Runner listener exit with retryable error, re-launch runner in 5 seconds.

loop of death.

Shelling into the pod and running ./entrypoint.sh registers the runner as you'd expect at startup and running the runner with Istio sidecar injection also works.

There are a couple of things that could be done in the (top of the) entrypoint script:

  • Allow an env variable configured sleep
  • Add a wait-for-ready style loop

Is anyone else running this on Istio?

@mumoshu
Copy link
Collaborator

mumoshu commented Jun 1, 2021

@js-timbirkett Hey! Thanks for bringing this up. Honestly speaking I have no much experience with Istio and things like this is why I'm still taking me away from using any kind of sidecar-based service mesh :) I was looking forward to kubernetes/enhancements#753 but it postponed...

I think I'm fine with the first option, sleeping. But I'm interested in the second option, too.

How would the second work? How do you usually wait-for-ready when using Istio? Any idea integrating it in a generic way into actions-runner-controller?

@js-timbirkett
Copy link
Contributor Author

Hey @mumoshu - thanks for the quick reply. Back in the days of docker-compose you'd often end up having dependencies like databases that you'd want to be available before starting your application.

What you'd end up doing is adding something like:

These scripts pretty much run a while loop and attempt to connect to a host and port with a smol sleep.

Istio takes a few hundred milliseconds before network traffic can flow through the sidecar proxy which is fine for java apps (long startup times), or apps that crash and restart when failing to connect to a thing.

mumoshu added a commit that referenced this issue Jun 3, 2021
@mabushey
Copy link

mabushey commented Jun 7, 2021

I'm using the runner with Istio 1.10.0 just fine. Add this to your istio operator config:

  meshConfig:
    defaultConfig:
      holdApplicationUntilProxyStarts: true

@mumoshu
Copy link
Collaborator

mumoshu commented Jun 7, 2021

@mabushey Great! Thanks a lot for sharing ☺️

@js-timbirkett
Copy link
Contributor Author

Thanks @mabushey - only another 4 Istio upgrades (* 3 cluster) to go for me :-|

mumoshu added a commit that referenced this issue Jun 18, 2021
mumoshu added a commit that referenced this issue Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants