declarative

package
v1.8.0-preview1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

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

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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