operator

package
v1.8.0-rc.7 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNamespace added in v1.8.0

func GetNamespace() string

GetNamespace returns the namespace for Dapr.

func RunWebhooks added in v1.4.3

func RunWebhooks(ctx context.Context, enableLeaderElection bool)

Types

type Config added in v0.6.0

type Config struct {
	MTLSEnabled bool
	Credentials credentials.TLSCredentials
}

Config returns an operator config options.

func LoadConfiguration added in v0.6.0

func LoadConfiguration(name string, client client.Client) (*Config, error)

LoadConfiguration loads the Kubernetes configuration and returns an Operator Config.

type DaprWatchdog added in v1.8.0

type DaprWatchdog struct {
	// contains filtered or unexported fields
}

DaprWatchdog is a controller that periodically polls all pods and ensures that they are in the correct state. This controller only runs on the cluster's leader. Currently, this ensures that the sidecar is injected in each pod, otherwise it kills the pod so it can be restarted.

func (*DaprWatchdog) NeedLeaderElection added in v1.8.0

func (dw *DaprWatchdog) NeedLeaderElection() bool

NeedLeaderElection makes it so the controller runs on the leader node only. Implements sigs.k8s.io/controller-runtime/pkg/manager.LeaderElectionRunnable .

func (*DaprWatchdog) Start added in v1.8.0

func (dw *DaprWatchdog) Start(parentCtx context.Context) error

Start the controller. This method blocks until the context is canceled. Implements sigs.k8s.io/controller-runtime/pkg/manager.Runnable .

type Operator

type Operator interface {
	Run(ctx context.Context)
}

Operator is an Dapr Kubernetes Operator for managing components and sidecar lifecycle.

func NewOperator

func NewOperator(opts Options) Operator

NewOperator returns a new Dapr Operator.

type Options added in v1.8.0

type Options struct {
	Config                    string
	CertChainPath             string
	LeaderElection            bool
	WatchdogEnabled           bool
	WatchdogInterval          time.Duration
	WatchdogMaxRestartsPerMin int
}

Options contains the options for `NewOperator`.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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