# KubeDB Ops Manager

[KubeDB Ops Manager by AppsCode](https://github.com/kubedb) - Enterprise features for KubeDB by AppsCode

## TL;DR;

```bash
$ helm repo add appscode https://charts.appscode.com/stable/
$ helm repo update
$ helm search repo appscode/kubedb-ops-manager --version=v0.53.0
$ helm upgrade -i kubedb-ops-manager appscode/kubedb-ops-manager -n kubedb --create-namespace --version=v0.53.0
```

## Introduction

This chart deploys a KubeDB Ops Manager operator on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.

## Prerequisites

- Kubernetes 1.20+

## Installing the Chart

To install/upgrade the chart with the release name `kubedb-ops-manager`:

```bash
$ helm upgrade -i kubedb-ops-manager appscode/kubedb-ops-manager -n kubedb --create-namespace --version=v0.53.0
```

The command deploys a KubeDB Ops Manager operator on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.

> **Tip**: List all releases using `helm list`

## Uninstalling the Chart

To uninstall the `kubedb-ops-manager`:

```bash
$ helm uninstall kubedb-ops-manager -n kubedb
```

The command removes all the Kubernetes components associated with the chart and deletes the release.

## Configuration

The following table lists the configurable parameters of the `kubedb-ops-manager` chart and their default values.

|                             Parameter                              |                                                                                                                                                                                  Description                                                                                                                                                                                   |                                                                                            Default                                                                                             |
|--------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| nameOverride                                                       | Overrides name template                                                                                                                                                                                                                                                                                                                                                        | <code>""</code>                                                                                                                                                                                |
| fullnameOverride                                                   | Overrides fullname template                                                                                                                                                                                                                                                                                                                                                    | <code>""</code>                                                                                                                                                                                |
| replicaCount                                                       | Number of KubeDB operator replicas to create (only 1 is supported)                                                                                                                                                                                                                                                                                                             | <code>1</code>                                                                                                                                                                                 |
| license                                                            | License for the product. Get a license by following the steps from [here](https://stash.run/docs/latest/setup/install/enterprise#get-a-trial-license). <br> Example: <br> `helm install appscode/kubedb-ops-manager \` <br> `--set-file license=/path/to/license/file` <br> `or` <br> `helm install appscode/kubedb-ops-manager \` <br> `--set license=<license file content>` | <code>""</code>                                                                                                                                                                                |
| licenseSecretName                                                  | Name of Secret with the license as key.txt key                                                                                                                                                                                                                                                                                                                                 | <code>""</code>                                                                                                                                                                                |
| registryFQDN                                                       | Docker registry fqdn used to pull KubeDB related images Set this to use docker registry hosted at ${registryFQDN}/${registry}/${image}                                                                                                                                                                                                                                         | <code>ghcr.io</code>                                                                                                                                                                           |
| insecureRegistries                                                 | Specify an array of insecure registries. <br> Example: <br> `helm template charts/kubedb-ops-manager \` <br> `--set insecureRegistries[0]=hub.company.com \` <br> `--set insecureRegistries[1]=reg.example.com`                                                                                                                                                                | <code>[]</code>                                                                                                                                                                                |
| operator.registry                                                  | Docker registry used to pull KubeDB ops manager image                                                                                                                                                                                                                                                                                                                          | <code>kubedb</code>                                                                                                                                                                            |
| operator.repository                                                | KubeDB ops manager container image                                                                                                                                                                                                                                                                                                                                             | <code>kubedb-ops-manager</code>                                                                                                                                                                |
| operator.tag                                                       | KubeDB ops manager container image tag                                                                                                                                                                                                                                                                                                                                         | <code>""</code>                                                                                                                                                                                |
| operator.securityContext                                           | Security options this container should run with                                                                                                                                                                                                                                                                                                                                | <code>{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true,"runAsUser":65534,"seccompProfile":{"type":"RuntimeDefault"}}</code> |
| operator.resources                                                 | Compute Resources required by this container                                                                                                                                                                                                                                                                                                                                   | <code>{}</code>                                                                                                                                                                                |
| waitfor.registry                                                   | Docker registry used to pull KubeDB enterprise kubectl-nonroot image                                                                                                                                                                                                                                                                                                           | <code>appscode</code>                                                                                                                                                                          |
| waitfor.repository                                                 | KubeDB enterprise kubectl-nonroot container image                                                                                                                                                                                                                                                                                                                              | <code>kubectl-nonroot</code>                                                                                                                                                                   |
| waitfor.tag                                                        | KubeDB enterprise kubectl-nonroot container image tag                                                                                                                                                                                                                                                                                                                          | <code>"1.34"</code>                                                                                                                                                                            |
| imagePullSecrets                                                   | Specify an array of imagePullSecrets. Secrets must be manually created in the namespace. <br> Example: <br> `helm template charts/kubedb-ops-manager \` <br> `--set imagePullSecrets[0].name=sec0 \` <br> `--set imagePullSecrets[1].name=sec1`                                                                                                                                | <code>[]</code>                                                                                                                                                                                |
| imagePullPolicy                                                    | Container image pull policy                                                                                                                                                                                                                                                                                                                                                    | <code>IfNotPresent</code>                                                                                                                                                                      |
| criticalAddon                                                      | If true, installs KubeDB operator as critical addon                                                                                                                                                                                                                                                                                                                            | <code>false</code>                                                                                                                                                                             |
| logLevel                                                           | Log level for operator                                                                                                                                                                                                                                                                                                                                                         | <code>5</code>                                                                                                                                                                                 |
| annotations                                                        | Annotations applied to operator deployment                                                                                                                                                                                                                                                                                                                                     | <code>{}</code>                                                                                                                                                                                |
| podAnnotations                                                     | Annotations passed to operator pod(s).                                                                                                                                                                                                                                                                                                                                         | <code>{}</code>                                                                                                                                                                                |
| nodeSelector                                                       | Node labels for pod assignment                                                                                                                                                                                                                                                                                                                                                 | <code>{"kubernetes.io/os":"linux"}</code>                                                                                                                                                      |
| tolerations                                                        | Tolerations for pod assignment                                                                                                                                                                                                                                                                                                                                                 | <code>[]</code>                                                                                                                                                                                |
| affinity                                                           | Affinity rules for pod assignment                                                                                                                                                                                                                                                                                                                                              | <code>{}</code>                                                                                                                                                                                |
| podSecurityContext                                                 | Security options the operator pod should run with.                                                                                                                                                                                                                                                                                                                             | <code>{}</code>                                                                                                                                                                                |
| serviceAccount.create                                              | Specifies whether a service account should be created                                                                                                                                                                                                                                                                                                                          | <code>true</code>                                                                                                                                                                              |
| serviceAccount.annotations                                         | Annotations to add to the service account                                                                                                                                                                                                                                                                                                                                      | <code>{}</code>                                                                                                                                                                                |
| serviceAccount.name                                                | The name of the service account to use. If not set and create is true, a name is generated using the fullname template                                                                                                                                                                                                                                                         | <code></code>                                                                                                                                                                                  |
| apiserver.useKubeapiserverFqdnForAks                               | If true, uses kube-apiserver FQDN for AKS cluster to workaround https://github.com/Azure/AKS/issues/522 (default true)                                                                                                                                                                                                                                                         | <code>true</code>                                                                                                                                                                              |
| apiserver.healthcheck.enabled                                      | healthcheck configures the readiness and liveliness probes for the operator pod.                                                                                                                                                                                                                                                                                               | <code>true</code>                                                                                                                                                                              |
| apiserver.healthcheck.probePort                                    | The port the probe endpoint binds to                                                                                                                                                                                                                                                                                                                                           | <code>8081</code>                                                                                                                                                                              |
| monitoring.bindPort                                                | The port the metric endpoint binds to                                                                                                                                                                                                                                                                                                                                          | <code>8080</code>                                                                                                                                                                              |
| monitoring.agent                                                   | Name of monitoring agent (one of "prometheus.io", "prometheus.io/operator", "prometheus.io/builtin")                                                                                                                                                                                                                                                                           | <code>""</code>                                                                                                                                                                                |
| monitoring.serviceMonitor.labels                                   | Specify the labels for ServiceMonitor. Prometheus crd will select ServiceMonitor using these labels. Only usable when monitoring agent is `prometheus.io/operator`.                                                                                                                                                                                                            | <code>{"monitoring.appscode.com/prometheus":"auto"}</code>                                                                                                                                     |
| recommendationEngine.resyncPeriod                                  | Recommendation will be generated after every given duration based on the resource status at that moment. Default value is one hour. The flag accepts a integer 64 bit value in nanosecond for time.Duration. Ref: https://pkg.go.dev/time#Duration                                                                                                                             | <code>1h0m0s</code>                                                                                                                                                                            |
| recommendationEngine.deadline.enable                               | If enable is false, deadline will not be set in the generated recommendations                                                                                                                                                                                                                                                                                                  | <code>false</code>                                                                                                                                                                             |
| recommendationEngine.deadline.maxEvaluationPeriod                  | If enable is true, maxEvaluationPeriod is the value to be used as deadline time.                                                                                                                                                                                                                                                                                               | <code>168h0m0s</code>                                                                                                                                                                          |
| recommendationEngine.rotateTLS.genRecommendationBeforeExpiryYear   | It also depends on gen-rotate-tls-recommendation-before-expiry-month and gen-rotate-tls-recommendation-before-expiry-year. Default values are 0(zero) for gen-rotate-tls-recommendation-before-expiry-year, 1(one) for gen-rotate-tls-recommendation-before-expiry-month, 0(zero) for gen-rotate-tls-recommendation-before-expiry-day flags.                                   | <code>0</code>                                                                                                                                                                                 |
| recommendationEngine.rotateTLS.genRecommendationBeforeExpiryMonth  | Rotate TLS recommendation will be generated before given month of expiration. It also depends on gen-rotate-tls-recommendation-before-expiry-year and gen-rotate-tls-recommendation-before-expiry-day flag. By default it is set as 1(one).                                                                                                                                    | <code>1</code>                                                                                                                                                                                 |
| recommendationEngine.rotateTLS.genRecommendationBeforeExpiryDay    | Rotate TLS recommendation will be generated before given day of expiration. It also depends on gen-rotate-tls-recommendation-before-expiry-year and gen-rotate-tls-recommendation-before-expiry-month flag. By default it is set as 0(zero).                                                                                                                                   | <code>0</code>                                                                                                                                                                                 |
| recommendationEngine.rotateAuth.genRecommendationBeforeExpiryYear  | Rotate Auth recommendation will be generated before given year of expiration.                                                                                                                                                                                                                                                                                                  | <code>0</code>                                                                                                                                                                                 |
| recommendationEngine.rotateAuth.genRecommendationBeforeExpiryMonth | Rotate Auth recommendation will be generated before given month of expiration.                                                                                                                                                                                                                                                                                                 | <code>1</code>                                                                                                                                                                                 |
| recommendationEngine.rotateAuth.genRecommendationBeforeExpiryDay   | Rotate Auth recommendation will be generated before given day of expiration.                                                                                                                                                                                                                                                                                                   | <code>0</code>                                                                                                                                                                                 |
| psp.enabled                                                        |                                                                                                                                                                                                                                                                                                                                                                                | <code>false</code>                                                                                                                                                                             |
| maxConcurrentReconciles                                            | The maximum number of concurrent reconciles which can be run                                                                                                                                                                                                                                                                                                                   | <code>0</code>                                                                                                                                                                                 |
| envFrom                                                            | List of sources to populate environment variables in the container                                                                                                                                                                                                                                                                                                             | <code>[]</code>                                                                                                                                                                                |
| env                                                                | List of environment variables to set in the container                                                                                                                                                                                                                                                                                                                          | <code>[]</code>                                                                                                                                                                                |
| distro.openshift                                                   |                                                                                                                                                                                                                                                                                                                                                                                | <code>false</code>                                                                                                                                                                             |
| distro.ubi                                                         |                                                                                                                                                                                                                                                                                                                                                                                | <code>""</code>                                                                                                                                                                                |


Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:

```bash
$ helm upgrade -i kubedb-ops-manager appscode/kubedb-ops-manager -n kubedb --create-namespace --version=v0.53.0 --set replicaCount=1
```

Alternatively, a YAML file that specifies the values for the parameters can be provided while
installing the chart. For example:

```bash
$ helm upgrade -i kubedb-ops-manager appscode/kubedb-ops-manager -n kubedb --create-namespace --version=v0.53.0 --values values.yaml
```
