boxcutter

package module
v0.0.0-...-5576edb Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 9 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 ProbeFunc = types.ProbeFunc

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

View Source
var WithProbe = types.WithProbe

WithProbe registers the given probe to evaluate state of objects.

Functions

This section is empty.

Types

type ObjectOption

type ObjectOption = types.ObjectOption

ObjectOption is the common interface for object reconciliation options.

type OwnerStrategy

type OwnerStrategy interface {
	SetControllerReference(owner, obj metav1.Object) error
	GetController(obj metav1.Object) (metav1.OwnerReference, bool)
	IsController(owner, obj metav1.Object) bool
	CopyOwnerReferences(objA, objB metav1.Object)
	ReleaseController(obj metav1.Object)
	RemoveOwner(owner, obj metav1.Object)
}

OwnerStrategy interface needed for RevisionEngine.

type Phase

type Phase = types.Phase

Phase represents a collection of objects lifecycled together.

type PhaseAccessor

type PhaseAccessor = types.PhaseAccessor

PhaseAccessor represents a collection of objects lifecycled together.

type PhaseObject

type PhaseObject = types.PhaseObject

PhaseObject represents an object and it's options.

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 RevisionAccessor

type RevisionAccessor = types.RevisionAccessor

RevisionAccessor represents multiple phases at a given point in time.

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.DiscoveryClient
	RestMapper      meta.RESTMapper
	Writer          client.Writer
	Reader          client.Reader

	OwnerStrategy OwnerStrategy
}

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 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
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 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