Operator Configuration

This document explains how to configure the operator itself. Flags, environment variables and more.

Watching Namespaces

Operator is cabpable of watching one, multiple or all namespaces in the cluster. To configure which namespaces to watch, use the WATCH_NAMESPACE environment variable of the operator’s Deployment or define them in the Helm chart values under operator.watchedNamespaces (an array; see values-operator.yaml on the Getting Started page for reference).

To watch all namespaces in the cluster set the WATCH_NAMESPACE environment variable to an empty string, or operator.watchedNamespaces in the Helm chart to an empty array.

Note: to watch all namespaces in the cluster, Operator’s ServiceAccount needs to have the necessary permissions. In the Helm chart values, setting operator.useClusterRBAC to true will create ClusterRole and ClusterRoleBinding instead of creating namespace-scoped resources.

Label Selector

Configured via LABEL_SELECTOR environment variable or, in case of Helm chart, operator.labelSelector string value. For syntax see this page. For example, setting the label selector to mylabel=myvalue will additionally limit the Operator’s interest in Custom Resources to the ones with the matching label. This option might be useful when setting Operator to watch all namespaces in the cluster and dynamically assigning resources to different instances of the operator.

Debug

To enable debug logging use the flag –debug=true as one of the run arguments.

License

To set the name of the license secret, use the license-secret=secret-name command line flag, or operator.licenseSecretName value in the Operator’s Helm chart.