package controller

import "github.com/docker/compose-on-kubernetes/internal/controller"

Index

Types

type ChildrenListener

type ChildrenListener struct {
	// contains filtered or unexported fields
}

ChildrenListener listens to changes from resources created for a stack

func NewChildrenListener

func NewChildrenListener(clientSet k8sclientset.Interface, reconciliationInterval time.Duration, reconcileQueue chan<- string) (*ChildrenListener, error)

NewChildrenListener creates a ChildrenListener

func (*ChildrenListener) StartAndWaitForFullSync

func (s *ChildrenListener) StartAndWaitForFullSync(stop chan struct{}) bool

StartAndWaitForFullSync starts the underlying informers and wait for a full sync to occur (makes sure everything is in cache)

type NameAndNamespace

type NameAndNamespace struct {
	Namespace string
	Name      string
}

NameAndNamespace is a name/namespace pair

type ResourceUpdaterProvider

type ResourceUpdaterProvider interface {
	// contains filtered or unexported methods
}

ResourceUpdaterProvider is a factory providing resource updaters for a given stack (default implementation generates an impersonating clientset)

func NewImpersonatingResourceUpdaterProvider

func NewImpersonatingResourceUpdaterProvider(config rest.Config, ownerCache StackOwnerCacher) ResourceUpdaterProvider

NewImpersonatingResourceUpdaterProvider creates a ResourceUpdaterProvider that impersonate api calls

type StackListener

type StackListener struct {
	// contains filtered or unexported fields
}

StackListener listen for changes in stacks from the API

func NewStackListener

func NewStackListener(clientSet clientset.Interface,
	reconciliationInterval time.Duration,
	reconcileQueue chan<- string,
	reconcileDeletionQueue chan<- *latest.Stack,
	ownerCache StackOwnerCacher) *StackListener

NewStackListener creates a StackListener

func (*StackListener) Start

func (s *StackListener) Start(stop chan struct{})

Start starts the underlying informer

type StackOwnerCacher

type StackOwnerCacher interface {
	// contains filtered or unexported methods
}

StackOwnerCacher describes a component capable of caching stack ownership data

func NewStackOwnerCache

func NewStackOwnerCache(config *rest.Config) (StackOwnerCacher, error)

NewStackOwnerCache creates a stackOwnerCache

type StackReconciler

type StackReconciler struct {
	// contains filtered or unexported fields
}

StackReconciler reconciles stack into children objects

func NewStackReconciler

func NewStackReconciler(stackStore stackStore,
	childrenStore childrenStore,
	defaultServiceType coretypes.ServiceType,
	resourceUpdater ResourceUpdaterProvider,
	ownerCache StackOwnerCacher) (*StackReconciler, error)

NewStackReconciler creates a StackReconciler

func (*StackReconciler) Start

func (r *StackReconciler) Start(reconcileQueue <-chan string, deletionQueue <-chan *latest.Stack, stop <-chan struct{})

Start starts the reconciliation loop

type TestCase

type TestCase struct {
	Stack    *latest.Stack
	Children *stackresources.StackState
}

TestCase is a serializable type used to combine a stack and its children for a record & replay test scenario

Source Files

childrenstore.go controller.go resourceupdater.go stacklistener.go stackownercache.go stackreconciler.go stackstatereconciler.go testcase.go

Version
v0.5.0 (latest)
Published
Jan 28, 2022
Platform
linux/amd64
Imports
25 packages
Last checked
5 hours ago

Tools for package owners.