nodes

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Amd64 = "amd64"
	Arm64 = "arm64"
)
View Source
const (
	ControlPlane = "node-role.kubernetes.io/control-plane"
)

Variables

View Source
var (
	// ErrFailedToResolveArch is returned when resolving the architecture failed.
	ErrFailedToResolveArch = errors.New("failed to resolve architecture for nodepool")
)

Functions

func GetAllLabels

func GetAllLabels(np *pb.NodePool, resolver ArchResolver) (map[string]string, error)

GetAllLabels returns default labels with their theoretical values for the specified nodepool.

func GetAllTaints

func GetAllTaints(np *pb.NodePool) []k8sV1.Taint

GetAllTaints returns default taints with their theoretical values for the specified nodepool.

Types

type Arch

type Arch string

type ArchResolver

type ArchResolver interface {
	Arch(node *pb.NodePool) (Arch, error)
}

ArchResolver resolves the architecture of a nodepool.

type DynamicNodePoolResolver

type DynamicNodePoolResolver struct {
	// contains filtered or unexported fields
}

DynamicNodePoolResolver will resolve architecture for a dynamic nodepool.

func NewDynamicNodePoolResolver

func NewDynamicNodePoolResolver(init []*pb.DynamicNodePool) (*DynamicNodePoolResolver, error)

func (*DynamicNodePoolResolver) Arch

func (r *DynamicNodePoolResolver) Arch(np *pb.NodePool) (Arch, error)

type LabelKey

type LabelKey string
const (
	Nodepool         LabelKey = "claudie.io~1nodepool"
	Provider         LabelKey = "claudie.io~1provider"
	ProviderInstance LabelKey = "claudie.io~1provider-instance"
	NodeType         LabelKey = "claudie.io~1node-type"
	KubernetesZone   LabelKey = "topology.kubernetes.io~1zone"
	KubernetesRegion LabelKey = "topology.kubernetes.io~1region"
	KubernetesOs     LabelKey = "kubernetes.io~1os"
	KubernetesArch   LabelKey = "kubernetes.io~1arch"
	KubeoneOs        LabelKey = "v1.kubeone.io~1operating-system"
)

To properly escape / in JSONPatch, it has to be replaced with ~1 https://jsonpatch.com/#json-pointer

Jump to

Keyboard shortcuts

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