controller

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2017 License: Apache-2.0 Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// Separator between reference to a resource by name and JsonPath within a resource
	ReferenceSeparator = "#"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleController

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

func New

func New(bundleInf, crdInf cache.SharedIndexInformer, bundleClient smithClient_v1.BundlesGetter, bundleStore BundleStore,
	sc smith.SmartClient, rc ReadyChecker, store Store, specCheck SpecCheck, queue workqueue.RateLimitingInterface,
	workers int, crdResyncPeriod time.Duration, resourceInfs map[schema.GroupVersionKind]cache.SharedIndexInformer,
	namespace string) *BundleController

func (*BundleController) Run

func (c *BundleController) Run(ctx context.Context)

Run begins watching and syncing.

type BundleStore

type BundleStore interface {
	// Get returns Bundle based on its namespace and name.
	Get(namespace, bundleName string) (*smith_v1.Bundle, error)
	// GetBundlesByCrd returns Bundles which have a resource defined by CRD.
	GetBundlesByCrd(*apiext_v1b1.CustomResourceDefinition) ([]*smith_v1.Bundle, error)
	// GetBundlesByObject returns Bundles which have a resource of a particular group/kind with a name in a namespace.
	GetBundlesByObject(gk schema.GroupKind, namespace, name string) ([]*smith_v1.Bundle, error)
}

type ReadyChecker

type ReadyChecker interface {
	IsReady(*unstructured.Unstructured) (isReady, retriableError bool, e error)
}

type SpecCheck

type SpecCheck interface {
	CompareActualVsSpec(spec, actual runtime.Object) (updatedSpec *unstructured.Unstructured, match bool, err error)
}

type SpecProcessor

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

func NewSpec

func NewSpec(selfName smith_v1.ResourceName, readyResources map[smith_v1.ResourceName]*unstructured.Unstructured, allowedResources []smith_v1.ResourceName) *SpecProcessor

func (*SpecProcessor) ProcessObject

func (sp *SpecProcessor) ProcessObject(obj map[string]interface{}, path ...string) error

func (*SpecProcessor) ProcessString

func (sp *SpecProcessor) ProcessString(value string, path ...string) (interface{}, error)

func (*SpecProcessor) ProcessValue

func (sp *SpecProcessor) ProcessValue(value interface{}, path ...string) (interface{}, error)

type Store

type Store interface {
	smith.ByNameStore
	GetObjectsForBundle(namespace, bundleName string) ([]runtime.Object, error)
	AddInformer(schema.GroupVersionKind, cache.SharedIndexInformer)
	RemoveInformer(schema.GroupVersionKind) bool
}

Jump to

Keyboard shortcuts

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