operator

package
v0.0.0-...-949823d Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MTLSEnabled             bool
	ControlPlaneTrustDomain string
	SentryAddress           string
}

Config returns an operator config options.

func LoadConfiguration

func LoadConfiguration(ctx context.Context, name string, restConfig *rest.Config) (*Config, error)

LoadConfiguration loads the Kubernetes configuration and returns an Operator Config.

type DaprWatchdog

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

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

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 {
	Start(ctx context.Context) error
}

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

func NewOperator

func NewOperator(ctx context.Context, opts Options) (Operator, error)

NewOperator returns a new Dapr Operator.

type Options

type Options struct {
	Config                              string
	LeaderElection                      bool
	WatchdogEnabled                     bool
	WatchdogInterval                    time.Duration
	WatchdogMaxRestartsPerMin           int
	WatchNamespace                      string
	ServiceReconcilerEnabled            bool
	ArgoRolloutServiceReconcilerEnabled bool
	WatchdogCanPatchPodLabels           bool
	TrustAnchorsFile                    string
	APIPort                             int
	APIListenAddress                    string
	HealthzPort                         int
	HealthzListenAddress                string
	WebhookServerPort                   int
	WebhookServerListenAddress          string
	Healthz                             healthz.Healthz
}

Options contains the options for `NewOperator`.

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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