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 {
BundleInf cache.SharedIndexInformer
BundleClient smithClient_v1.BundlesGetter
BundleStore BundleStore
SmartClient smith.SmartClient
Rc ReadyChecker
Store Store
SpecCheck SpecCheck
// Bundle objects that need to be synced.
Queue workqueue.RateLimitingInterface
Workers int
// CRD
CrdResyncPeriod time.Duration
Namespace string
Plugins map[smith_v1.PluginName]plugin.Plugin
Scheme *runtime.Scheme
// contains filtered or unexported fields
}
func (*BundleController) Prepare ¶ added in v1.0.0
func (c *BundleController) Prepare(ctx context.Context, crdInf cache.SharedIndexInformer, resourceInfs map[schema.GroupVersionKind]cache.SharedIndexInformer)
Prepare prepares the controller to be run.
func (*BundleController) Run ¶
func (c *BundleController) Run(ctx context.Context)
Run begins watching and syncing. All informers must be synched before this method is invoked.
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, resources map[smith_v1.ResourceName]*resourceInfo, 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.