github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/cmd/reloader/tools/README.md (about) 1 <h1>cue-helper</h1> 2 3 # 1. Introduction 4 5 cue-helper is a tool that automatically generating CueLang code, the code is used to verify parameters in configuration files. 6 7 # 2. Getting Started 8 9 You can get started with cue-helper, by the following methods: 10 * Build `cue-helper` from sources 11 12 ## 2.1 Build 13 14 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. 15 16 Use `make cue-helper` to build and produce the `cue-helper` binary file. The executable is produced under current directory. 17 18 ```shell 19 $ cd kubeblocks 20 $ make cue-helper 21 ``` 22 23 ## 2.2 Run 24 25 You can run the following command to start cue-helper once built 26 27 ```shell 28 reloader Provides a mechanism to implement reload config files in a sidecar for kubeblocks. 29 30 Usage of ./bin/cue-helper: 31 -boolean-promotion 32 enable using OFF or ON. 33 -file-path string 34 The generated cue scripts from file. 35 -ignore-string-default 36 ignore string default. (default true) 37 -type-name string 38 cue parameter type name. (default "MyParameter") 39 -output-prefix string 40 prefix, default: "" 41 42 ``` 43 44 ```shell 45 46 # apps template parameters: https://github.com/apecloud/dbaas-template-paramters 47 48 # mysql 49 ./bin/cue-helper --file-path apps-template-paramters/wesql/mysql8.pt --type-name MysqlParameter --boolean-promotion 50 51 # pg14 52 ./bin/cue-helper --file-path apps-template-paramters/pg14/postgresql.pt --type-name PGParameter 53 54 ``` 55 56 57 # 7. License 58 59 Reloader is under the Apache 2.0 license. See the [LICENSE](../../LICENSE) file for details.