virtualcluster

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNodepool

func CreateNodepool(ctx context.Context, kubeconfigPath string, nodepoolName string, opts ...NodepoolOpt) error

CreateNodepool creates a new node pool.

TODO: 1. create a new package to define ErrNotFound, ErrAlreadyExists, ... errors. 2. support configurable timeout.

Types

type NodepoolOpt

type NodepoolOpt func(*nodepoolConfig)

NodepoolOpt is used to update default node pool's setting.

func WithNodepoolCPUOpt

func WithNodepoolCPUOpt(cpu int) NodepoolOpt

WithNodepoolCPUOpt updates CPU resource.

func WithNodepoolCountOpt

func WithNodepoolCountOpt(count int) NodepoolOpt

WithNodepoolCountOpt updates node count.

func WithNodepoolLabelsOpt

func WithNodepoolLabelsOpt(labels []string) NodepoolOpt

WithNodepoolLabelsOpt updates node's labels.

func WithNodepoolMemoryOpt

func WithNodepoolMemoryOpt(memory int) NodepoolOpt

WithNodepoolMemoryOpt updates Memory resource.

func WithNodepoolNodeControllerAffinity

func WithNodepoolNodeControllerAffinity(nodeSelectors map[string][]string) NodepoolOpt

WithNodepoolNodeControllerAffinity forces virtual node's controller to nodes with that specific labels.

Jump to

Keyboard shortcuts

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