boxcutter

package module
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

README

Boxcutter


Cutting edge library providing the basic tooling to build and reconcile packages on Kubernetes.



Getting in touch

Our mailing lists:

  • pko-devel for development discussions.
  • pko-users for discussions among users and potential users.

Contributing

Thank you for taking time to help to improve Package Operator!

Please see CONTRIBUTING.md for instructions on how to contribute.

License

Package Operator is Apache 2.0 licensed.

Documentation

Overview

Package boxcutter provides a object reconciliation library based on Package Operator.

Index

Constants

View Source
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
)
View Source
const ProgressProbeType = types.ProgressProbeType

ProgressProbeType is a well-known probe type used to guard phase progression.

Variables

View Source
var NewPhase = types.NewPhase

NewPhase creates a new PhaseBuilder with the given name and objects.

View Source
var NewPhaseWithOwner = types.NewPhaseWithOwner

NewPhaseWithOwner creates a new PhaseBuilder with the given name, objects and owner.

View Source
var NewRevision = types.NewRevision

NewRevision creates a new RevisionBuilder with the given name, rev and phases.

View Source
var NewRevisionWithOwner = types.NewRevisionWithOwner

NewRevisionWithOwner creates a new RevisionBuilder with the given name, rev, phases and owner.

View Source
var ProbeFunc = types.ProbeFunc

ProbeFunc wraps the given function to work with the Prober interface.

View Source
var WithObjectReconcileOptions = types.WithObjectReconcileOptions

WithObjectReconcileOptions applies the given options only to the given object.

View Source
var WithObjectTeardownOptions = types.WithObjectTeardownOptions

WithObjectTeardownOptions applies the given options only to the given object.

View Source
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.

View Source
var WithPhaseReconcileOptions = types.WithPhaseReconcileOptions

WithPhaseReconcileOptions applies the given options only to the given Phase.

View Source
var WithPhaseTeardownOptions = types.WithPhaseTeardownOptions

WithPhaseTeardownOptions applies the given options only to the given Phase.

View Source
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 Phase

type Phase = types.Phase

Phase represents a collection of objects lifecycled together.

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 Prober

type Prober = types.Prober

Prober needs to be implemented by any probing implementation.

type Revision

type Revision = types.Revision

Revision represents multiple phases at a given point in time.

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

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.

Jump to

Keyboard shortcuts

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