cluster

package
v0.8.28 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 52 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 dctr.Client, iostreams genericclioptions.IOStreams) (*dockerMachine, error)

func TypeMeta

func TypeMeta() api.TypeMeta

Types

type Admin

type Admin interface {
	EnsureInstalled(ctx context.Context) error

	// Create a new cluster.
	//
	// Make a best effort attempt to delete any resources that might block creation
	// of the cluster.
	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 AdminInContainer added in v0.8.8

type AdminInContainer interface {
	ModifyConfigInContainer(ctx context.Context, cluster *api.Cluster, containerID string, dockerClient dctr.Client, configWriter configWriter) error
}

An extension of cluster admin that indicates the cluster configuration can be modified for use from inside containers.

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+Backend protocols 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
}

Jump to

Keyboard shortcuts

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