Skip to content

Commit

Permalink
Add docs for CLI flags and feature flags
Browse files Browse the repository at this point in the history
Signed-off-by: Mac Chaffee <machaffe@renci.org>
  • Loading branch information
mac-chaffee committed Dec 17, 2022
1 parent 2e323dd commit 613b06e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions docs/spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,42 @@ group of `HelmRelease` resources to be monitored using the [notification-control

The API design of the controller can be found at [helm.toolkit.fluxcd.io/v2beta1](./v2beta1/helmreleases.md).

## Configuration

Here are the command line flags currently supported by the Helm Controller:

```
Usage of helm-controller:
--concurrent int The number of concurrent HelmRelease reconciles. (default 4)
--default-service-account string Default service account used for impersonation.
--enable-leader-election Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.
--events-addr string The address of the events receiver.
--feature-gates mapStringBool A comma separated list of key=value pairs defining the state of experimental features.
--graceful-shutdown-timeout duration The duration given to the reconciler to finish before forcibly stopping.
--health-addr string The address the health endpoint binds to. (default ":9440")
--http-retry int The maximum number of retries when failing to fetch artifacts over HTTP. (default 9)
--insecure-kubeconfig-exec Allow use of the user.exec section in kubeconfigs provided for remote apply.
--insecure-kubeconfig-tls Allow that kubeconfigs provided for remote apply can disable TLS verification.
--kube-api-burst int The maximum burst queries-per-second of requests sent to the Kubernetes API. (default 100)
--kube-api-qps float32 The maximum queries-per-second of requests sent to the Kubernetes API. (default 50)
--leader-election-lease-duration duration Interval at which non-leader candidates will wait to force acquire leadership (duration string). (default 35s)
--leader-election-release-on-cancel Defines if the leader should step down voluntarily on controller manager shutdown. (default true)
--leader-election-renew-deadline duration Duration that the leading controller manager will retry refreshing leadership before giving up (duration string). (default 30s)
--leader-election-retry-period duration Duration the LeaderElector clients should wait between tries of actions (duration string). (default 5s)
--log-encoding string Log encoding format. Can be 'json' or 'console'. (default "json")
--log-level string Log verbosity level. Can be one of 'trace', 'debug', 'info', 'error'. (default "info")
--max-retry-delay duration The maximum amount of time for which an object being reconciled will have to wait before a retry. (default 15m0s)
--metrics-addr string The address the metric endpoint binds to. (default ":8080")
--min-retry-delay duration The minimum amount of time for which an object being reconciled will have to wait before a retry. (default 750ms)
--no-cross-namespace-refs When set to true, references between custom resources are allowed only if the reference and the referee are in the same namespace.
--requeue-dependency duration The interval at which failing dependencies are reevaluated. (default 30s)
--watch-all-namespaces Watch for custom resources in all namespaces, if set to false it will only watch the runtime namespace. (default true)
```

These are the currently supported feature gates (controlled by the `--feature-gates=<FlagName>=<true|false>` flag):

* `CacheSecretsAndConfigMaps`: If enabled, Helm Controller will fetch all ConfigMaps and Secrets in the cluster and save them in a cache for faster access. This is disabled by default to reduce RAM usage and reduce cluster-wide RBAC requirements.

## Backward compatibility

| Feature | Helm Controller | Helm Operator |
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func main() {
leaderElectionOptions leaderelection.Options
rateLimiterOptions helper.RateLimiterOptions
)

// NOTE: If you add a new flag, remember to update docs/spec/README.md
flag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.")
flag.StringVar(&eventsAddr, "events-addr", "", "The address of the events receiver.")
flag.StringVar(&healthAddr, "health-addr", ":9440", "The address the health endpoint binds to.")
Expand Down

0 comments on commit 613b06e

Please sign in to comment.