Documentation
¶
Overview ¶
Package boxcutter provides a object reconciliation library based on Package Operator.
Index ¶
- Constants
- Variables
- func NewPhaseEngine(opts RevisionEngineOptions) (*machinery.PhaseEngine, error)
- type ObjectReconcileOption
- type ObjectTeardownOption
- type OwnerStrategy
- type Phase
- type PhaseBuilder
- type PhaseReconcileOption
- type PhaseTeardownOption
- type Prober
- type Revision
- type RevisionBuilder
- type RevisionEngine
- type RevisionEngineOptions
- type RevisionEngineOptionsError
- type RevisionReconcileOption
- type RevisionTeardownOption
- type WithCollisionProtection
- type WithPaused
- type WithPreviousOwners
Constants ¶
const ( // CollisionProtectionPrevent prevents owner collisions entirely // by not allowing to work with objects already present on the cluster. CollisionProtectionPrevent = types.CollisionProtectionPrevent // CollisionProtectionIfNoController allows to patch and override // objects already present if they are not owned by another controller. CollisionProtectionIfNoController = types.CollisionProtectionIfNoController // CollisionProtectionNone allows to patch and override objects already // present and owned by other controllers. // // Be careful! // This setting may cause multiple controllers to fight over a resource, // causing load on the Kubernetes API server and etcd. CollisionProtectionNone = types.CollisionProtectionNone )
const ProgressProbeType = types.ProgressProbeType
ProgressProbeType is a well-known probe type used to guard phase progression.
Variables ¶
var NewPhase = types.NewPhase
NewPhase creates a new PhaseBuilder with the given name and objects.
var NewPhaseWithOwner = types.NewPhaseWithOwner
NewPhaseWithOwner creates a new PhaseBuilder with the given name, objects and owner.
var NewRevision = types.NewRevision
NewRevision creates a new RevisionBuilder with the given name, rev and phases.
var NewRevisionWithOwner = types.NewRevisionWithOwner
NewRevisionWithOwner creates a new RevisionBuilder with the given name, rev, phases and owner.
var ProbeFunc = types.ProbeFunc
ProbeFunc wraps the given function to work with the Prober interface.
var WithObjectReconcileOptions = types.WithObjectReconcileOptions
WithObjectReconcileOptions applies the given options only to the given object.
var WithObjectTeardownOptions = types.WithObjectTeardownOptions
WithObjectTeardownOptions applies the given options only to the given object.
var WithOwner = types.WithOwner
WithOwner sets an owning object and the strategy to use with it. Ensures controller-refs are set to track the owner and enables handover between owners.
var WithPhaseReconcileOptions = types.WithPhaseReconcileOptions
WithPhaseReconcileOptions applies the given options only to the given Phase.
var WithPhaseTeardownOptions = types.WithPhaseTeardownOptions
WithPhaseTeardownOptions applies the given options only to the given Phase.
var WithProbe = types.WithProbe
WithProbe registers the given probe to evaluate state of objects.
Functions ¶
func NewPhaseEngine ¶ added in v0.8.0
func NewPhaseEngine(opts RevisionEngineOptions) (*machinery.PhaseEngine, error)
NewPhaseEngine returns a new PhaseEngine instance.
Types ¶
type ObjectReconcileOption ¶
type ObjectReconcileOption = types.ObjectReconcileOption
ObjectReconcileOption is the common interface for object reconciliation options.
type ObjectTeardownOption ¶ added in v0.1.2
type ObjectTeardownOption = types.ObjectTeardownOption
ObjectTeardownOption holds configuration options changing object teardown.
type OwnerStrategy ¶
type OwnerStrategy = types.OwnerStrategy
OwnerStrategy interface needed for RevisionEngine.
type PhaseBuilder ¶ added in v0.11.0
type PhaseBuilder = types.PhaseBuilder
PhaseBuilder is a Phase with methods to attach options.
type PhaseReconcileOption ¶
type PhaseReconcileOption = types.PhaseReconcileOption
PhaseReconcileOption is the common interface for phase reconciliation options.
type PhaseTeardownOption ¶ added in v0.1.2
type PhaseTeardownOption = types.PhaseTeardownOption
PhaseTeardownOption holds configuration options changing phase teardown.
type RevisionBuilder ¶ added in v0.11.0
type RevisionBuilder = types.RevisionBuilder
RevisionBuilder is a Revision with methods to attach options.
type RevisionEngine ¶
type RevisionEngine = machinery.RevisionEngine
RevisionEngine manages rollout and teardown of multiple phases.
func NewRevisionEngine ¶
func NewRevisionEngine(opts RevisionEngineOptions) (*RevisionEngine, error)
NewRevisionEngine returns a new RevisionEngine instance.
type RevisionEngineOptions ¶
type RevisionEngineOptions struct {
Scheme *runtime.Scheme
FieldOwner string
SystemPrefix string
DiscoveryClient discovery.OpenAPIV3SchemaInterface
RestMapper meta.RESTMapper
Writer client.Writer
Reader client.Reader
PhaseValidator *validation.PhaseValidator
}
RevisionEngineOptions holds all configuration options for the RevisionEngine.
type RevisionEngineOptionsError ¶
type RevisionEngineOptionsError struct {
// contains filtered or unexported fields
}
RevisionEngineOptionsError is returned for errors with the RevisionEngineOptions.
func (RevisionEngineOptionsError) Error ¶
func (e RevisionEngineOptionsError) Error() string
type RevisionReconcileOption ¶
type RevisionReconcileOption = types.RevisionReconcileOption
RevisionReconcileOption is the common interface for revision reconciliation options.
type RevisionTeardownOption ¶ added in v0.1.2
type RevisionTeardownOption = types.RevisionTeardownOption
RevisionTeardownOption holds configuration options changing revision teardown.
type WithCollisionProtection ¶
type WithCollisionProtection = types.WithCollisionProtection
WithCollisionProtection instructs the given CollisionProtection setting to be used.
type WithPaused ¶
type WithPaused = types.WithPaused
WithPaused skips reconciliation and just reports status information. Can also be described as dry-run, as no modification will occur.
type WithPreviousOwners ¶
type WithPreviousOwners = types.WithPreviousOwners
WithPreviousOwners is a list of known objects allowed to take ownership from. Objects from this list will not trigger collision detection and prevention.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
build
command
|
|
|
reference
command
|
|
|
internal
|
|
|
Package machinery provides object reconciliation strategies for arbitrary kubernetes objects.
|
Package machinery provides object reconciliation strategies for arbitrary kubernetes objects. |
|
types
Package types contains common type definitions for boxcutter machinery.
|
Package types contains common type definitions for boxcutter machinery. |
|
Package managedcache implements dynamic cache management to deal with RBAC separation and stopping of informers when they are no longer needed.
|
Package managedcache implements dynamic cache management to deal with RBAC separation and stopping of informers when they are no longer needed. |
|
Package ownerhandling provides an interface and strategies to handle OwnerReferences.
|
Package ownerhandling provides an interface and strategies to handle OwnerReferences. |
|
Package probing contains declarative status probing implementations for various different Kubernetes objects.
|
Package probing contains declarative status probing implementations for various different Kubernetes objects. |
|
Package boxcutter contains the boxcutter integration test suite.
|
Package boxcutter contains the boxcutter integration test suite. |
|
Package util contains common utilities for working with boxcutter.
|
Package util contains common utilities for working with boxcutter. |
|
Package validation contains validators to catch common issues before objects are persisted into the kube-apiserver.
|
Package validation contains validators to catch common issues before objects are persisted into the kube-apiserver. |