Documentation ¶
Index ¶
- type ConfigurableInterpreter
- func (c *ConfigurableInterpreter) AggregateStatus(object *unstructured.Unstructured, ...) (status *unstructured.Unstructured, enabled bool, err error)
- func (c *ConfigurableInterpreter) GetDependencies(object *unstructured.Unstructured) (dependencies []configv1alpha1.DependentObjectReference, enabled bool, ...)
- func (c *ConfigurableInterpreter) GetReplicas(object *unstructured.Unstructured) (replicas int32, requires *workv1alpha2.ReplicaRequirements, enabled bool, ...)
- func (c *ConfigurableInterpreter) HookEnabled(kind schema.GroupVersionKind, ...) bool
- func (c *ConfigurableInterpreter) InterpretHealth(object *unstructured.Unstructured) (health bool, enabled bool, err error)
- func (c *ConfigurableInterpreter) LoadConfig(customizations []*configv1alpha1.ResourceInterpreterCustomization)
- func (c *ConfigurableInterpreter) ReflectStatus(object *unstructured.Unstructured) (status *runtime.RawExtension, enabled bool, err error)
- func (c *ConfigurableInterpreter) Retain(desired *unstructured.Unstructured, observed *unstructured.Unstructured) (retained *unstructured.Unstructured, enabled bool, err error)
- func (c *ConfigurableInterpreter) ReviseReplica(object *unstructured.Unstructured, replica int64) (revised *unstructured.Unstructured, enabled bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigurableInterpreter ¶
type ConfigurableInterpreter struct {
// contains filtered or unexported fields
}
ConfigurableInterpreter interprets resources with resource interpreter customizations.
func NewConfigurableInterpreter ¶
func NewConfigurableInterpreter(informer genericmanager.SingleClusterInformerManager) *ConfigurableInterpreter
NewConfigurableInterpreter builds a new interpreter by registering the event handler to the provided informer instance.
func (*ConfigurableInterpreter) AggregateStatus ¶
func (c *ConfigurableInterpreter) AggregateStatus(object *unstructured.Unstructured, aggregatedStatusItems []workv1alpha2.AggregatedStatusItem) (status *unstructured.Unstructured, enabled bool, err error)
AggregateStatus returns the objects that based on the 'object' but with status aggregated.
func (*ConfigurableInterpreter) GetDependencies ¶
func (c *ConfigurableInterpreter) GetDependencies(object *unstructured.Unstructured) (dependencies []configv1alpha1.DependentObjectReference, enabled bool, err error)
GetDependencies returns the dependent resources of the given object.
func (*ConfigurableInterpreter) GetReplicas ¶
func (c *ConfigurableInterpreter) GetReplicas(object *unstructured.Unstructured) (replicas int32, requires *workv1alpha2.ReplicaRequirements, enabled bool, err error)
GetReplicas returns the desired replicas of the object as well as the requirements of each replica.
func (*ConfigurableInterpreter) HookEnabled ¶
func (c *ConfigurableInterpreter) HookEnabled(kind schema.GroupVersionKind, operationType configv1alpha1.InterpreterOperation) bool
HookEnabled tells if any hook exist for specific resource gvk and operation type.
func (*ConfigurableInterpreter) InterpretHealth ¶
func (c *ConfigurableInterpreter) InterpretHealth(object *unstructured.Unstructured) (health bool, enabled bool, err error)
InterpretHealth returns the health state of the object.
func (*ConfigurableInterpreter) LoadConfig ¶
func (c *ConfigurableInterpreter) LoadConfig(customizations []*configv1alpha1.ResourceInterpreterCustomization)
LoadConfig loads and stores rules from customizations
func (*ConfigurableInterpreter) ReflectStatus ¶
func (c *ConfigurableInterpreter) ReflectStatus(object *unstructured.Unstructured) (status *runtime.RawExtension, enabled bool, err error)
ReflectStatus returns the status of the object.
func (*ConfigurableInterpreter) Retain ¶
func (c *ConfigurableInterpreter) Retain(desired *unstructured.Unstructured, observed *unstructured.Unstructured) (retained *unstructured.Unstructured, enabled bool, err error)
Retain returns the objects that based on the "desired" object but with values retained from the "observed" object.
func (*ConfigurableInterpreter) ReviseReplica ¶
func (c *ConfigurableInterpreter) ReviseReplica(object *unstructured.Unstructured, replica int64) (revised *unstructured.Unstructured, enabled bool, err error)
ReviseReplica revises the replica of the given object.