Documentation ¶
Index ¶
- Constants
- type Action
- type ApplyCRDsAction
- type ApplyResourcesAction
- func (a *ApplyResourcesAction) Cleanup(ctx context.Context, rc *ReconciliationRequest) error
- func (a *ApplyResourcesAction) Configure(_ context.Context, _ *client.Client, b *builder.Builder) (*builder.Builder, error)
- func (a *ApplyResourcesAction) Run(ctx context.Context, rc *ReconciliationRequest) error
- type ChartAction
- type ConditionsAction
- type GCAction
- type Helm
- type Reconciler
- func (r *Reconciler) Cleanup(ctx context.Context, res *daprApi.DaprInstance) error
- func (r *Reconciler) Client() *client.Client
- func (r *Reconciler) EnqueueRequestForOwner(owner ctrlCli.Object, opts ...handler.OwnerOption) handler.EventHandler
- func (r *Reconciler) EnqueueRequestsFromMapFunc(fn func(context.Context, ctrlCli.Object) []reconcile.Request) handler.EventHandler
- func (r *Reconciler) Event(object runtime.Object, eventType string, reason string, message string)
- func (r *Reconciler) Reconcile(ctx context.Context, res *daprApi.DaprInstance) (ctrl.Result, error)
- func (r *Reconciler) Watch(obj ctrlCli.Object, eh handler.EventHandler, predicates ...predicate.Predicate) error
- type ReconciliationRequest
Constants ¶
const ( ChartRepoUsernameKey = "username" ChartRepoPasswordKey = "password" ChartRepoEmbedded = "embedded" )
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 NewApplyResourcesAction ¶
func NewChartAction ¶
func NewConditionsAction ¶
func NewGCAction ¶
type ApplyCRDsAction ¶
type ApplyCRDsAction struct {
// contains filtered or unexported fields
}
func (*ApplyCRDsAction) Cleanup ¶
func (a *ApplyCRDsAction) Cleanup(_ context.Context, _ *ReconciliationRequest) error
func (*ApplyCRDsAction) Run ¶
func (a *ApplyCRDsAction) Run(ctx context.Context, rc *ReconciliationRequest) error
type ApplyResourcesAction ¶
type ApplyResourcesAction struct {
// contains filtered or unexported fields
}
func (*ApplyResourcesAction) Cleanup ¶
func (a *ApplyResourcesAction) Cleanup(ctx context.Context, rc *ReconciliationRequest) error
func (*ApplyResourcesAction) Run ¶
func (a *ApplyResourcesAction) Run(ctx context.Context, rc *ReconciliationRequest) error
type ChartAction ¶
type ChartAction struct {
// contains filtered or unexported fields
}
func (*ChartAction) Cleanup ¶
func (a *ChartAction) Cleanup(_ context.Context, _ *ReconciliationRequest) error
func (*ChartAction) Run ¶
func (a *ChartAction) Run(ctx context.Context, rc *ReconciliationRequest) error
type ConditionsAction ¶
type ConditionsAction struct {
// contains filtered or unexported fields
}
func (*ConditionsAction) Cleanup ¶
func (a *ConditionsAction) Cleanup(_ context.Context, _ *ReconciliationRequest) error
func (*ConditionsAction) Run ¶
func (a *ConditionsAction) Run(ctx context.Context, rc *ReconciliationRequest) error
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 (a *GCAction) Cleanup(_ context.Context, _ *ReconciliationRequest) error
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 (*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) 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 }
Source Files ¶
- dapr_instance_controller.go
- dapr_instance_controller_action_apply_crds.go
- dapr_instance_controller_action_apply_resources.go
- dapr_instance_controller_action_chart.go
- dapr_instance_controller_action_conditions.go
- dapr_instance_controller_action_gc.go
- dapr_instance_controller_customizer.go
- dapr_instance_controller_reconcile.go
- dapr_instance_controller_support.go
- dapr_instance_controller_type.go