node

package
v0.0.0-...-24a1fde Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubeconfigTmp = "/tmp/kubeconfig"
	ClusterName   = "kubernetes"
)
View Source
const (
	CSR_OPERATOR = "xdpin-operator"
)

Variables

Functions

func GetCA

func GetCA(client clientset.Interface) ([]byte, error)

func GetCSR

func GetCSR(
	apiserver, token string,
	nodeName types.NodeName,
) (*clientcmdapi.Config, error)

func NewLocal

func NewLocal(pvd string) (host.Host, error)

func RequestFastCSR

func RequestFastCSR(
	ctx context.Context,
	bootstrapClientConfig *restclient.Config,
	nodeName types.NodeName, cn string,
) (*clientcmdapi.Config, error)

RequestFastCSR used for test, generate xdpin-operator kubeconfig

func RequestWriteCSR

func RequestWriteCSR(
	ctx context.Context,
	bootstrapClientConfig *restclient.Config,
	dstKubeconfig string, nodeName types.NodeName, cn string,
) (*clientcmdapi.Config, error)

RequestWriteCSR used for test, generate xdpin-operator kubeconfig

func SendCSR

func SendCSR(ctx context.Context, client clientset.Interface, cfg *Conf) (certData []byte, err error)

Types

type Conf

type Conf struct {
	PrivateKey []byte
	CSRName    string
	NodeName   types.NodeName
	SingerName string
	Subject    *pkix.Name
	Usage      []certificatesv1.KeyUsage
}

type Meridian

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

func InitNode

func InitNode(action string, role v1.NodeRole, apiserver, token, ng, cloud string, labels []string) (*Meridian, error)

func NewMeridianNode

func NewMeridianNode(
	action string,
	role v1.NodeRole,
	ng string,
	cloud string,
	req *v1.Request,
	labels []string,
) (*Meridian, error)

func (*Meridian) CreateDocker

func (m *Meridian) CreateDocker(ctx context.Context, version, registry string) error

func (*Meridian) DestroyDocker

func (m *Meridian) DestroyDocker(ctx context.Context) error

func (*Meridian) DestroyNode

func (m *Meridian) DestroyNode(force bool) error

func (*Meridian) EnsureNode

func (m *Meridian) EnsureNode() error

Directories

Path Synopsis
kubeadm
Package kubeadminit implements the kubeadm init actionInit
Package kubeadminit implements the kubeadm init actionInit

Jump to

Keyboard shortcuts

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