We should have a way to know when the sub-process is failing via the Kubernetes API.
Some options might be:
- Wrapping the health check: Health check is specified to
ns-reloader which uses it during it's own health check.
- Separating ns-reloader and the controller into separate processes, restarting it via a signal.
- This may not be feasible since we want to wrap controllers which are often configured via environment variables and command-line flags.
- Could maybe be done with wrapper script which loads the shared config.
- Posting events via the Kubernetes API indicating the status.
- Returning an error code and terminating the
ns-reloader process if the wrapped process starts to crash loop.
We should have a way to know when the sub-process is failing via the Kubernetes API.
Some options might be:
ns-reloaderwhich uses it during it's own health check.ns-reloaderprocess if the wrapped process starts to crash loop.