apply

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package apply applies Hel Releases

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareAsJSON

func CompareAsJSON(one, two interface{}) bool

Types

type KubectlLayerApplier

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

KubectlLayerApplier applies an AddonsLayer to a Kubernetes cluster using the kubectl command.

func (KubectlLayerApplier) Apply

func (a KubectlLayerApplier) Apply(ctx context.Context, layer layers.Layer) (err error)

Apply an AddonLayer to the cluster.

func (KubectlLayerApplier) ApplyIsRequired

func (a KubectlLayerApplier) ApplyIsRequired(ctx context.Context, layer layers.Layer) (applyIsRequired bool, err error)

ApplyIsRequired returns true if any resources need to be applied for this AddonsLayer

func (KubectlLayerApplier) ApplyWasSuccessful

func (a KubectlLayerApplier) ApplyWasSuccessful(ctx context.Context, layer layers.Layer) (applyIsRequired bool, hrName string, err error)

ApplyWasSuccessful returns true if all of the resources in this AddonsLayer are in the Success phase

func (KubectlLayerApplier) GetResources

func (a KubectlLayerApplier) GetResources(ctx context.Context, layer layers.Layer) (resources []kraanv1alpha1.Resource, err error)

GetResources returns a list of resources for this AddonsLayer

func (KubectlLayerApplier) Prune

func (a KubectlLayerApplier) Prune(ctx context.Context, layer layers.Layer, pruneHrs []*helmctlv2.HelmRelease) (err error)

Prune the AddonsLayer by removing the Addons found in the cluster that have since been removed from the Layer.

func (KubectlLayerApplier) PruneIsRequired

func (a KubectlLayerApplier) PruneIsRequired(ctx context.Context, layer layers.Layer) (pruneRequired bool, pruneHrs []*helmctlv2.HelmRelease, err error)

PruneIsRequired returns true if any resources need to be pruned for this AddonsLayer

type LayerApplier

type LayerApplier interface {
	Apply(ctx context.Context, layer layers.Layer) (err error)
	Prune(ctx context.Context, layer layers.Layer, pruneHrs []*helmctlv2.HelmRelease) (err error)
	PruneIsRequired(ctx context.Context, layer layers.Layer) (pruneRequired bool, pruneHrs []*helmctlv2.HelmRelease, err error)
	ApplyIsRequired(ctx context.Context, layer layers.Layer) (applyIsRequired bool, err error)
	ApplyWasSuccessful(ctx context.Context, layer layers.Layer) (applyIsRequired bool, hrName string, err error)
	GetResources(ctx context.Context, layer layers.Layer) (resources []kraanv1alpha1.Resource, err error)
}

LayerApplier defines methods for managing the Addons within an AddonLayer in a cluster.

func NewApplier

func NewApplier(client client.Client, logger logr.Logger, scheme *runtime.Scheme) (applier LayerApplier, err error)

NewApplier returns a LayerApplier instance.

Jump to

Keyboard shortcuts

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