userdata

package
v0.0.0-...-57c84ca Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	InitScript = `` /* 1312-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func CompressUserdata

func CompressUserdata(userdata string) (string, error)

func JoinControlPlane

func JoinControlPlane(input *ControlPlaneJoinInput) (string, error)

JoinControlPlane returns the user data string to be used on a new contrplplane instance.

func NewControlPlane

func NewControlPlane(input *ControlPlaneInput) (string, error)

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

func NewControlPlaneCloudInit

func NewControlPlaneCloudInit(input *ControlPlaneInputCloudInit) (string, error)

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

func NewJoinControlPlaneCloudInit

func NewJoinControlPlaneCloudInit(input *ControlPlaneJoinInputCloudInit) (string, error)

NewJoinControlPlaneCloudInit returns the user data string to be used on a new controlplane instance

func NewNode

func NewNode(input *NodeInput) (string, error)

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

func NewNodeCloudInit

func NewNodeCloudInit(input *NodeInputCloudInit) (string, error)

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

Types

type BaseConfigure

type BaseConfigure struct {
	DockerConfigure
	OnecloudConfigure
}

type ControlPlaneInput

type ControlPlaneInput struct {
	BaseConfigure

	CACert            string
	CAKey             string
	EtcdCACert        string
	EtcdCAKey         string
	FrontProxyCACert  string
	FrontProxyCAKey   string
	SaCert            string
	SaKey             string
	ELBAddress        string
	ClusterName       string
	PodSubnet         string
	ServiceDomain     string
	ServiceSubnet     string
	KubernetesVersion string
	Hostname          string
	PrivateIP         string
	// contains filtered or unexported fields
}

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

type ControlPlaneInputCloudInit

type ControlPlaneInputCloudInit struct {
	DockerConfig           string
	CACert                 string
	CAKey                  string
	EtcdCACert             string
	EtcdCAKey              string
	FrontProxyCACert       string
	FrontProxyCAKey        string
	SaCert                 string
	SaKey                  string
	ClusterConfiguration   string
	InitConfiguration      string
	KubeProxyConfiguration string
	// contains filtered or unexported fields
}

ControlPlaneInputCloudInit defines the context to generate a controlplane instance user data

type ControlPlaneJoinInput

type ControlPlaneJoinInput struct {
	BaseConfigure

	CACertHash       string
	CACert           string
	CAKey            string
	EtcdCACert       string
	EtcdCAKey        string
	FrontProxyCACert string
	FrontProxyCAKey  string
	SaCert           string
	SaKey            string
	BootstrapToken   string
	ELBAddress       string
	PrivateIP        string
	// contains filtered or unexported fields
}

ContolPlaneJoinInput defines context to generate controlplane instance user data for controlplane node join.

type ControlPlaneJoinInputCloudInit

type ControlPlaneJoinInputCloudInit struct {
	DockerConfig      string
	CACert            string
	CAKey             string
	EtcdCACert        string
	EtcdCAKey         string
	FrontProxyCACert  string
	FrontProxyCAKey   string
	SaCert            string
	SaKey             string
	BootstrapToken    string
	ELBAddress        string
	JoinConfiguration string
	// contains filtered or unexported fields
}

ControlPlaneJoinInputCloudInit defines context to generate controlplane instance user data for controlplane node join

type DockerConfigure

type DockerConfigure struct {
	DockerGraphDir string
}

type InitNodeConfig

type InitNodeConfig struct {
	DockerConfiguration    *api.DockerConfig
	InitConfiguration      *kubeadmv1beta1.InitConfiguration
	ClusterConfiguration   *kubeadmv1beta1.ClusterConfiguration
	KubeProxyConfiguration *kubeproxyconfigv1alpha1.KubeProxyConfiguration

	CACert           string
	CAKey            string
	EtcdCACert       string
	EtcdCAKey        string
	FrontProxyCACert string
	FrontProxyCAKey  string
	SaCert           string
	SaKey            string
}

func (InitNodeConfig) ToScript

func (c InitNodeConfig) ToScript() (string, error)

type InitScriptConfig

type InitScriptConfig struct {
	DockerConfigJSON         string
	InitConfiguration        string
	ClusterConfiguration     string
	KubeProxyConfiguration   string
	ControlJoinConfiguration string
	NodeJoinConfiguration    string

	CACert           string
	CAKey            string
	EtcdCACert       string
	EtcdCAKey        string
	FrontProxyCACert string
	FrontProxyCAKey  string
	SaCert           string
	SaKey            string
}

func (InitScriptConfig) ToScript

func (c InitScriptConfig) ToScript() (string, error)

type JoinControlplaneConfig

type JoinControlplaneConfig struct {
	DockerConfiguration *api.DockerConfig
	JoinConfiguration   *kubeadmv1beta1.JoinConfiguration

	CACert           string
	CAKey            string
	EtcdCACert       string
	EtcdCAKey        string
	FrontProxyCACert string
	FrontProxyCAKey  string
	SaCert           string
	SaKey            string
}

func (JoinControlplaneConfig) ToScript

func (c JoinControlplaneConfig) ToScript() (string, error)

type JoinNodeConfig

type JoinNodeConfig struct {
	DockerConfiguration *api.DockerConfig
	JoinConfiguration   *kubeadmv1beta1.JoinConfiguration
}

func (JoinNodeConfig) ToScript

func (c JoinNodeConfig) ToScript() (string, error)

type NodeInput

type NodeInput struct {
	BaseConfigure

	CACertHash     string
	BootstrapToken string
	ELBAddress     string
	// contains filtered or unexported fields
}

NodeInput defines the context to generate a node user data.

type NodeInputCloudInit

type NodeInputCloudInit struct {
	DockerConfig      string
	JoinConfiguration string
	// contains filtered or unexported fields
}

NodeInputCloudInit defines the context to generate a node user data

type OnecloudConfigure

type OnecloudConfigure struct {
	AuthURL           string
	AdminUser         string
	AdminPassword     string
	AdminProject      string
	Region            string
	Cluster           string
	SchedulerEndpoint string
}

Jump to

Keyboard shortcuts

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