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.
Click to show internal directories.
Click to hide internal directories.