nodepools

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByProvider

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

ByProvider returns an iterator that groups nodepools 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 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 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