Documentation ¶
Overview ¶
Package apply applies Hel Releases
Index ¶
- func CompareAsJSON(one, two interface{}) bool
- type KubectlLayerApplier
- func (a KubectlLayerApplier) Apply(ctx context.Context, layer layers.Layer) (err error)
- func (a KubectlLayerApplier) ApplyIsRequired(ctx context.Context, layer layers.Layer) (applyIsRequired bool, err error)
- func (a KubectlLayerApplier) ApplyWasSuccessful(ctx context.Context, layer layers.Layer) (applyIsRequired bool, hrName string, err error)
- func (a KubectlLayerApplier) GetResources(ctx context.Context, layer layers.Layer) (resources []kraanv1alpha1.Resource, err error)
- func (a KubectlLayerApplier) Prune(ctx context.Context, layer layers.Layer, pruneHrs []*helmctlv2.HelmRelease) (err error)
- func (a KubectlLayerApplier) PruneIsRequired(ctx context.Context, layer layers.Layer) (pruneRequired bool, pruneHrs []*helmctlv2.HelmRelease, err error)
- type LayerApplier
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) 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.