Skip to content

Latest commit

 

History

History
69 lines (52 loc) · 2.73 KB

command_line_and_environment.md

File metadata and controls

69 lines (52 loc) · 2.73 KB

Command-line options

The following command-line options are supported for the operator:

  • -kubeconfig the path to the kubeconfig file. Usually named config, it contains authorization information as well as the URL of the Kubernetes master.

  • -outofcluster run the operator on a client machine, as opposed to a within the cluster. When running in this mode, the operator cannot connect to databases inside the cluster, as well as call URLs of in-cluster objects (i.e. teams api server). Mostly useful for debugging, it also requires setting the OPERATOR_NAMESPACE environment variable for the operator own namespace.

  • -nodatabaseaccess disable database access from the operator. Equivalent to the enable_database_access set to off. The flag takes precedence over the operator configuration option.

  • -noteamsapi disable access to the teams API. Equivalent to the enable_teams_api set to off. The flag takes precedence over the operator configuration option.

  • -kubeqps set the maximum number of Kubernetes API requests per second. Default is 10.

  • -kubeburst set the burst limit for Kubernetes API requests, allowing temporary spikes beyond the configured QPS. Default is 20.

Environment variables

The following environment variables are accepted by the operator:

  • CONFIG_MAP_NAME name of the config map where the operator should look for its configuration. Optional. When not set the operator starts with default values.

  • POSTGRES_OPERATOR_CONFIGURATION_OBJECT name of the OperatorConfiguration custom resource (in the operator namespace) where the operator should look for its configuration. When it is set, the operator reads its configuration from this object and does not read the config map named by CONFIG_MAP_NAME. When it is not set, the operator uses the config map settings (see CONFIG_MAP_NAME).

  • OPERATOR_NAMESPACE name of the namespace the operator runs it. Overrides autodetection by the operator itself.

  • WATCHED_NAMESPACE the name of the namespace the operator watches. Special '*' character denotes all namespaces. Empty value defaults to the operator namespace. Overrides the watched_namespace operator parameter.

  • SCALYR_API_KEY (deprecated) the value of the Scalyr API key to supply to the pods. Overrides the scalyr_api_key operator parameter.

  • CRD_READY_WAIT_TIMEOUT defines the timeout for the complete postgresql CRD creation. When not set default is 30s.

  • CRD_READY_WAIT_INTERVAL defines the interval between consecutive attempts waiting for the postgresql CRD to be created. The default is 4s.

  • ENABLE_JSON_LOGGING Set to true for JSON formatted logging output. The default is false.