Documentation ¶
Overview ¶
Package kind implements the runtime.Runtime interface using the kind.
Index ¶
- func BuildKind(conf BuildKindConfig) (string, error)
- func NewDockerCluster(name, workdir string) (runtime.Runtime, error)
- func NewFinchCluster(name, workdir string) (runtime.Runtime, error)
- func NewLimaCluster(name, workdir string) (runtime.Runtime, error)
- func NewNerdctlCluster(name, workdir string) (runtime.Runtime, error)
- func NewPodmanCluster(name, workdir string) (runtime.Runtime, error)
- type BuildKindConfig
- type Cluster
- func (c *Cluster) AddContext(ctx context.Context, kubeconfigPath string) error
- func (c *Cluster) Available(ctx context.Context) error
- func (c *Cluster) CollectLogs(ctx context.Context, dir string) error
- func (c *Cluster) Down(ctx context.Context) error
- func (c *Cluster) EtcdctlInCluster(ctx context.Context, args ...string) error
- func (c *Cluster) GetEtcdClient(ctx context.Context) (etcd.Client, error)
- func (c *Cluster) InitCRs(ctx context.Context) error
- func (c *Cluster) InspectComponent(ctx context.Context, name string) (runtime.ComponentStatus, error)
- func (c *Cluster) Install(ctx context.Context) error
- func (c *Cluster) ListBinaries(ctx context.Context) ([]string, error)
- func (c *Cluster) ListImages(ctx context.Context) ([]string, error)
- func (c *Cluster) Logs(ctx context.Context, name string, out io.Writer) error
- func (c *Cluster) LogsFollow(ctx context.Context, name string, out io.Writer) error
- func (c *Cluster) Ready(ctx context.Context) (bool, error)
- func (c *Cluster) RemoveContext(ctx context.Context, kubeconfigPath string) error
- func (c *Cluster) SnapshotRestore(ctx context.Context, path string) error
- func (c *Cluster) SnapshotRestoreWithYAML(ctx context.Context, path string, conf runtime.SnapshotRestoreWithYAMLConfig) error
- func (c *Cluster) SnapshotSave(ctx context.Context, path string) error
- func (c *Cluster) SnapshotSaveWithYAML(ctx context.Context, path string, conf runtime.SnapshotSaveWithYAMLConfig) error
- func (c *Cluster) Start(ctx context.Context) error
- func (c *Cluster) StartComponent(ctx context.Context, name string) error
- func (c *Cluster) Stop(ctx context.Context) error
- func (c *Cluster) StopComponent(ctx context.Context, name string) error
- func (c *Cluster) Up(ctx context.Context) error
- func (c *Cluster) WaitReady(ctx context.Context, timeout time.Duration) error
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
NewDockerCluster creates a new Runtime for kind with docker
func NewFinchCluster ¶ added in v0.6.0
NewFinchCluster creates a new Runtime for kind with finch
func NewLimaCluster ¶ added in v0.6.0
NewLimaCluster creates a new Runtime for kind with lima
func NewNerdctlCluster ¶ added in v0.6.0
NewNerdctlCluster creates a new Runtime for kind with nerdctl
Types ¶
type BuildKindConfig ¶
type BuildKindConfig struct { KubeApiserverPort uint32 KubeApiserverInsecurePort 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 ¶
Cluster is an implementation of Runtime for kind
func (*Cluster) AddContext ¶ added in v0.2.0
AddContext add the context of cluster to kubeconfig
func (*Cluster) CollectLogs ¶ added in v0.3.0
CollectLogs returns the logs of the specified component.
func (*Cluster) EtcdctlInCluster ¶ added in v0.1.0
EtcdctlInCluster implements the ectdctl subcommand
func (*Cluster) GetEtcdClient ¶ added in v0.5.0
GetEtcdClient returns the etcd client of cluster
func (*Cluster) InspectComponent ¶ added in v0.6.0
func (c *Cluster) InspectComponent(ctx context.Context, name string) (runtime.ComponentStatus, error)
InspectComponent returns the status of the component
func (*Cluster) ListBinaries ¶
ListBinaries list binaries in the cluster
func (*Cluster) ListImages ¶
ListImages list images in the cluster
func (*Cluster) LogsFollow ¶
LogsFollow follows the logs of the component
func (*Cluster) RemoveContext ¶ added in v0.2.0
RemoveContext remove the context of cluster from kubeconfig
func (*Cluster) SnapshotRestore ¶
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 ¶
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) StartComponent ¶ added in v0.1.0
StartComponent starts a component in the cluster
func (*Cluster) StopComponent ¶ added in v0.1.0
StopComponent stops a component in the cluster
Source Files ¶
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 |