kind

package
v0.0.0-...-b25b198 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package kind provides kind cluster functionalities

Package kind provides kind cluster functionalities

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(logLevel log.Level) log.Logger

NewLogger creates logger to retrieve kind cluster provider logs

func NewLoggerWithChannel

func NewLoggerWithChannel(ch chan string, logLevel log.Level) log.Logger

NewLoggerWithChannel creates logger to retrieve kind cluster provider logs with channel

Types

type Client

type Client interface {
	// CreateKindCluster creates new kind cluster
	CreateKindCluster() (string, error)

	// DeleteKindCluster deletes existing kind cluster
	DeleteKindCluster() error

	// GetKindClusterName returns name of the kind cluster
	GetKindClusterName() string

	// GetKindNodeImageAndConfig returns the kind node image and kind config
	GetKindNodeImageAndConfig() (string, *kindv1.Cluster, error)
}

Client is used to create/delete kubernetes-in-docker cluster

func New

func New(options *KindClusterOptions) Client

New returns client to interact with kind clusters

type InfoLogger

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

InfoLogger defines the info logging interface kind uses

func (*InfoLogger) Enabled

func (l *InfoLogger) Enabled() bool

Enabled should return true if this verbosity level is enabled

func (*InfoLogger) Info

func (l *InfoLogger) Info(message string)

Info is used to write a user facing status message

func (*InfoLogger) Infof

func (l *InfoLogger) Infof(format string, args ...interface{})

Infof is used to write a Printf style user facing status message

type KindClusterOptions

type KindClusterOptions struct {
	Provider         KindClusterProvider
	ClusterName      string
	NodeImage        string
	KubeConfigPath   string
	TKGConfigDir     string
	Readerwriter     tkgconfigreaderwriter.TKGConfigReaderWriter
	DefaultImageRepo string
}

KindClusterOptions carries options to configure kind cluster

type KindClusterProvider

type KindClusterProvider interface {
	Create(name string, options ...cluster.CreateOption) error
	Delete(name, explicitKubeconfigPath string) error
	KubeConfig(name string, internal bool) (string, error)
}

KindClusterProvider is interface for creating/deleting kind cluster

type KindClusterProxy

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

KindClusterProxy return the Proxy used for operating kubernetes-in-docker clusters

func (*KindClusterProxy) CreateKindCluster

func (k *KindClusterProxy) CreateKindCluster() (string, error)

CreateKindCluster creates new kind cluster

func (*KindClusterProxy) DeleteKindCluster

func (k *KindClusterProxy) DeleteKindCluster() error

DeleteKindCluster deletes existing kind cluster

func (*KindClusterProxy) GetKindClusterName

func (k *KindClusterProxy) GetKindClusterName() string

GetKindClusterName returns name of the kind cluster

func (*KindClusterProxy) GetKindNodeImageAndConfig

func (k *KindClusterProxy) GetKindNodeImageAndConfig() (string, *kindv1.Cluster, error)

GetKindNodeImageAndConfig return the Kind node Image full path and configuration details

func (*KindClusterProxy) ResolveHostname

func (k *KindClusterProxy) ResolveHostname(repositoryPath string) string

type Logger

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

Logger implements interface to retrieve logs from kind cluster provider

func (*Logger) Error

func (l *Logger) Error(message string)

Error may be used to write an error message when it occurs Prefer returning an error instead in most cases

func (*Logger) Errorf

func (l *Logger) Errorf(format string, args ...interface{})

Errorf may be used to write a Printf style error message when it occurs Prefer returning an error instead in most cases

func (*Logger) V

func (l *Logger) V(level log.Level) log.InfoLogger

V returns an InfoLogger for a given verbosity Level

func (*Logger) Warn

func (l *Logger) Warn(message string)

Warn should be used to write user facing warnings

func (*Logger) Warnf

func (l *Logger) Warnf(format string, args ...interface{})

Warnf should be used to write Printf style user facing warnings

Jump to

Keyboard shortcuts

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