cluster

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 47 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillDefaults

func FillDefaults(cluster *api.Cluster)

func ListTypeMeta

func ListTypeMeta() api.TypeMeta

func NewDockerMachine

func NewDockerMachine(ctx context.Context, client dockerClient, errOut io.Writer) (*dockerMachine, error)

func TypeMeta

func TypeMeta() api.TypeMeta

Types

type Admin

type Admin interface {
	EnsureInstalled(ctx context.Context) error
	Create(ctx context.Context, desired *api.Cluster, registry *api.Registry) error

	// Infers the LocalRegistryHosting that this admin will try to configure.
	LocalRegistryHosting(ctx context.Context, desired *api.Cluster, registry *api.Registry) (*localregistry.LocalRegistryHostingV1, error)

	Delete(ctx context.Context, config *api.Cluster) error
}

A cluster admin provides the basic start/stop functionality of a cluster, independent of the configuration of the machine it's running on.

type Controller

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

func DefaultController

func DefaultController(iostreams genericclioptions.IOStreams) (*Controller, error)

func (*Controller) Apply

func (c *Controller) Apply(ctx context.Context, desired *api.Cluster) (*api.Cluster, error)

Compare the desired cluster against the existing cluster, and reconcile the two to match.

func (*Controller) Current added in v0.3.0

func (c *Controller) Current(ctx context.Context) (*api.Cluster, error)

func (*Controller) Delete

func (c *Controller) Delete(ctx context.Context, name string) error

func (*Controller) Get

func (c *Controller) Get(ctx context.Context, name string) (*api.Cluster, error)

func (*Controller) List

func (c *Controller) List(ctx context.Context, options ListOptions) (*api.ClusterList, error)

type DockerDesktopClient added in v0.2.0

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

Uses the DockerDesktop GUI protocol to control DockerDesktop.

There isn't an off-the-shelf library or documented protocol we can use for this, so we do the best we can.

func NewDockerDesktopClient added in v0.2.0

func NewDockerDesktopClient() (DockerDesktopClient, error)

func (DockerDesktopClient) Open added in v0.3.0

func (DockerDesktopClient) Quit added in v0.3.0

func (DockerDesktopClient) ResetCluster added in v0.2.2

func (c DockerDesktopClient) ResetCluster(ctx context.Context) error

func (DockerDesktopClient) SetSettingValue added in v0.2.0

func (c DockerDesktopClient) SetSettingValue(ctx context.Context, key, newValue string) error

func (DockerDesktopClient) SettingsValues added in v0.2.0

func (c DockerDesktopClient) SettingsValues(ctx context.Context) (interface{}, error)

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type ListOptions

type ListOptions struct {
	FieldSelector string
}

type Machine

type Machine interface {
	CPUs(ctx context.Context) (int, error)
	EnsureExists(ctx context.Context) error
	Restart(ctx context.Context, desired, existing *api.Cluster) error
}

type Product

type Product string

Enum of possible values for ctlptl.dev Cluster.product

Named in honor of the product component of the user-agent string, which we hope isn't foreshadowing.

const (
	ProductUnknown        Product = "unknown"
	ProductGKE            Product = "gke"
	ProductMinikube       Product = "minikube"
	ProductDockerDesktop  Product = "docker-desktop"
	ProductMicroK8s       Product = "microk8s"
	ProductCRC            Product = "crc"
	ProductKrucible       Product = "krucible"
	ProductKIND           Product = "kind"
	ProductK3D            Product = "k3d"
	ProductRancherDesktop Product = "rancher-desktop"
)

func (Product) DefaultClusterName

func (p Product) DefaultClusterName() string

func (Product) IsDevCluster

func (e Product) IsDevCluster() bool

func (Product) String

func (p Product) String() string

func (Product) UsesLocalDockerRegistry

func (e Product) UsesLocalDockerRegistry() bool

Jump to

Keyboard shortcuts

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