cluster

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: Apache-2.0 Imports: 37 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, 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
	LocalRegistryHosting(registry *api.Registry) *localregistry.LocalRegistryHostingV1
	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) 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 DockerForMacClient

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

Uses the DockerForMac GUI protocol to control DockerForMac.

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

func NewDockerForMacClient

func NewDockerForMacClient() (DockerForMacClient, 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"
)

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