nodepools

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByProviderDynamic added in v0.9.3

func ByProviderDynamic(nps []*spec.NodePool) iter.Seq2[ProviderTemplateGroup, []*spec.NodePool]

ByProviderDynamic returns an iterator that groups dynamic nodepools only by provider.

func ByProviderRegion

func ByProviderRegion(nodepools []*spec.NodePool) iter.Seq2[string, []*spec.NodePool]

ByProviderRegion returns an iterator that groups nodepools by provider region.

func ByProviderSpecName

func ByProviderSpecName(nodepools []*spec.NodePool) iter.Seq2[string, []*spec.NodePool]

ByProviderSpecName returns an iterator that groups nodepools by provider SpecName.

func ByTemplates

func ByTemplates(nps []*spec.NodePool) iter.Seq2[string, []*spec.NodePool]

ByTemplates returns an iterator that groups nodepools by provider templates.

func CommonDynamicNodes

func CommonDynamicNodes(currentNp, desiredNp []*spec.NodePool) []*spec.NodePool

func CommonStaticNodes

func CommonStaticNodes(currentNp, desiredNp []*spec.NodePool) []*spec.NodePool

func Control

func Control(nodepools []*spec.NodePool) iter.Seq[*spec.NodePool]

func DeleteByName added in v0.9.7

func DeleteByName(nodepools []*spec.NodePool, name string) []*spec.NodePool

func DeleteNodeByName added in v0.9.7

func DeleteNodeByName(nodepools []*spec.NodePool, nodeName string, keepNodePools map[string]struct{}) []*spec.NodePool

DeleteNodeByName goes through each nodepool until if find the node with the specified name. If the nodepool reaches 0 nodes the keepNodePools map is checked whether the nodepool should be removed or not.

func Dynamic

func Dynamic(nodepools []*spec.NodePool) []*spec.NodePool

Dynamic returns every dynamic nodepool.

func DynamicGenerateKeys

func DynamicGenerateKeys(nodepools []*spec.NodePool, outputDir string) error

DynamicGenerateKeys creates private keys files for all nodes in the provided dynamic node pools in form of <node name>.pem.

func ExtractDynamic

func ExtractDynamic(nodepools []*spec.NodePool) []*spec.DynamicNodePool

ExtractDynamic returns slice of dynamic node pools.

func ExtractRegions

func ExtractRegions(nodepools []*spec.DynamicNodePool) []string

ExtractRegions will return a list of all regions used in list of nodepools

func FindApiEndpoint

func FindApiEndpoint(nodepools []*spec.NodePool) (*spec.NodePool, *spec.Node)

FindApiEndpoint searches for a nodepool that has the control node representing the Api endpoint of the cluster.

func FindByName

func FindByName(nodePoolName string, nodePools []*spec.NodePool) *spec.NodePool

FindByName returns the first Nodepool that will have same name as specified in parameters, nil otherwise.

func FindNode added in v0.9.7

func FindNode(nodepools []*spec.NodePool, nodeName string) (static bool, node *spec.Node)

func FirstControlNode

func FirstControlNode(nodepools []*spec.NodePool) *spec.Node

FirstControlNode returns the first control node encountered.

func MatchNameAndHashWithTemplate

func MatchNameAndHashWithTemplate(template, nodepoolName string) (n, h string)

func MustExtractNameAndHash

func MustExtractNameAndHash(pool string) (name, hash string)

func Static

func Static(nodepools []*spec.NodePool) []*spec.NodePool

Static returns every static nodepool.

func StaticGenerateKeys

func StaticGenerateKeys(nodepools []*spec.NodePool, outputDir string) error

StaticGenerateKeys creates private keys files for all nodes in the provided static node pools in form of <node name>.pem.

Types

type ProviderTemplateGroup

type ProviderTemplateGroup struct {
	CloudProvider string
	SpecName      string
	Creds         string
}

Jump to

Keyboard shortcuts

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