dapr-kubernetes-operator

module
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2023 License: Apache-2.0

README

Dapr Kubernetes Operator

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.

Installation

The Dapr Kubernetes Operator was created with the intention of running through the Operator Lifecycle Manager, specifically on OpenShift 4. This is where the operator shines most, as it leverages the powerful features built into the latest version of OpenShift.

That being said, the operator can be installed and provide the same functionality on any Kubernetes cluster. The following methods are provided for installing the operator.

OpenShift

The operator is published as part of the built-in Community Operators in the Operator Hub on OpenShift 4. See the OpenShift Install Guide for more information on installing on the OpenShift platorm.

Operator Lifecycle Manager

Using the Operator Lifecycle Manager to install and manage the Dapr Kubernetes Operator is the preferred method. The operator is published to operatorhub.io. Following the installation process there should work for most OLM installations.

Look at the OLM Install Guide for an example using this approach with minikube.

Manual Installation

The operator can be installed manually if desired.

!!! info The manual installation method requires cluster credentials that provide the cluster-admin ClusterRole or equivalent.

The Manual Installation Guide 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:

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 and managed by the operator. This means that the same configuration option that are available when installing Dapr using Helm 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 passed into the Dapr Helm chart

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL