status

package
v0.0.0-...-b31e7df Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ShowObjectConditionsAnnotation documents that the presentation layer should show all the conditions for the object.
	ShowObjectConditionsAnnotation = "tree.cluster.x-k8s.io.io/show-conditions"

	// ObjectMetaNameAnnotation contains the meta name that should be used for the object in the presentation layer,
	// e.g. control plane for KCP.
	ObjectMetaNameAnnotation = "tree.cluster.x-k8s.io.io/meta-name"

	// VirtualObjectAnnotation documents that the object does not correspond to any physical object, but instead is
	// a virtual object introduced to provide a better representation of the cluster status, e.g. workers.
	VirtualObjectAnnotation = "tree.cluster.x-k8s.io.io/virtual-object"

	// GroupingObjectAnnotation documents that the child of this node will be grouped in case the ready condition
	// has the same Status, Severity and Reason.
	GroupingObjectAnnotation = "tree.cluster.x-k8s.io.io/grouping-object"

	// GroupObjectAnnotation documents that the object does not correspond to any physical object, but instead it is
	// a grouping of sibling nodes, e.g. a group of machines.
	GroupObjectAnnotation = "tree.cluster.x-k8s.io.io/group-object"

	// GroupItemsAnnotation contains the list of names for the objects included in a group object.
	GroupItemsAnnotation = "tree.cluster.x-k8s.io.io/group-items"

	// GroupItemsSeparator is the separator used in the GroupItemsAnnotation
	GroupItemsSeparator = ", "
)

Variables

This section is empty.

Functions

func GetGroupItems

func GetGroupItems(obj controllerutil.Object) string

func GetMetaName

func GetMetaName(obj controllerutil.Object) string

func GetOtherConditions

func GetOtherConditions(obj controllerutil.Object) []*clusterv1.Condition

func GetReadyCondition

func GetReadyCondition(obj controllerutil.Object) *clusterv1.Condition

func IsGroupObject

func IsGroupObject(obj controllerutil.Object) bool

func IsGroupingObject

func IsGroupingObject(obj controllerutil.Object) bool

func IsShowConditionsObject

func IsShowConditionsObject(obj controllerutil.Object) bool

func IsVirtualObject

func IsVirtualObject(obj controllerutil.Object) bool

Types

type AddObjectOption

type AddObjectOption interface {
	ApplyToAdd(*AddObjectOptions)
}

type AddObjectOptions

type AddObjectOptions struct {
	MetaName       string
	GroupingObject bool
	NoEcho         bool
}

func (*AddObjectOptions) ApplyOptions

func (o *AddObjectOptions) ApplyOptions(opts []AddObjectOption) *AddObjectOptions

type DiscoverOptions

type DiscoverOptions struct {
	// ShowOtherConditions is a list of comma separated kind or kind/name for which we should add   the ShowObjectConditionsAnnotation
	// to signal to the presentation layer to show all the conditions for the objects.
	ShowOtherConditions string

	// DisableNoEcho disable hiding MachineInfrastructure or BootstrapConfig objects if the object's ready condition is true
	// or it has the same Status, Severity and Reason of the parent's object ready condition (it is an echo)
	DisableNoEcho bool

	// DisableGroupObjects disable grouping machines objects in case the ready condition
	// has the same Status, Severity and Reason
	DisableGroupObjects bool
}

type GroupingObject

type GroupingObject bool

The GroupingObject option defines if the child of this node will be grouped in case the ready condition has the same Status, Severity and Reason.

func (GroupingObject) ApplyToAdd

func (n GroupingObject) ApplyToAdd(options *AddObjectOptions)

type NoEcho

type NoEcho bool

The NoEcho options defines if the object should be hidden if the object's ready condition has the same Status, Severity and Reason of the parent's object ready condition (it is an echo).

func (NoEcho) ApplyToAdd

func (n NoEcho) ApplyToAdd(options *AddObjectOptions)

type ObjectMetaName

type ObjectMetaName string

The ObjectMetaName option defines the meta name that should be used for the object in the presentation layer, e.g. control plane for KCP.

func (ObjectMetaName) ApplyToAdd

func (n ObjectMetaName) ApplyToAdd(options *AddObjectOptions)

type ObjectTree

type ObjectTree struct {
	// contains filtered or unexported fields
}

func Discovery

func Discovery(ctx context.Context, c client.Client, cluster *clusterv1.Cluster, options DiscoverOptions) (*ObjectTree, error)

func (ObjectTree) GetObject

func (od ObjectTree) GetObject(id types.UID) controllerutil.Object

func (ObjectTree) GetObjectsByParent

func (od ObjectTree) GetObjectsByParent(id types.UID) []controllerutil.Object

Jump to

Keyboard shortcuts

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