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_NAMESPACEenvironment variable for the operator own namespace. -
-nodatabaseaccess disable database access from the operator. Equivalent to the
enable_database_accessset to off. The flag takes precedence over the operator configuration option. -
-noteamsapi disable access to the teams API. Equivalent to the
enable_teams_apiset 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.
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
OperatorConfigurationcustom 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 byCONFIG_MAP_NAME. When it is not set, the operator uses the config map settings (seeCONFIG_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_namespaceoperator parameter. -
SCALYR_API_KEY (deprecated) the value of the Scalyr API key to supply to the pods. Overrides the
scalyr_api_keyoperator parameter. -
CRD_READY_WAIT_TIMEOUT defines the timeout for the complete
postgresqlCRD creation. When not set default is 30s. -
CRD_READY_WAIT_INTERVAL defines the interval between consecutive attempts waiting for the
postgresqlCRD to be created. The default is 4s. -
ENABLE_JSON_LOGGING Set to
truefor JSON formatted logging output. The default is false.