Update readme and sample to use DaprInstance instead of DaprControlPlane

Signed-off-by: Bas van de Louw <31651306+basvdlouw@users.noreply.github.com>

Update README.md

Signed-off-by: Bas van de Louw <31651306+basvdlouw@users.noreply.github.com>

Update sample to use DaprInstance instead of DaprControlPlane

Signed-off-by: Bas van de Louw <31651306+basvdlouw@users.noreply.github.com>

Update README and Sample to use DaprInstance instead of DaprControlPlane
This commit is contained in:
Bas van de Louw 2024-08-26 11:47:36 +02:00 committed by Bas van de Louw
parent 9799eb4e89
commit 60422bf84d
2 changed files with 21 additions and 11 deletions

View File

@ -43,6 +43,16 @@ The following example shows the most minimal valid manifest to create a new Dapr
```yaml
apiVersion: operator.dapr.io/v1alpha1
kind: DaprInstance
metadata:
name: "dapr-instance"
spec:
values: {}
```
```yaml
# Deprecated, use DaprInstance instead
apiVersion: operator.dapr.io/v1alpha1
kind: DaprControlPlane
metadata:
name: "dapr-control-plane"
@ -50,17 +60,17 @@ 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.
The `DaprInstance` 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.
When the `Dapr Kubernetes Operator` sees a new `DaprInstance` 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.
When something changes on an existing `DaprInstance` 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 at a given point in time.
> Any additional `DaprControlPlane` resources will be moved to an `Error` state and ignored.
> The operator expect that a single `DaprInstance` named `dapr-instance` and placed in the same namespace where the operator runs exists at a given point in time.
> Any additional `DaprInstance` resources will be moved to an `Error` state and ignored.
The `DaprControlPlane` Custom Resource consists of the following properties
The `DaprInstance` Custom Resource consists of the following properties
| Name | Default | Description |
|--------|---------|------------------------------------------------------------------|
@ -85,9 +95,9 @@ kubectl apply -n openshift-operators -f config/samples/basic/dapr-basic.yaml
There will be several Dapr controllers and resources created that should be familiar to anyone who has deployed Dapr before using [helm](https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-deploy/#install-with-helm-advanced):
```bash
➜ kubecto tree daprcontrolplanes.operator.dapr.io dapr-control-plane
➜ kubecto tree daprinstance.operator.dapr.io dapr-instance
NAMESPACE NAME READY REASON AGE
openshift-operators DaprControlPlane/dapr-control-plane True Ready 72s
openshift-operators DaprInstance/dapr-instance True Ready 72s
openshift-operators ├─ConfigMap/dapr-trust-bundle - 68s
openshift-operators ├─Configuration/daprsystem - 68s
openshift-operators ├─Deployment/dapr-operator - 68s

View File

@ -1,7 +1,7 @@
apiVersion: operator.dapr.io/v1alpha1
kind: DaprControlPlane
kind: DaprInstance
metadata:
name: "dapr-control-plane"
name: "dapr-instance"
spec:
# This object provides access to values passed into the Dpr Helm chart
# This object provides access to values passed into the Dapr Helm chart
values: {}