instance

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChartRepoUsernameKey = "username"
	ChartRepoPasswordKey = "password"
	ChartRepoEmbedded    = "embedded"
)
View Source
const (
	DaprInstanceFinalizerName = "instance.operator.dapr.io/finalizer"
	DaprInstanceResourceName  = "dapr-instance"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action interface {
	Configure(ctx context.Context, c *client.Client, b *builder.Builder) (*builder.Builder, error)
	Run(ctx context.Context, rc *ReconciliationRequest) error
	Cleanup(ctx context.Context, rc *ReconciliationRequest) error
}

func NewApplyCRDsAction

func NewApplyCRDsAction(l logr.Logger) Action

func NewApplyResourcesAction

func NewApplyResourcesAction(l logr.Logger) Action

func NewChartAction

func NewChartAction(l logr.Logger) Action

func NewConditionsAction

func NewConditionsAction(l logr.Logger) Action

func NewGCAction

func NewGCAction(l logr.Logger) Action

type ApplyCRDsAction

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

func (*ApplyCRDsAction) Cleanup

func (*ApplyCRDsAction) Configure

func (*ApplyCRDsAction) Run

type ApplyResourcesAction

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

func (*ApplyResourcesAction) Cleanup

func (*ApplyResourcesAction) Configure

func (*ApplyResourcesAction) Run

type ChartAction

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

func (*ChartAction) Cleanup

func (*ChartAction) Configure

func (*ChartAction) Run

type ConditionsAction

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

func (*ConditionsAction) Cleanup

func (*ConditionsAction) Configure

func (*ConditionsAction) Run

type GCAction

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

GCAction cleanup leftover release resources.

If the HelmInstance spec changes, all the resources get re-rendered which means some of them may become obsolete (i.e. if some resources are moved from cluster to namespace scope) hence a sort of "garbage collector task" must be executed.

The logic of the task it to delete all the resources that have a generation older than current CR one or rendered out of a release version different from the current one. The related values are propagated by the controller to all the rendered resources in as a set of labels (

- helm.operator.dapr.io/release.generation - helm.operator.dapr.io/release.version

The action MUST be executed as the latest action in the reconciliation loop.

func (*GCAction) Cleanup

func (*GCAction) Configure

func (a *GCAction) Configure(_ context.Context, _ *client.Client, b *builder.Builder) (*builder.Builder, error)

func (*GCAction) Run

type Helm

type Helm struct {
	ChartValues map[string]interface{}
	// contains filtered or unexported fields
}

type Reconciler

type Reconciler struct {
	Scheme      *runtime.Scheme
	ClusterType controller.ClusterType
	// contains filtered or unexported fields
}

func NewReconciler

func NewReconciler(ctx context.Context, manager ctrlRt.Manager, o helm.Options) (*Reconciler, error)

func (*Reconciler) Cleanup

func (r *Reconciler) Cleanup(ctx context.Context, res *daprApi.DaprInstance) error

func (*Reconciler) Client

func (r *Reconciler) Client() *client.Client

func (*Reconciler) EnqueueRequestForOwner

func (r *Reconciler) EnqueueRequestForOwner(owner ctrlCli.Object, opts ...handler.OwnerOption) handler.EventHandler

func (*Reconciler) EnqueueRequestsFromMapFunc

func (r *Reconciler) EnqueueRequestsFromMapFunc(fn func(context.Context, ctrlCli.Object) []reconcile.Request) handler.EventHandler

func (*Reconciler) Event

func (r *Reconciler) Event(object runtime.Object, eventType string, reason string, message string)

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, res *daprApi.DaprInstance) (ctrl.Result, error)

func (*Reconciler) Watch

func (r *Reconciler) Watch(obj ctrlCli.Object, eh handler.EventHandler, predicates ...predicate.Predicate) error

type ReconciliationRequest

type ReconciliationRequest struct {
	*client.Client
	types.NamespacedName

	Reconciler  *Reconciler
	ClusterType controller.ClusterType
	Resource    *daprApi.DaprInstance
	Helm        Helm
}

func (*ReconciliationRequest) Chart

Jump to

Keyboard shortcuts

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