doc: add configuration instructions

Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
This commit is contained in:
Luca Burgazzoli 2023-09-08 10:09:38 +02:00
parent ce8437d6e7
commit 473038c3a6
No known key found for this signature in database
GPG Key ID: 238C46A40510C1A9
1 changed files with 32 additions and 2 deletions

View File

@ -1,6 +1,7 @@
# Dapr Kubernetes Operator
This project was created by [@lburgazzoli in this repository](https://github.com/lburgazzoli/dapr-operator-ng) and donated to the Dapr Sandbox organization.
The `Dapr Kubernetes Operator` manages the lifecycle for Dapr and its components.
The operator's goal is to automate the tasks required when operating a Dapr running in [Kubernetes Mode](https://docs.dapr.io/operations/hosting/kubernetes/).
## Installation
@ -35,10 +36,39 @@ The operator can be installed manually if desired.
The [Manual Installation Guide][install_manual] provides the steps needed to manually install the operator on any
Kubernetes cluster.
## Configuration
The following example shows the most minimal valid manifest to create a new Dapr instance:
```yaml
apiVersion: operator.dapr.io/v1alpha1
kind: DaprControlPlane
metadata:
name: "dapr-control-plane"
spec:
values: {}
```
The `DaprControlPlane` resource is a Kubernetes Custom Resource (CRD) that describes the desired state for a given Dapr instance and allows for the configuration of the components that make up the instance.
When the `Dapr Kubernetes Operator` sees a new `DaprControlPlane` resource, the Dapr components are provisioned using Kubernetes resources generated from the official [Dapr Helm Charts](https://github.com/dapr/helm-charts) and managed by the operator.
This means that the same configuration option that are available when [installing Dapr using Helm](https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-deploy/#install-with-helm-advanced) can also be used to configure the `Dapr Kubernetes Operator`
When something changes on an existing `DaprControlPlane` resource or any resource generated by the operator, the operator works to reconfigure the cluster to ensure the actual state of the cluster matches the desired state.
> [!IMPORTANT]
> The operator expect that a single `DaprControlPlane` named `dapr-control-plane` and placed in the same namespace where the operator runs exists in a given point in time.
> Any additional `DaprControlPlane` resources will be moved to an `Error` state and ignored.
The `DaprControlPlane` Custom Resource consists of the following properties
| Name | Default | Description |
|--------|---------|------------------------------------------------------------------|
| values | [Empty] | The [values][helm_configuration] passed into the Dapr Helm chart |
[install_manual]:./docs/install/manual.md
[install_olm]:./docs/install/olm.md
[install_openshift]:./docs/install/openshift.md
[olm_home]:https://github.com/operator-framework/operator-lifecycle-manager
[openshift_home]:https://try.openshift.com
[operatorhub_link]:https://operatorhub.io/operator/dapr-kubernetes-operator
[operatorhub_link]:https://operatorhub.io/operator/dapr-kubernetes-operator
[helm_configuration]:https://github.com/dapr/dapr/blob/master/charts/dapr/README.md#configuration