kind

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 38 Imported by: 1

Documentation

Overview

Package kind implements the runtime.Runtime interface using the kind.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildKind

func BuildKind(conf BuildKindConfig) (string, error)

BuildKind builds the kind yaml content.

func NewDockerCluster added in v0.3.0

func NewDockerCluster(name, workdir string) (runtime.Runtime, error)

NewDockerCluster creates a new Runtime for kind with docker

func NewPodmanCluster added in v0.3.0

func NewPodmanCluster(name, workdir string) (runtime.Runtime, error)

NewPodmanCluster creates a new Runtime for kind with podman

Types

type BuildKindConfig

type BuildKindConfig struct {
	KubeApiserverPort  uint32
	EtcdPort           uint32
	DashboardPort      uint32
	PrometheusPort     uint32
	JaegerPort         uint32
	KwokControllerPort uint32

	RuntimeConfig []string
	FeatureGates  []string

	AuditPolicy string
	AuditLog    string

	KubeconfigPath    string
	SchedulerConfig   string
	TracingConfigPath string
	Workdir           string

	EtcdExtraArgs                 []internalversion.ExtraArgs
	EtcdExtraVolumes              []internalversion.Volume
	ApiserverExtraArgs            []internalversion.ExtraArgs
	ApiserverExtraVolumes         []internalversion.Volume
	SchedulerExtraArgs            []internalversion.ExtraArgs
	SchedulerExtraVolumes         []internalversion.Volume
	ControllerManagerExtraArgs    []internalversion.ExtraArgs
	ControllerManagerExtraVolumes []internalversion.Volume
	Verbosity                     log.Level
	KwokControllerExtraVolumes    []internalversion.Volume
	PrometheusExtraVolumes        []internalversion.Volume

	BindAddress      string
	DisableQPSLimits bool
	KubeVersion      version.Version
}

BuildKindConfig is the configuration for building the kind config

type Cluster

type Cluster struct {
	*runtime.Cluster
	// contains filtered or unexported fields
}

Cluster is an implementation of Runtime for kind

func (*Cluster) AddContext added in v0.2.0

func (c *Cluster) AddContext(ctx context.Context, kubeconfigPath string) error

AddContext add the context of cluster to kubeconfig

func (*Cluster) Available added in v0.2.0

func (c *Cluster) Available(ctx context.Context) error

Available checks whether the runtime is available.

func (*Cluster) CollectLogs added in v0.3.0

func (c *Cluster) CollectLogs(ctx context.Context, dir string) error

CollectLogs returns the logs of the specified component.

func (*Cluster) Down

func (c *Cluster) Down(ctx context.Context) error

Down stops the cluster

func (*Cluster) EtcdctlInCluster added in v0.1.0

func (c *Cluster) EtcdctlInCluster(ctx context.Context, args ...string) error

EtcdctlInCluster implements the ectdctl subcommand

func (*Cluster) GetEtcdClient added in v0.5.0

func (c *Cluster) GetEtcdClient(ctx context.Context) (etcd.Client, error)

GetEtcdClient returns the etcd client of cluster

func (*Cluster) InitCRs added in v0.5.0

func (c *Cluster) InitCRs(ctx context.Context) error

InitCRs initializes the CRs.

func (*Cluster) Install

func (c *Cluster) Install(ctx context.Context) error

Install installs the cluster

func (*Cluster) ListBinaries

func (c *Cluster) ListBinaries(ctx context.Context) ([]string, error)

ListBinaries list binaries in the cluster

func (*Cluster) ListImages

func (c *Cluster) ListImages(ctx context.Context) ([]string, error)

ListImages list images in the cluster

func (*Cluster) Logs

func (c *Cluster) Logs(ctx context.Context, name string, out io.Writer) error

Logs returns the logs of the specified component.

func (*Cluster) LogsFollow

func (c *Cluster) LogsFollow(ctx context.Context, name string, out io.Writer) error

LogsFollow follows the logs of the component

func (*Cluster) Ready added in v0.1.0

func (c *Cluster) Ready(ctx context.Context) (bool, error)

Ready returns true if the cluster is ready

func (*Cluster) RemoveContext added in v0.2.0

func (c *Cluster) RemoveContext(ctx context.Context, kubeconfigPath string) error

RemoveContext remove the context of cluster from kubeconfig

func (*Cluster) SnapshotRestore

func (c *Cluster) SnapshotRestore(ctx context.Context, path string) error

SnapshotRestore restore the snapshot of cluster

func (*Cluster) SnapshotRestoreWithYAML added in v0.2.0

func (c *Cluster) SnapshotRestoreWithYAML(ctx context.Context, path string, conf runtime.SnapshotRestoreWithYAMLConfig) error

SnapshotRestoreWithYAML restore the snapshot of cluster

func (*Cluster) SnapshotSave

func (c *Cluster) SnapshotSave(ctx context.Context, path string) error

SnapshotSave save the snapshot of cluster

func (*Cluster) SnapshotSaveWithYAML added in v0.2.0

func (c *Cluster) SnapshotSaveWithYAML(ctx context.Context, path string, conf runtime.SnapshotSaveWithYAMLConfig) error

SnapshotSaveWithYAML save the snapshot of cluster

func (*Cluster) Start

func (c *Cluster) Start(ctx context.Context) error

Start starts the cluster

func (*Cluster) StartComponent added in v0.1.0

func (c *Cluster) StartComponent(ctx context.Context, name string) error

StartComponent starts a component in the cluster

func (*Cluster) Stop

func (c *Cluster) Stop(ctx context.Context) error

Stop stops the cluster

func (*Cluster) StopComponent added in v0.1.0

func (c *Cluster) StopComponent(ctx context.Context, name string) error

StopComponent stops a component in the cluster

func (*Cluster) Up

func (c *Cluster) Up(ctx context.Context) error

Up starts the cluster.

func (*Cluster) WaitReady added in v0.1.0

func (c *Cluster) WaitReady(ctx context.Context, timeout time.Duration) error

WaitReady waits for the cluster to be ready.

Directories

Path Synopsis
config
kind/v1alpha4
Package v1alpha4 copy from https://github.com/kubernetes-sigs/kind/blob/master/pkg/apis/config/v1alpha4/types.go
Package v1alpha4 copy from https://github.com/kubernetes-sigs/kind/blob/master/pkg/apis/config/v1alpha4/types.go
kubeadm/v1beta3
Package v1beta3 copy from https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/apis/kubeadm/v1beta3/types.go
Package v1beta3 copy from https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/apis/kubeadm/v1beta3/types.go

Jump to

Keyboard shortcuts

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