nodegroup

package
v0.4.18-0.2024100201 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindMachineConfigPools

func FindMachineConfigPools(mcps *mcov1.MachineConfigPoolList, nodeGroups []nropv1.NodeGroup) ([]*mcov1.MachineConfigPool, error)

FindMachineConfigPools returns a slice of all the MachineConfigPool matching the configured node groups

Types

type Tree

type Tree struct {
	NodeGroup          *nropv1.NodeGroup
	MachineConfigPools []*mcov1.MachineConfigPool
}

Tree maps a NodeGroup to the MachineConfigPool identified by the NodeGroup's MCPSelector. It is meant to use internally to bind the two concepts. Should be never exposed to users - hence it has not nor must have a JSON mapping. NOTE: because of historical accident we have a 1:N mapping between NodeGroup and MCPs (MachineConfigPool*s* is a slice!) Unfortunately this is with very, very high probability a refactoring mistake which slipped in unchecked. One of the key design assumptions in NROP is the 1:1 mapping between NodeGroups and MCPs. This historical accident should be fixed in future versions.

func FindTrees

func FindTrees(mcps *mcov1.MachineConfigPoolList, nodeGroups []nropv1.NodeGroup) ([]Tree, error)

FindTrees binds the provided mcps from their list to the given nodegroups. Note that if no nodegroup match, the result slice may be empty. / NOTE: because of historical accident we have a 1:N mapping between NodeGroup and MCPs (MachineConfigPool*s* is a slice!) Unfortunately this is with very, very high probability a refactoring mistake which slipped in unchecked. One of the key design assumptions in NROP is the 1:1 mapping between NodeGroups and MCPs. This historical accident should be fixed in future versions.

func (Tree) Clone

func (ttr Tree) Clone() Tree

Clone creates a deepcopy of a Tree

Jump to

Keyboard shortcuts

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