> For the complete documentation index, see [llms.txt](https://docs.cennso.com/cennso/cennso-db/1.1/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/cennso/cennso-db/1.1/cennso-db-operator.md).

# Cennso Database Operator

The `percona-db-operator` composition implements the Cennso Database (Cennso DB) Operator Composite Resource Definition (XRD).

## Deploy Cennso DB Operator

1. Prepare the `DBOperator` Custom Resource (CR) to deploy the Cennso DB Operator in your cluster. This CR defines the connection to the Core Cluster and the operator configuration. For example:

   ```yaml
   apiVersion: db.contrib.cennso.com/v1alpha1
   kind: DBOperator
   metadata:
      name: mydboperator
      namespace: cennso-infra
   spec:
      connectionSecretRef:
         name: mycorecluster
         namespace: cennso-infra
      watchNamespaces:
      - mydbnamespace
      storage:
         classes:
            - nodePath: /opt/local-path-provisioner/mystorage
              name: mystorage
   ```

   For further details, see the [Cennso DB Operator CRD definition](https://docs.cennso.com/cennso/cennso-db/1.1/technical-reference/configurations/cennso-db/xdboperator_definition.md).

2. Apply the prepared CR to your Management Cluster:

   ```bash
   kubectl apply -f mydboperator.yaml
   ```

## Update Cennso DB Operator

It's strongly recommended to set the `spec.compositionUpdatePolicy` to `Manual` to avoid automatic updates of the DB Operator composition. This allows you to control when the updates are applied and ensures that the operator is not disrupted during the update process.

To update the CennsoDBOperator, delete the existing CR and apply the updated version. This ensures that the operator is updated to the latest composition.

>**WARNING**: Keep the Percona MySQL Operator version in sync with the existing Cennso DB Instances as major changes could break the existing instances.
