cloudinit

package
v1.7.0 Latest Latest
Warning

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

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

Documentation

Overview

Package cloudinit implements kubeadm cloudinit functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInitControlPlane

func NewInitControlPlane(input *ControlPlaneInput) ([]byte, error)

NewInitControlPlane returns the user data string to be used on a controlplane instance.

func NewJoinControlPlane

func NewJoinControlPlane(input *ControlPlaneJoinInput) ([]byte, error)

NewJoinControlPlane returns the user data string to be used on a new control plane instance.

func NewNode

func NewNode(input *NodeInput) ([]byte, error)

NewNode returns the user data string to be used on a node instance.

Types

type BaseUserData

type BaseUserData struct {
	Header               string
	PreKubeadmCommands   []string
	PostKubeadmCommands  []string
	AdditionalFiles      []bootstrapv1.File
	WriteFiles           []bootstrapv1.File
	Users                []bootstrapv1.User
	NTP                  *bootstrapv1.NTP
	DiskSetup            *bootstrapv1.DiskSetup
	Mounts               []bootstrapv1.MountPoints
	ControlPlane         bool
	UseExperimentalRetry bool
	KubeadmCommand       string
	KubeadmVerbosity     string
	SentinelFileCommand  string
}

BaseUserData is shared across all the various types of files written to disk.

type ControlPlaneInput

type ControlPlaneInput struct {
	BaseUserData
	secret.Certificates

	ClusterConfiguration string
	InitConfiguration    string
}

ControlPlaneInput defines the context to generate a controlplane instance user data.

type ControlPlaneJoinInput

type ControlPlaneJoinInput struct {
	BaseUserData
	secret.Certificates
	BootstrapToken    string
	JoinConfiguration string
}

ControlPlaneJoinInput defines context to generate controlplane instance user data for control plane node join.

type NodeInput

type NodeInput struct {
	BaseUserData
	JoinConfiguration string
}

NodeInput defines the context to generate a node user data.

Jump to

Keyboard shortcuts

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