Working with other side-cars
See original GitHub issueIt 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:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is really crap automation.
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.