kubernetes

package
v2.16.3 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package kubernetes provides functionality to bootstrap a Kubernetes cluster, or join an exiting one.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeWrapper

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

KubeWrapper implements Cluster interface.

func New

func New(cloudProvider string, clusterUtil clusterUtil, configProvider configurationProvider, client k8sapi.Client,
	providerMetadata ProviderMetadata, kubeAPIWaiter kubeAPIWaiter,
) *KubeWrapper

New creates a new KubeWrapper with real values.

func (*KubeWrapper) InitCluster

func (k *KubeWrapper) InitCluster(
	ctx context.Context, versionString, clusterName string, conformanceMode bool, kubernetesComponents components.Components, apiServerCertSANs []string, serviceCIDR string, log *slog.Logger,
) ([]byte, error)

InitCluster initializes a new Kubernetes cluster and applies pod network provider.

func (*KubeWrapper) JoinCluster

func (k *KubeWrapper) JoinCluster(ctx context.Context, args *kubeadm.BootstrapTokenDiscovery, peerRole role.Role, k8sComponents components.Components, log *slog.Logger) error

JoinCluster joins existing Kubernetes cluster.

func (*KubeWrapper) StartKubelet

func (k *KubeWrapper) StartKubelet() error

StartKubelet starts the kubelet service.

type ProviderMetadata

type ProviderMetadata interface {
	// UID returns the unique identifier for the constellation.
	UID(ctx context.Context) (string, error)
	// Self retrieves the current instance.
	Self(ctx context.Context) (metadata.InstanceMetadata, error)
	// GetLoadBalancerEndpoint retrieves the load balancer endpoint.
	GetLoadBalancerEndpoint(ctx context.Context) (host, port string, err error)
}

ProviderMetadata implementers read/write cloud provider metadata.

Directories

Path Synopsis
Package k8sapi is used to interact with the Kubernetes API to create or update required resources.
Package k8sapi is used to interact with the Kubernetes API to create or update required resources.
resources
Package resources contains Kubernetes configs and policies for Constellation.
Package resources contains Kubernetes configs and policies for Constellation.
Package kubewaiter is used to wait for the Kubernetes API to be available.
Package kubewaiter is used to wait for the Kubernetes API to be available.

Jump to

Keyboard shortcuts

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