Skip to content

Agent flags

Every command-line flag of the agent (the binary built from cmd/enforcer/main.go), with its type, default and description. Generated from the binary's --help output.

The agent reads its configuration from flags only; it has no environment variable equivalents.

Flag Type Default Description
--cluster-name string Name of this cluster in the Protem fleet (required)
--hub-context string Override kubectl context to connect to hub cluster
--hub-kubeconfig string Path to hub kubeconfig (defaults to standard kubeconfig)
--hub-token-secret string / of a Secret on the target cluster that stores the renewed hub token (empty: memory only)
--hub-token-ttl duration 24h0m0s Lifetime of each hub token the agent requests; it renews after a third of it (minimum 10m)
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
--subject-template string "{{.Email}}" Template for mapping user to RBAC subject
--sync-interval duration 3s Polling and sync interval with Hub
--target-context string Override kubectl context to connect to the target cluster
--target-kubeconfig string Path to target cluster kubeconfig (defaults to standard kubeconfig)
--zap-devel bool true Development Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error)
--zap-encoder value Zap log encoding (one of 'json' or 'console')
--zap-log-level value Zap Level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error', 'panic'or any integer value > 0 which corresponds to custom debug levels of increasing verbosity
--zap-stacktrace-level value Zap Level at and above which stacktraces are captured (one of 'info', 'error', 'panic').
--zap-time-encoding value Zap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'). Defaults to 'epoch'.