Cennso PostgreSQL Operator
The Cennso PostgreSQL Operator is represented by the PostgreSQLOperator Custom Resource (CR) and defines:
- a location where the database operator should be deployed, such as the Management Cluster or the name of the Core Cluster, and a Kubernetes namespace
- a list of Kubernetes namespaces in which the database operator manages the PostgreSQL clusters
- a Kubernetes Storage ClassOpens in a new tab for attaching the Persistent VolumesOpens in a new tab requested by the database instances
The sections below provide information about configuration parameters that you can specify in the PostgreSQLOperator CR. For more information on how to configure and deploy the database operator, see the Deploy Cennso PostgreSQL and Cennso PostgreSQL Operator Custom Resource Definition documents.
Kubernetes cluster secret reference
To deploy the Cennso PostgreSQL Operator to a Core Cluster, you must specify the reference to the Kubernetes secretOpens in a new tab so this cluster can be accessible. You can do this using the following configuration parameters:
Set spec.connectionSecretRef.name to the name of the Core Cluster where the Cennso PostgreSQL Operator should be installed. The spec.connectionSecretRef.namespace configuration parameter defines the Kubernetes Namespace on the Management Cluster where the Kubernetes secret to access this Core Cluster is stored.
If you want to deploy the Cennso PostgreSQL Operator to the Management Cluster, do not specify spec.connectionSecretRef.
Image and chart configuration
You can use the following configuration parameters to specify the container image version, together with the secret to pull the image and the Helm chart for the Cennso PostgreSQL Operator:
Scheduling and placement configuration
PostgreSQLOperator custom resource allows you to configure the Cennso PostgreSQL Operator scheduling and placement settings according to your needs.
To control where the Cennso PostgreSQL Operator Pods run and how they are distributed across nodes, use the following configuration options:
- spec.nodeSelectorOpens in a new tab
- spec.tolerationsOpens in a new tab
- spec.affinityOpens in a new tab
You can also add custom annotations to the operator Pods with the spec.podAnnotations configuration option.
In addition, you should specify the spec.operatorNamespace configuration option which controls the Kubernetes namespace name where the Cennso PostgreSQL Operator should be deployed.
Namespaces for the database clusters
The database operator is configured to operate the PostgreSQL clusters which are located in the given Kubernetes namespaces. You can specify one or multiple Kubernetes namespaces where the database clusters are deployed and managed by the database operator. To do this, use the following configuration option:
Storage configuration
The storage configuration section allows you to declare the StorageClass and the node-local paths which the database operator creates to assign to the persistent volumes:
Each entry becomes a StorageClass backed by the local-path-provisionerOpens in a new tab, which creates the volumes under spec.storage.classes[].nodePath on the node where a Pod can be scheduled. A PostgreSQLInstance can refer to the class by name in spec.instances[].storage.className. For more information, see the Storage configuration section of the Cennso PostgreSQL Instance document.
The local-path-provisioner only creates volumes under the paths listed in the nodePathMap of its local-path-config ConfigMap on the target cluster. The spec.storage.classes[].nodePath must match one of these paths exactly for the nodes where the PostgreSQL Pods run. Otherwise, the Persistent Volume Claims stay Pending and the provisioner reports config doesn't contain path. Ask the cluster administrator which paths are configured before you choose a spec.storage.classes[].nodePath.
The StorageClass resources are preserved when the PostgreSQLOperator CR is deleted, because the volumes of the running PostgreSQL instances still reference them.
Logging configuration
You can configure the log level and whether the operator emits structured logs using the following configuration options:
The spec.logging.level configuration option supports DEBUG, INFO, and ERROR. The default value is INFO.
Resources configuration
PostgreSQLOperator custom resource allows you to configure the resourcesOpens in a new tab for the Cennso PostgreSQL Operator using the following configuration options: