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) *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 }
Click to show internal directories.
Click to hide internal directories.