github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/cmd/reloader/README.md (about)

     1  <h1>Reloader</h1>
     2  
     3  # 1. Introduction
     4  
     5  Reloader is a service that watch changes in `ConfigMap` and trigger a config dynamic reload without process restart. Reloader is capable of killing containers or processes in pod, serviced through GRPC API, the controller do rolling upgrades on Pods by using the API.
     6  
     7  # 2. Getting Started
     8  
     9  You can get started with Reloader, by any of the following methods:
    10  * Download the release for your platform from github.com/apecloud/kubeblocks/release
    11  * Use the available Reloader docker image `docker run -it apecloud/kubeblocks`
    12  * Build `reloader` from sources
    13  
    14  ## 2.1 Build
    15  
    16  Compiler `Go 1.20+` (Generics Programming Support), checking the [Go Installation](https://go.dev/doc/install) to see how to install Go on your platform.
    17  
    18  Use `make reloader` to build and produce the `reloader` binary file. The executable is produced under current directory.
    19  
    20  ```shell
    21  $ cd kubeblocks
    22  $ make reloader
    23  ```
    24  
    25  ## 2.2 Run
    26  
    27  You can run the following command to start Reloader once built
    28  
    29  ```shell
    30  reloader Provides a mechanism to implement reload config files in a sidecar for kubeblocks.
    31  
    32  Usage:
    33    reloader [flags]
    34  
    35  Flags:
    36        --container-runtime string   the config set cri runtime type. (default "auto")
    37        --debug                      the config set debug.
    38        --disable-runtime            the config set disable runtime.
    39    -h, --help                       help for reloader
    40        --log-level string           the config set log level. enum: [error, info, debug] (default "info")
    41        --notify-type notifyType     the config describe how to process notification messages. (default signal)
    42        --pod-ip string              the config set pod ip address. (default "127.0.0.1")
    43        --process string             the config describe what is db program.
    44        --regex string               the config set filter config file.
    45        --runtime-endpoint string    the config set cri runtime endpoint.
    46        --signal string              the config describe reload unix signal. (default "SIGHUP")
    47        --tcp int                    the config set service port. (default 9901)
    48        --volume-dir stringArray     the config map volume directory to watch for updates; may be used multiple times.
    49        
    50  ```
    51  
    52  ```shell
    53  ./bin/reloader --disable-runtime --log-level debug --process mysqld --signal SIGHUP --volume-dir /opt/mysql --volume-dir /etc/mysql
    54  
    55  ```
    56  
    57  
    58  # 3. License
    59  
    60  Reloader is under the AGPL 3.0 license. See the [LICENSE](../../LICENSE) file for details.