question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Working with other side-cars

See original GitHub issue

It would be great to provide workaround-hooks in this container.

Problem:

  • Given that Grafana only reads datasources on start
  • Given that GKE doesn’t support anything but ReadWriteOnce persistency (else I’d spawn a Job with a shared PVC)
  • Given that I use Istio in the Grafana namespace
  • Given that Istio’s istio-proxy sidecar container is needed to access to the k8s API
  • Given that I was using k8s-sidecar to list datasources from the k8s API as an init container
  • And given that k8s KEP #753 is not yet done
  • I have a crashing init sidecar
  • Or else if I move it to “containers” and make it “WATCH” instead of “LIST”, I could have it run continously,
  • However, see point 1, so we have a race condition

A workaround:

  • Suppose this container exposed a HTTP interface that only returned 200 OK once “one watch iteration” was done
  • I could then do
command: ["/bin/bash", "-c"]
args: ["until curl --head localhost:15000 ; do echo Waiting for Sidecar; sleep 3 ; done ; echo Sidecar available; ./init-stuff.sh && ./startup.sh"]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hafcommented, Sep 7, 2021

This is really crap automation.

0reactions
jekkelcommented, Sep 7, 2021

It seems you could use the SCRIPT configuration to touch a file as soon as the listing succeeds. Your bash waiting wouldn’t then refer to an http request but the existence of that file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The role of sidecars in microservices architecture - TechTarget
Sidecars are directly associated with the service mesh pattern, which is a low-latency infrastructure layer that manages large volumes of ...
Read more >
Sidecar pattern - Azure Architecture Center | Microsoft Learn
A sidecar service is not necessarily part of the application, but is connected to it. It goes wherever the parent application goes. Sidecars...
Read more >
Handling Istio Sidecars in Kubernetes Jobs - Medium
The Istio sidecar runs Envoy and other Istio specific services, but stopping only Envoy didn't lead to the entire container halting as expected....
Read more >
Sidecar - Istio
Sidecar describes the configuration of the sidecar proxy that mediates inbound and outbound communication to the workload instance it is attached to.
Read more >
Understanding the Sidecar Injection, Traffic Intercepting ...
It can shield the differences between different programming languages and unify the functions of microservices such as observability, monitoring ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found