Documentation ¶
Index ¶
- Constants
- func GetGroupItems(obj controllerutil.Object) string
- func GetMetaName(obj controllerutil.Object) string
- func GetOtherConditions(obj controllerutil.Object) []*clusterv1.Condition
- func GetReadyCondition(obj controllerutil.Object) *clusterv1.Condition
- func IsGroupObject(obj controllerutil.Object) bool
- func IsGroupingObject(obj controllerutil.Object) bool
- func IsShowConditionsObject(obj controllerutil.Object) bool
- func IsVirtualObject(obj controllerutil.Object) bool
- type AddObjectOption
- type AddObjectOptions
- type DiscoverOptions
- type GroupingObject
- type NoEcho
- type ObjectMetaName
- type ObjectTree
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 ¶
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
Click to show internal directories.
Click to hide internal directories.