kube

package
v0.1.23-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBootstrapTokenNotFound = errors.New("bootstrap token not found")

ErrBootstrapTokenNotFound is returned by GetBootstrapToken when no matching bootstrap token secret exists in the cluster.

Functions

func ApplyManifests

func ApplyManifests(ctx context.Context, logger *slog.Logger, kubectl func(context.Context) *exec.Cmd, manifestPath string) error

func BootstrapTokenManifest

func BootstrapTokenManifest(id, token string) string

func ClientAndConfigFromBytes

func ClientAndConfigFromBytes(b []byte) (*kubernetes.Clientset, *rest.Config, error)

func GenerateBootstrapIDAndToken

func GenerateBootstrapIDAndToken() (string, string, error)

func GetRootKubernetesCA

func GetRootKubernetesCA(k kubernetes.Interface) ([]byte, error)

func Kubectl

func Kubectl(env []string, kubeconfig string) func(context.Context) *exec.Cmd

func KubectlCmd

func KubectlCmd(ctx context.Context, logger *slog.Logger, kubectl func(context.Context) *exec.Cmd, args ...string) error

Types

type BootstrapToken

type BootstrapToken struct {
	ID     string
	Secret string
}

func GetBootstrapToken

func GetBootstrapToken(ctx context.Context, kubeCli kubernetes.Interface) (*BootstrapToken, error)

func (BootstrapToken) String

func (t BootstrapToken) String() string

Jump to

Keyboard shortcuts

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