Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Starting with version 1.4.0 of bazarr, the configuration file format has been changed from ini to yaml. This make it easier to parse the config file for properties via
yq
. For example to implement a healthcheck for docker or probes for kubernetes. Neither a healthcheck nor probes is contained in the container image. This leads users to develop their own healthcheck like I developed in the past an awk script. This pull request adds default shell scripts for booth platforms to provide a healthchecks and probes.Benefits of this PR and context:
This PR adds additional shell scripts which can be executed on different platforms. For example for docker and kubernetes. On docker there can be executed the
healthcheck.sh
and on kubernetesliveness.sh
andreadyness.sh
. Currently are the scripts for kubernetes symbolic links to thehealthcheck.sh
file, but the symlink can be removed in the future, when the implementation between booth platforms are different.I skipped the
HEALTHCHECK
definition in theDockerfile
, because it is docker specific staff and not supported by the official container spec. We can add aHEALTHCHECK
definition as default, but I like to skip it, because maybe it can break user environments. For example, when the healthcheck requires to much CPU time and returns a failure, which leads to be an unhealthy container. Other applications can consume this state, like reverse proxy servers. This reverse proxy servers can skip the application and leads to an unreachable bazarr instance.How Has This Been Tested?
Executed the healthcheck locally: