Documentation
¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 Controller ¶
type Controller struct { Logger *zap.Logger ReadyForWork func() MainClient kubernetes.Interface BundleClient smithClient_v1.BundlesGetter BundleStore BundleStore SmartClient SmartClient Rc statuschecker.Interface Store Store SpecChecker SpecChecker WorkQueue ctrl.WorkQueueProducer // CRD CrdResyncPeriod time.Duration Namespace string PluginContainers map[smith_v1.PluginName]plugin.Container Scheme *runtime.Scheme Catalog *store.Catalog // Metrics BundleTransitionCounter *prometheus.CounterVec BundleResourceTransitionCounter *prometheus.CounterVec Broadcaster record.EventBroadcaster Recorder record.EventRecorder // contains filtered or unexported fields }
func (*Controller) Prepare ¶
func (c *Controller) Prepare(crdInf cache.SharedIndexInformer, resourceInfs map[schema.GroupVersionKind]cache.SharedIndexInformer) error
Prepare prepares the controller to be run.
func (*Controller) Process ¶
func (c *Controller) Process(pctx *ctrl.ProcessContext) (bool, error)
func (*Controller) ProcessBundle ¶
ProcessBundle is only visible for testing purposes. Should not be called directly.
func (*Controller) Run ¶
func (c *Controller) Run(ctx context.Context)
Run begins watching and syncing. All informers must be synced before this method is invoked.
type ResourceStatusType ¶
type ResourceStatusType string
const ( ResourceStatusTypeReady ResourceStatusType = "Ready" ResourceStatusTypeInProgress ResourceStatusType = "InProgress" ResourceStatusTypeDependenciesNotReady ResourceStatusType = "DependenciesNotReady" ResourceStatusTypeError ResourceStatusType = "Error" )
type SmartClient ¶
type SmartClient interface {
ForGVK(gvk schema.GroupVersionKind, namespace string) (dynamic.ResourceInterface, error)
}
type SpecChecker ¶
type SpecChecker interface { // BeforeCreate pre-processes object specification and returns an updated version. BeforeCreate(logger *zap.Logger, spec *unstructured.Unstructured) (*unstructured.Unstructured, error) CompareActualVsSpec(logger *zap.Logger, spec, actual runtime.Object) (updatedSpec *unstructured.Unstructured, match bool, diff string, err error) }
type Store ¶
type Store interface { Get(gvk schema.GroupVersionKind, namespace, name string) (obj runtime.Object, exists bool, err error) ObjectsControlledBy(namespace string, uid types.UID) ([]runtime.Object, error) AddInformer(schema.GroupVersionKind, cache.SharedIndexInformer) error RemoveInformer(schema.GroupVersionKind) bool }
Click to show internal directories.
Click to hide internal directories.