reconcile

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// RuntimeEmbedded identifies thw 'embedded' language runtime
	RuntimeEmbedded = "embedded"
)

Variables

This section is empty.

Functions

func NewReconcilerManagedBy

func NewReconcilerManagedBy(mgr manager.Manager) *reconcilerBuilder

NewReconcilerManagedBy builds a Pulumi reconciler based on the given manager.

Types

type ConfigMap

type ConfigMap config.Map

type CreatePluginContextFunc

type CreatePluginContextFunc func(ctx context.Context) (*plugin.Context, error)

type ForInput

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

ForInput represents the information set by For method.

type Option

type Option func(input *OptsInput)

func FinalizerName

func FinalizerName(name string) Option

FinalizerName the finalizer name to use.

type OptsInput

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

type Program

type Program interface {
	GetObject() client.Object
	Generate(ctx *pulumi.Context) error
	UpdateStatus(ctx context.Context, changes StackChanges) error
}

Program generates a resource graph and processes resources changes for a Kubernetes object.

type ProgramInput

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

type ProgramOption

type ProgramOption func(*ProgramInput)

ProgramOption is some configuration that modifies options for a program.

func RuntimeOptions

func RuntimeOptions(runtimeOptions map[string]interface{}) ProgramOption

RuntimeOptions the runtime options for the program.

type PulumiReconciler

type PulumiReconciler struct {
	client.Client
	FinalizerName string
	// contains filtered or unexported fields
}

PulumiReconciler is a reconciler for a Kubernetes object, backed by a Pulumi stack of resources.

func (*PulumiReconciler) ReconcileObject

func (r *PulumiReconciler) ReconcileObject(ctx context.Context, obj client.Object, opts ReconcileOptions) (reconcileResult reconcile.Result, err error)

type ReconcileOptions

type ReconcileOptions struct {
	StackConfig  config.Map
	UpdateStatus UpdateStatusFunc
}

type StackChanges

type StackChanges struct {
	// Planning indicates the planning stage.
	Planning bool

	// Indicates whether any resource changes are planned or executed.
	HasResourceChanges bool

	// Outputs contains the new stack output values.  During planning,
	// some values might be unknown.
	Outputs resource.PropertyMap
}

StackChanges reflects the planned changes for status update purposes. This structure specifically represents changes to the stack outputs. One of the main tasks of reconciliation is to update the status block, such that it reflects current status +with respect to a particular generation+. The reflected generation is then stored in the `observedGeneration` field. There are two opportunities to update status - during planning, and after execution.

func NewStackChanges

func NewStackChanges(dryRun bool) StackChanges

func (*StackChanges) EngineEvent

func (b *StackChanges) EngineEvent(ctx context.Context, event engine.Event)

EngineEvent applies an event to the accumulated changes

type UpdateStatusFunc

type UpdateStatusFunc func(ctx context.Context, obj_ client.Object, chg StackChanges) error

Jump to

Keyboard shortcuts

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