docker

package
v0.15.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMachineTemplate added in v0.13.0

func GetMachineTemplate(ctx context.Context, client kubernetes.Client, name, namespace string) (*dockerv1.DockerMachineTemplate, error)

GetMachineTemplate gets a DockerMachineTemplate object using the provided client If the object doesn't exist, it returns a NotFound error.

func MachineTemplateEqual added in v0.13.0

func MachineTemplateEqual(new, old *dockerv1.DockerMachineTemplate) bool

MachineTemplateEqual returns a boolean indicating whether or not the provided DockerMachineTemplates are equal.

func NeedsNewControlPlaneTemplate

func NeedsNewControlPlaneTemplate(oldSpec, newSpec *cluster.Spec) bool

func NeedsNewEtcdTemplate

func NeedsNewEtcdTemplate(oldSpec, newSpec *cluster.Spec) bool

func NeedsNewKubeadmConfigTemplate added in v0.9.0

func NeedsNewKubeadmConfigTemplate(newWorkerNodeGroup *v1alpha1.WorkerNodeGroupConfiguration, oldWorkerNodeGroup *v1alpha1.WorkerNodeGroupConfiguration) bool

func NeedsNewWorkloadTemplate

func NeedsNewWorkloadTemplate(oldSpec, newSpec *cluster.Spec) bool

func NewProvider

func NewProvider(providerConfig *v1alpha1.DockerDatacenterConfig, docker ProviderClient, providerKubectlClient ProviderKubectlClient, now types.NowFunc) providers.Provider

func ValidateControlPlaneEndpoint added in v0.13.0

func ValidateControlPlaneEndpoint(clusterSpec *cluster.Spec) error

ValidateControlPlaneEndpoint - checks to see if endpoint host configuration is specified for docker cluster and returns an error if true.

Types

type ControlPlane added in v0.13.0

ControlPlane represents a CAPI Docker control plane.

func ControlPlaneSpec added in v0.13.0

func ControlPlaneSpec(ctx context.Context, logger logr.Logger, client kubernetes.Client, spec *cluster.Spec) (*ControlPlane, error)

ControlPlaneSpec builds a docker ControlPlane definition based on an eks-a cluster spec.

type DockerTemplateBuilder

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

func NewDockerTemplateBuilder

func NewDockerTemplateBuilder(now types.NowFunc) *DockerTemplateBuilder

NewDockerTemplateBuilder returns a docker template builder object.

func (*DockerTemplateBuilder) CAPIWorkersSpecWithInitialNames added in v0.13.0

func (d *DockerTemplateBuilder) CAPIWorkersSpecWithInitialNames(spec *cluster.Spec) (content []byte, err error)

CAPIWorkersSpecWithInitialNames generates a yaml spec with the CAPI objects representing the worker nodes for a particular eks-a cluster. It uses default initial names (ended in '-1') for the docker machine templates and kubeadm config templates.

func (*DockerTemplateBuilder) GenerateCAPISpecControlPlane added in v0.6.0

func (d *DockerTemplateBuilder) GenerateCAPISpecControlPlane(clusterSpec *cluster.Spec, buildOptions ...providers.BuildMapOption) (content []byte, err error)

func (*DockerTemplateBuilder) GenerateCAPISpecWorkers added in v0.6.0

func (d *DockerTemplateBuilder) GenerateCAPISpecWorkers(clusterSpec *cluster.Spec, workloadTemplateNames, kubeadmconfigTemplateNames map[string]string) (content []byte, err error)

type ProviderClient

type ProviderClient interface {
	GetDockerLBPort(ctx context.Context, clusterName string) (port string, err error)
}

type ProviderKubectlClient

type ProviderKubectlClient interface {
	GetEksaCluster(ctx context.Context, cluster *types.Cluster, clusterName string) (*v1alpha1.Cluster, error)
	GetMachineDeployment(ctx context.Context, machineDeploymentName string, opts ...executables.KubectlOpt) (*clusterv1.MachineDeployment, error)
	GetKubeadmControlPlane(ctx context.Context, cluster *types.Cluster, clusterName string, opts ...executables.KubectlOpt) (*controlplanev1.KubeadmControlPlane, error)
	GetEtcdadmCluster(ctx context.Context, cluster *types.Cluster, clusterName string, opts ...executables.KubectlOpt) (*etcdv1.EtcdadmCluster, error)
	UpdateAnnotation(ctx context.Context, resourceType, objectName string, annotations map[string]string, opts ...executables.KubectlOpt) error
}

type Workers added in v0.13.0

Workers represents the docker specific CAPI spec for worker nodes.

func WorkersSpec added in v0.13.0

func WorkersSpec(ctx context.Context, logger logr.Logger, client kubernetes.Client, spec *cluster.Spec) (*Workers, error)

WorkersSpec generates a Docker specific CAPI spec for an eks-a cluster worker nodes. It talks to the cluster with a client to detect changes in immutable objects and generates new names for them.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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