|
| 1 | +# Using the ArangoDB Kubernetes Operator with Helm |
| 2 | + |
| 3 | +[`Helm`](https://www.helm.sh/) is a package manager for Kubernetes, which enables |
| 4 | +you to install various packages (include the ArangoDB Kubernetes Operator) |
| 5 | +into your Kubernetes cluster. |
| 6 | + |
| 7 | +The benefit of `helm` (in the context of the ArangoDB Kubernetes Operator) |
| 8 | +is that it allows for a lot of flexibility in how you install the operator. |
| 9 | +For example you can install the operator in a namespace other than |
| 10 | +`default`. |
| 11 | + |
| 12 | +## Charts |
| 13 | + |
| 14 | +The ArangoDB Kubernetes Operator is contained in two `helm` charts: |
| 15 | + |
| 16 | +- `kube-arangodb` which contains the operator for the `ArangoDeployment` |
| 17 | + and `ArangoDeploymentReplication` resource types. |
| 18 | +- `kube-arangodb-storage` which contains the operator for the `ArangoLocalStorage` |
| 19 | + resource type. |
| 20 | + |
| 21 | +The `kube-arangodb-storage` only has to be installed if your Kubernetes cluster |
| 22 | +does not already provide `StorageClasses` that use locally attached SSDs. |
| 23 | + |
| 24 | +## Configurable values for ArangoDB Kubernetes Operator |
| 25 | + |
| 26 | +The following values can be configured when installing the |
| 27 | +ArangoDB Kubernetes Operator with `helm`. |
| 28 | + |
| 29 | +Values are passed to `helm` using an `--set=<key>=<value>` argument passed |
| 30 | +to the `helm install` or `helm upgrade` command. |
| 31 | + |
| 32 | +### Values applicable to both charts |
| 33 | + |
| 34 | +| Key | Type | Description |
| 35 | +|-------------------|--------|-----| |
| 36 | +| Image | string | Override the docker image used by the operators |
| 37 | +| ImagePullPolicy | string | Override the image pull policy used by the operators. See [Updating Images](https://kubernetes.io/docs/concepts/containers/images/#updating-images) for details. |
| 38 | +| RBAC.Create | bool | Set to `true` (default) to create roles & role bindings. |
| 39 | + |
| 40 | +### Values applicable to the `kube-arangodb` chart |
| 41 | + |
| 42 | +| Key | Type | Description |
| 43 | +|-------------------|--------|-----| |
| 44 | +| Deployment.Create | bool | Set to `true` (default) to deploy the `ArangoDeployment` operator |
| 45 | +| Deployment.User.ServiceAccountName | string | Name of the `ServiceAccount` that is the subject of the `RoleBinding` of users of the `ArangoDeployment` operator |
| 46 | +| Deployment.Operator.ServiceAccountName | string | Name of the `ServiceAccount` used to run the `ArangoDeployment` operator |
| 47 | +| Deployment.Operator.ServiceType | string | Type of `Service` created for the dashboard of the `ArangoDeployment` operator |
| 48 | +| Deployment.AllowChaos | bool | Set to `true` to allow the introduction of chaos. **Only use for testing, never for production!** Defaults to `false`. |
| 49 | +| DeploymentReplication.Create | bool | Set to `true` (default) to deploy the `ArangoDeploymentReplication` operator |
| 50 | +| DeploymentReplication.User.ServiceAccountName | string | Name of the `ServiceAccount` that is the subject of the `RoleBinding` of users of the `ArangoDeploymentReplication` operator |
| 51 | +| DeploymentReplication.Operator.ServiceAccountName | string | Name of the `ServiceAccount` used to run the `ArangoDeploymentReplication` operator |
| 52 | +| DeploymentReplication.Operator.ServiceType | string | Type of `Service` created for the dashboard of the `ArangoDeploymentReplication` operator |
| 53 | + |
| 54 | +### Values applicable to the `kube-arangodb-storage` chart |
| 55 | + |
| 56 | +| Key | Type | Description |
| 57 | +|-------------------|--------|-----| |
| 58 | +| Storage.User.ServiceAccountName | string | Name of the `ServiceAccount` that is the subject of the `RoleBinding` of users of the `ArangoLocalStorage` operator |
| 59 | +| Storage.Operator.ServiceAccountName | string | Name of the `ServiceAccount` used to run the `ArangoLocalStorage` operator |
| 60 | +| Storage.Operator.ServiceType | string | Type of `Service` created for the dashboard of the `ArangoLocalStorage` operator |
| 61 | + |
| 62 | +## Alternate namespaces |
| 63 | + |
| 64 | +The `kube-arangodb` chart supports deployment into a non-default namespace. |
| 65 | + |
| 66 | +To install the `kube-arangodb` chart is a non-default namespace, use the `--namespace` |
| 67 | +argument like this. |
| 68 | + |
| 69 | +```bash |
| 70 | +helm install --namespace=mynamespace kube-arangodb.tgz |
| 71 | +``` |
| 72 | + |
| 73 | +Note that since the operators claim exclusive access to a namespace, you can |
| 74 | +install the `kube-arangodb` chart in a namespace once. |
| 75 | +You can install the `kube-arangodb` chart in multiple namespaces. To do so, run: |
| 76 | + |
| 77 | +```bash |
| 78 | +helm install --namespace=namespace1 kube-arangodb.tgz |
| 79 | +helm install --namespace=namespace2 kube-arangodb.tgz |
| 80 | +``` |
| 81 | + |
| 82 | +The `kube-arangodb-storage` chart is always installed in the `kube-system` namespace. |
| 83 | + |
| 84 | +## Common problems |
| 85 | + |
| 86 | +### Error: no available release name found |
| 87 | + |
| 88 | +This error is given by `helm install ...` in some cases where it has |
| 89 | +insufficient permissions to install charts. |
| 90 | + |
| 91 | +For various ways to work around this problem go to [this Stackoverflow article](https://stackoverflow.com/questions/43499971/helm-error-no-available-release-name-found). |
0 commit comments