Skip to content

[MIRROR]: Source files of the container image volkerraschek/tarr

License

Notifications You must be signed in to change notification settings

volker-raschek/tarr

Repository files navigation

tarr

Build Status Docker Pulls

The tarr project contains small binaries / tools for interacting with *arr applications. The tools are helpful in a kubernetes environment to retrofit missing functions of the *arr applications.

Note

Instead of compiling the tarr applications by yourself, use the tarr container image instead. More described below.

autharr

The binary autharr is a small program to extract from a config.xml or config.yaml the API token. The token is written to the standard output. Alternatively, it can also be written to a file.

With regard to exportarr, it can be helpful in the Kubernetes environment to extract the token and use it for other API queries. For example for healthchecks. It therefore solve the following problem.

$ autharr /etc/bazarr/config.yaml
do7IuHiewooFaiyu
$ autharr /etc/lidarr/config.xml
aeteipei4Meing5i

Alternatively, the --watch flag can be set. This monitors the config file and writes the API token to the defined output in the event of changes.

$ autharr --watch /etc/bazarr/config.yaml
baGohkie9EL5Tahr
oov1liQuaiki1lar
vaeGa9Cheeheev2I

Pipe the output direct into a file. Exit the program by Ctrl+C.

$ autharr --watch /etc/bazarr/config.yaml /tmp/bazarr/token
^C
$

healarr

The binary healarr is a small program to check if the *arr application is healthy. Some *arr applications does not have implemented a dedicated REST endpoint for healthchecks or like the liveness or readiness probe. Instead will be called the API for a status, which returns 200 if the *arr instance is healthy.

healarr uses the internal packages from autharr to extract the API token from a config file. Alternatively can directly passed the API token as flag.

$ if healarr bazarr https://bazarr.example.com --config /etc/bazarr/config.xml; then
>   echo "Healthy"
> else
>   echo "Unhealthy"
> fi
Healthy

container-image

The container image docker.io/volkerraschek/tarr contains all tarr applications. The command below is an example to start autharr of the container image volkerraschek/tarr via docker. autharr is watching for changes of the API token. Any change will be written to the standard output.

Note

Adapt the volume mount, if you want to write the token to file on the host system.

$ docker run \
  --rm \
  --volume /etc/bazarr:/etc/bazarr:ro \
    docker.io/volkerraschek/tarr:latest \
      autharr --watch /etc/bazarr/config.yaml