Documentation ¶
Index ¶
- func GetMachineTemplate(ctx context.Context, client kubernetes.Client, name, namespace string) (*dockerv1.DockerMachineTemplate, error)
- func MachineTemplateEqual(new, old *dockerv1.DockerMachineTemplate) bool
- func NeedsNewControlPlaneTemplate(oldSpec, newSpec *cluster.Spec) bool
- func NeedsNewEtcdTemplate(oldSpec, newSpec *cluster.Spec) bool
- func NeedsNewKubeadmConfigTemplate(newWorkerNodeGroup *v1alpha1.WorkerNodeGroupConfiguration, ...) bool
- func NeedsNewWorkloadTemplate(oldSpec, newSpec *cluster.Spec, ...) bool
- func NewProvider(providerConfig *v1alpha1.DockerDatacenterConfig, docker ProviderClient, ...) providers.Provider
- func ValidateControlPlaneEndpoint(clusterSpec *cluster.Spec) error
- type ControlPlane
- type DockerTemplateBuilder
- func (d *DockerTemplateBuilder) CAPIWorkersSpecWithInitialNames(spec *cluster.Spec) (content []byte, err error)
- func (d *DockerTemplateBuilder) GenerateCAPISpecControlPlane(clusterSpec *cluster.Spec, buildOptions ...providers.BuildMapOption) (content []byte, err error)
- func (d *DockerTemplateBuilder) GenerateCAPISpecWorkers(clusterSpec *cluster.Spec, ...) (content []byte, err error)
- type ProviderClient
- type ProviderKubectlClient
- type Workers
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 NeedsNewEtcdTemplate ¶
func NeedsNewKubeadmConfigTemplate ¶ added in v0.9.0
func NeedsNewKubeadmConfigTemplate(newWorkerNodeGroup *v1alpha1.WorkerNodeGroupConfiguration, oldWorkerNodeGroup *v1alpha1.WorkerNodeGroupConfiguration) bool
func NeedsNewWorkloadTemplate ¶
func NeedsNewWorkloadTemplate(oldSpec, newSpec *cluster.Spec, oldWorker, newWorker v1alpha1.WorkerNodeGroupConfiguration) bool
NeedsNewWorkloadTemplate determines if a new workload template is needed.
func NewProvider ¶
func NewProvider(providerConfig *v1alpha1.DockerDatacenterConfig, docker ProviderClient, providerKubectlClient ProviderKubectlClient, now types.NowFunc) providers.Provider
func ValidateControlPlaneEndpoint ¶ added in v0.13.0
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
type ControlPlane = clusterapi.ControlPlane[*dockerv1.DockerCluster, *dockerv1.DockerMachineTemplate]
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
type ProviderClient ¶
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
type Workers = clusterapi.Workers[*dockerv1.DockerMachineTemplate]
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.