templates

package
v0.7.0-rc Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controllers

type Controllers struct{}

Controllers passes down config and adds individual controllers to the manager.

func (*Controllers) SetupWithManager

func (c *Controllers) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager adds all Stack controllers to the manager.

type RenderPhaseReconciler

type RenderPhaseReconciler struct {
	Client     client.Client
	Log        logr.Logger
	GVK        *schema.GroupVersionKind
	EventName  string
	ConfigName types.NamespacedName
}

RenderPhaseReconciler reconciles an object which we're watching for a template stack. It handles the render phase of a template stack controller's lifecycle. The render phase looks something like:

Inputs: * A stack's behavior configuration * A stack's contents * A CR which triggered the render * Configuration for a resource engine

Outputs: * Resources are applied to the cluster

Side effects:

  • A resource engine (such as helm2 or kustomize) is invoked to create the resources which will be applied to the cluster. The resource engine's inputs are: configuration specific to the engine, and the contents of the stack. The outputs are the resources to apply.

func (*RenderPhaseReconciler) Reconcile

func (r *RenderPhaseReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

Reconcile responds to a CR of a particular CRD kind which a template stack is interested in. In most cases, reconciliation means that a resource engine is executed, and the output of the resource engine is applied to the cluster.

type SetupPhaseReconciler

type SetupPhaseReconciler struct {
	Client  client.Client
	Log     logr.Logger
	Manager manager.Manager
	// contains filtered or unexported fields
}

SetupPhaseReconciler reconciles a stack configuration object

func NewSetupPhaseReconciler

func NewSetupPhaseReconciler(c client.Client, l logr.Logger, m manager.Manager) *SetupPhaseReconciler

NewSetupPhaseReconciler creates a setup phase reconciler and initializes all of its fields. It mostly exists to initialize its internal render controller map.

func (*SetupPhaseReconciler) Reconcile

func (r *SetupPhaseReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

Reconcile watches for stack configurations and configures render phase controllers in response to a stack configuration

func (*SetupPhaseReconciler) SetupWithManager

func (r *SetupPhaseReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager is a convenience method to register the reconciler with a controller manager.

Jump to

Keyboard shortcuts

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