cluster

package
v0.0.0-...-619e6d8 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBootstrapKubeconfig

func CreateBootstrapKubeconfig(clusterName, endpoint string, caCert []byte, token string) ([]byte, error)

CreateBootstrapKubeconfig creates a kubeconfig used for TLS bootstrapping (token-based).

func CreateBootstrapResources

func CreateBootstrapResources(ctx context.Context, kubeconfigPath, token string, caCert []byte, endpoint string) error

CreateBootstrapResources creates the Bootstrap Token Secret and cluster-info ConfigMap.

func ParseCertificatePEM

func ParseCertificatePEM(data []byte) (*x509.Certificate, error)

ParseCertificatePEM parses a PEM-encoded certificate.

Types

type BootstrapData

type BootstrapData struct {
	TokenID      string
	TokenSecret  string
	Kubeconfig   string
	JWSSignature string
}

BootstrapData holds values for the bootstrap resources template

type ExternalAPIServerResult

type ExternalAPIServerResult struct {
	Endpoint string
	CACert   []byte
	// Signing info for KCM (Node CA)
	SigningKey  []byte
	SigningCert []byte
	// Service Account Keys/Pub
	SAKey []byte
	SAPub []byte
	// Front Proxy CA
	FrontProxyCACert []byte
	// Kubeconfigs (generated during CA lifecycle)
	AdminKubeconfig             string
	SchedulerKubeconfig         string
	ControllerManagerKubeconfig string
}

type Manager

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

func NewManager

func NewManager(client *gce.Client) *Manager

func (*Manager) Create

func (m *Manager) Create(ctx context.Context, cfg *config.Cluster, retain bool) (err error)

func (*Manager) Delete

func (m *Manager) Delete(ctx context.Context, name string) error

func (*Manager) EnsureExternalAPIServer

func (m *Manager) EnsureExternalAPIServer(ctx context.Context, cfg *config.Cluster, zone, network, subnet string) (*ExternalAPIServerResult, error)

func (*Manager) ExportLogs

func (m *Manager) ExportLogs(ctx context.Context, clusterName, outDir string) error

func (*Manager) GetKubeconfig

func (m *Manager) GetKubeconfig(ctx context.Context, clusterName string) (string, error)

func (*Manager) ListClusters

func (m *Manager) ListClusters(ctx context.Context) ([]string, error)

func (*Manager) ListNodes

func (m *Manager) ListNodes(ctx context.Context, clusterName string) ([]gce.Instance, error)

func (*Manager) Preflight

func (m *Manager) Preflight(ctx context.Context) error

func (*Manager) SignLocalCertificate

func (m *Manager) SignLocalCertificate(pubKey any, caKey *rsa.PrivateKey, caCert *x509.Certificate, cn string, orgs []string, ipSANS []net.IP, dnsSANS []string, isServer bool) ([]byte, error)

SignLocalCertificate signs a leaf certificate using a local CA key/cert.

Jump to

Keyboard shortcuts

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