sync

package
v0.0.0-...-192ee93 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReconciliationResult

type ReconciliationResult struct {
	Live   []*unstructured.Unstructured
	Target []*unstructured.Unstructured
	Hooks  []*unstructured.Unstructured
}

func Reconcile

func Reconcile(targetObjs []*unstructured.Unstructured, liveObjByKey map[kube.ResourceKey]*unstructured.Unstructured, namespace string, resInfo kubeutil.ResourceInfoProvider) ReconciliationResult

type SyncContext

type SyncContext interface {
	Terminate()
	Sync()
	GetState() (common.OperationPhase, string, []common.ResourceSyncResult)
}

func NewSyncContext

func NewSyncContext(
	revision string,
	reconciliationResult ReconciliationResult,
	restConfig *rest.Config,
	rawConfig *rest.Config,
	kubectl kubeutil.Kubectl,
	namespace string,
	log *log.Entry,
	opts ...SyncOpt,
) (SyncContext, error)

type SyncOpt

type SyncOpt func(ctx *syncContext)

func WithHealthOverride

func WithHealthOverride(override health.HealthOverride) SyncOpt

func WithInitialState

func WithInitialState(phase common.OperationPhase, message string, results []common.ResourceSyncResult) SyncOpt

func WithManifestValidation

func WithManifestValidation(enabled bool) SyncOpt

func WithOperationSettings

func WithOperationSettings(dryRun bool, prune bool, force bool, skipHooks bool) SyncOpt

func WithPermissionValidator

func WithPermissionValidator(validator common.PermissionValidator) SyncOpt

func WithResourcesFilter

func WithResourcesFilter(resourcesFilter func(key kube.ResourceKey, target *unstructured.Unstructured, live *unstructured.Unstructured) bool) SyncOpt

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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