Fix: Rename parameter to better match functionality
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
f1c1d1511f
commit
40590071d9
2 changed files with 14 additions and 5 deletions
|
@ -2,6 +2,15 @@ This repository contains a manager which health-checks given endpoints and gener
|
|||
|
||||
## Configuration
|
||||
|
||||
```console
|
||||
# ipt-loadbalancer --help
|
||||
Usage of ipt-loadbalancer:
|
||||
-c, --config string Configuration file to load (default "config.yaml")
|
||||
-e, --enable-managed-chain Modify PREROUTING / POSTROUTING chain to contain a jump to managed chain
|
||||
--log-level string Log level (debug, info, warn, error, fatal) (default "info")
|
||||
--version Prints current version and exits
|
||||
```
|
||||
|
||||
### Main Configuration File
|
||||
|
||||
```yaml
|
||||
|
|
10
main.go
10
main.go
|
@ -14,10 +14,10 @@ import (
|
|||
|
||||
var (
|
||||
cfg = struct {
|
||||
Config string `flag:"config,c" default:"config.yaml" description:"Configuration file to load"`
|
||||
InsertIntoPrerouting bool `flag:"insert-into-prerouting,i" default:"false" description:"Modify PREROUTING chain to contain a jump to managed chain"`
|
||||
LogLevel string `flag:"log-level" default:"info" description:"Log level (debug, info, warn, error, fatal)"`
|
||||
VersionAndExit bool `flag:"version" default:"false" description:"Prints current version and exits"`
|
||||
Config string `flag:"config,c" default:"config.yaml" description:"Configuration file to load"`
|
||||
EnableManagedChain bool `flag:"enable-managed-chain,e" default:"false" description:"Modify PREROUTING / POSTROUTING chain to contain a jump to managed chain"`
|
||||
LogLevel string `flag:"log-level" default:"info" description:"Log level (debug, info, warn, error, fatal)"`
|
||||
VersionAndExit bool `flag:"version" default:"false" description:"Prints current version and exits"`
|
||||
}{}
|
||||
|
||||
version = "dev"
|
||||
|
@ -63,7 +63,7 @@ func main() {
|
|||
logrus.WithError(err).Fatal("creating managed chain")
|
||||
}
|
||||
|
||||
if cfg.InsertIntoPrerouting {
|
||||
if cfg.EnableManagedChain {
|
||||
if err = ipt.EnableMangedRoutingChains(); err != nil {
|
||||
logrus.WithError(err).Fatal("enabling routing")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue