Documentation ¶
Index ¶
- Constants
- func CapiChangeDiff(currentSpec, newSpec *cluster.Spec, provider providers.Provider) *types.ChangeDiff
- func Cluster(clusterSpec *cluster.Spec, ...) *clusterv1.Cluster
- func ClusterCASecretName(clusterName string) string
- func ClusterName(cluster *anywherev1.Cluster) string
- func ConfigureAutoscalingInMachineDeployment(md *clusterv1.MachineDeployment, ...)
- func ControlPlaneMachineHealthCheckName(clusterSpec *cluster.Spec) string
- func ControlPlaneMachineTemplateName(cluster *v1alpha1.Cluster) string
- func CreateContainerdConfigFileInKubeadmConfigTemplate(kct *bootstrapv1.KubeadmConfigTemplate, cluster *v1alpha1.Cluster)
- func CreateContainerdConfigFileInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, cluster *v1alpha1.Cluster)
- func DefaultKubeadmConfigTemplateName(clusterSpec *cluster.Spec, ...) string
- func DefaultObjectName(baseName string) string
- func EnsureNewNameIfChanged[M Object[M]](ctx context.Context, client kubernetes.Client, retrieve ObjectRetriever[M], ...) error
- func EtcdClusterName(clusterName string) string
- func EtcdMachineTemplateName(cluster *v1alpha1.Cluster) string
- func EtcdadmCluster(clusterSpec *cluster.Spec, infrastructureTemplate APIObject) *etcdv1.EtcdadmCluster
- func GetKubeadmConfigTemplate(ctx context.Context, client kubernetes.Client, name, namespace string) (*kubeadmv1.KubeadmConfigTemplate, error)
- func GetProviders(ctx context.Context, client KubeLister) ([]clusterctlv1.Provider, error)
- func IncrementName(name string) (string, error)
- func IncrementNameWithFallbackDefault(name, defaultName string) string
- func InfrastructureAPIVersion() string
- func InitialTemplateNamesForWorkers(clusterSpec *cluster.Spec) (machineTemplateNames, kubeadmConfigTemplateNames map[string]string)
- func KubeadmConfigTemplate(clusterSpec *cluster.Spec, ...) (*bootstrapv1.KubeadmConfigTemplate, error)
- func KubeadmConfigTemplateEqual(new, old *kubeadmv1.KubeadmConfigTemplate) bool
- func KubeadmConfigTemplateInCluster(ctx context.Context, kubeclient KubeClient, md *clusterv1.MachineDeployment) (*bootstrapv1.KubeadmConfigTemplate, error)
- func KubeadmControlPlane(clusterSpec *cluster.Spec, infrastructureObject APIObject) (*controlplanev1.KubeadmControlPlane, error)
- func KubeadmControlPlaneName(cluster *v1alpha1.Cluster) string
- func MachineDeployment(clusterSpec *cluster.Spec, ...) *clusterv1.MachineDeployment
- func MachineDeploymentInCluster(ctx context.Context, kubeclient KubeClient, clusterSpec *cluster.Spec, ...) (*clusterv1.MachineDeployment, error)
- func MachineDeploymentName(cluster *v1alpha1.Cluster, ...) string
- func MachineHealthCheckForControlPlane(clusterSpec *cluster.Spec, unhealthyTimeout, nodeStartupTimeout time.Duration) *clusterv1.MachineHealthCheck
- func MachineHealthCheckForWorkers(clusterSpec *cluster.Spec, unhealthyTimeout, nodeStartupTimeout time.Duration) []*clusterv1.MachineHealthCheck
- func MachineHealthCheckObjects(clusterSpec *cluster.Spec, unhealthyTimeout, nodeStartupTimeout time.Duration) []runtime.Object
- func NoProxyDefaults() []string
- func ObjectName(baseName string, version int) string
- func RestartContainerdInKubeadmConfigTemplate(kct *bootstrapv1.KubeadmConfigTemplate, cluster *v1alpha1.Cluster)
- func RestartContainerdInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, cluster *v1alpha1.Cluster)
- func SetBottlerocketAdminContainerImageInEtcdCluster(etcd *etcdv1.EtcdadmCluster, adminImage v1alpha1.Image)
- func SetBottlerocketAdminContainerImageInKubeadmConfigTemplate(kct *bootstrapv1.KubeadmConfigTemplate, versionsBundle *cluster.VersionsBundle)
- func SetBottlerocketAdminContainerImageInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, ...)
- func SetBottlerocketControlContainerImageInEtcdCluster(etcd *etcdv1.EtcdadmCluster, controlImage v1alpha1.Image)
- func SetBottlerocketControlContainerImageInKubeadmConfigTemplate(kct *bootstrapv1.KubeadmConfigTemplate, versionsBundle *cluster.VersionsBundle)
- func SetBottlerocketControlContainerImageInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, ...)
- func SetBottlerocketHostConfigInEtcdCluster(etcd *etcdv1.EtcdadmCluster, hostOSConfig *anywherev1.HostOSConfiguration)
- func SetBottlerocketHostConfigInKubeadmConfigTemplate(kct *bootstrapv1.KubeadmConfigTemplate, ...)
- func SetBottlerocketHostConfigInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, ...)
- func SetBottlerocketInEtcdCluster(etcd *etcdv1.EtcdadmCluster, versionsBundle *cluster.VersionsBundle)
- func SetBottlerocketInKubeadmConfigTemplate(kct *bootstrapv1.KubeadmConfigTemplate, versionsBundle *cluster.VersionsBundle)
- func SetBottlerocketInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, ...)
- func SetIdentityAuthInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, clusterSpec *cluster.Spec)
- func SetKubeVipInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, address, image string) error
- func SetProxyConfigInKubeadmConfigTemplateForBottlerocket(kct *bootstrapv1.KubeadmConfigTemplate, cluster *v1alpha1.Cluster)
- func SetProxyConfigInKubeadmConfigTemplateForUbuntu(kct *bootstrapv1.KubeadmConfigTemplate, cluster *v1alpha1.Cluster) error
- func SetProxyConfigInKubeadmControlPlaneForBottlerocket(kcp *controlplanev1.KubeadmControlPlane, cluster *v1alpha1.Cluster)
- func SetProxyConfigInKubeadmControlPlaneForUbuntu(kcp *controlplanev1.KubeadmControlPlane, cluster *v1alpha1.Cluster) error
- func SetRegistryMirrorInKubeadmConfigTemplateForBottlerocket(kct *bootstrapv1.KubeadmConfigTemplate, ...)
- func SetRegistryMirrorInKubeadmConfigTemplateForUbuntu(kct *bootstrapv1.KubeadmConfigTemplate, ...) error
- func SetRegistryMirrorInKubeadmControlPlaneForBottlerocket(kcp *controlplanev1.KubeadmControlPlane, ...)
- func SetRegistryMirrorInKubeadmControlPlaneForUbuntu(kcp *controlplanev1.KubeadmControlPlane, ...) error
- func SetUbuntuConfigInEtcdCluster(etcd *etcdv1.EtcdadmCluster, version string)
- func SetUnstackedEtcdConfigInKubeadmControlPlaneForBottlerocket(kcp *controlplanev1.KubeadmControlPlane, ...)
- func SetUnstackedEtcdConfigInKubeadmControlPlaneForUbuntu(kcp *controlplanev1.KubeadmControlPlane, ...)
- func WorkerMachineHealthCheckName(clusterSpec *cluster.Spec, ...) string
- func WorkerMachineTemplateName(clusterSpec *cluster.Spec, ...) string
- type APIObject
- type CAPIChangeDiff
- type CAPIClient
- type ClusterResourceSet
- type ControlPlane
- type ExtraArgs
- func AwsIamAuthExtraArgs(awsiam *v1alpha1.AWSIamConfig) ExtraArgs
- func CgroupDriverCgroupfsExtraArgs() ExtraArgs
- func CgroupDriverSystemdExtraArgs() ExtraArgs
- func ControlPlaneNodeLabelsExtraArgs(cpc v1alpha1.ControlPlaneConfiguration) ExtraArgs
- func ControllerManagerArgs(clusterSpec *cluster.Spec) ExtraArgs
- func FeatureGatesExtraArgs(features ...string) ExtraArgs
- func NodeCIDRMaskExtraArgs(clusterNetwork *v1alpha1.ClusterNetwork) ExtraArgs
- func OIDCToExtraArgs(oidc *v1alpha1.OIDCConfig) ExtraArgs
- func PodIAMAuthExtraArgs(podIAMConfig *v1alpha1.PodIAMConfig) ExtraArgs
- func ResolvConfExtraArgs(resolvConf *v1alpha1.ResolvConf) ExtraArgs
- func SecureEtcdTlsCipherSuitesExtraArgs() ExtraArgs
- func SecureTlsCipherSuitesExtraArgs() ExtraArgs
- func WorkerNodeLabelsExtraArgs(wnc v1alpha1.WorkerNodeGroupConfiguration) ExtraArgs
- type Installer
- type KubeClient
- type KubeLister
- type KubectlClient
- type Manager
- type Object
- type ObjectComparator
- type ObjectRetriever
- type Upgrader
- type WorkerGroup
- type Workers
Constants ¶
const ( EKSAClusterLabelName = "cluster.anywhere.eks.amazonaws.com/cluster-name" EKSAClusterLabelNamespace = "cluster.anywhere.eks.amazonaws.com/cluster-namespace" )
const (
ControlPlaneReadyCondition clusterv1.ConditionType = "ControlPlaneReady"
)
Variables ¶
This section is empty.
Functions ¶
func CapiChangeDiff ¶ added in v0.7.0
func Cluster ¶ added in v0.8.0
func Cluster(clusterSpec *cluster.Spec, infrastructureObject, controlPlaneObject, unstackedEtcdObject APIObject) *clusterv1.Cluster
Cluster builds a CAPI Cluster based on an eks-a cluster spec, infrastructureObject, controlPlaneObject and unstackedEtcdObject.
func ClusterCASecretName ¶ added in v0.13.0
ClusterCASecretName returns the name of the cluster CA secret for the cluster.
func ClusterName ¶ added in v0.9.2
func ClusterName(cluster *anywherev1.Cluster) string
ClusterName generates the CAPI cluster name for an EKSA Cluster.
func ConfigureAutoscalingInMachineDeployment ¶ added in v0.12.0
func ConfigureAutoscalingInMachineDeployment(md *clusterv1.MachineDeployment, autoscalingConfig *anywherev1.AutoScalingConfiguration)
func ControlPlaneMachineHealthCheckName ¶ added in v0.11.0
func ControlPlaneMachineTemplateName ¶ added in v0.9.2
ControlPlaneMachineTemplateName sets the default object name on the control plane machine template.
func CreateContainerdConfigFileInKubeadmConfigTemplate ¶ added in v0.9.2
func CreateContainerdConfigFileInKubeadmConfigTemplate(kct *bootstrapv1.KubeadmConfigTemplate, cluster *v1alpha1.Cluster)
CreateContainerdConfigFileInKubeadmConfigTemplate adds the prekubeadm command to create containerd config file in kubeadmConfigTemplate if registry mirror config exists.
func CreateContainerdConfigFileInKubeadmControlPlane ¶ added in v0.9.2
func CreateContainerdConfigFileInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, cluster *v1alpha1.Cluster)
CreateContainerdConfigFileInKubeadmControlPlane adds the prekubeadm command to create containerd config file in kubeadmControlPlane if registry mirror config exists.
func DefaultKubeadmConfigTemplateName ¶ added in v0.9.2
func DefaultKubeadmConfigTemplateName(clusterSpec *cluster.Spec, workerNodeGroupConfig v1alpha1.WorkerNodeGroupConfiguration) string
func DefaultObjectName ¶ added in v0.9.0
func EnsureNewNameIfChanged ¶ added in v0.12.0
func EnsureNewNameIfChanged[M Object[M]](ctx context.Context, client kubernetes.Client, retrieve ObjectRetriever[M], equal ObjectComparator[M], new M, ) error
EnsureNewNameIfChanged updates an object's name if such object is different from its current state in the cluster.
func EtcdClusterName ¶ added in v0.14.0
EtcdClusterName sets the default EtcdCluster object name.
func EtcdMachineTemplateName ¶ added in v0.13.0
EtcdMachineTemplateName sets the default object name on the etcd machine template.
func EtcdadmCluster ¶ added in v0.14.0
func EtcdadmCluster(clusterSpec *cluster.Spec, infrastructureTemplate APIObject) *etcdv1.EtcdadmCluster
EtcdadmCluster builds a etcdadmCluster based on an eks-a cluster spec and infrastructureTemplate.
func GetKubeadmConfigTemplate ¶ added in v0.12.0
func GetKubeadmConfigTemplate(ctx context.Context, client kubernetes.Client, name, namespace string) (*kubeadmv1.KubeadmConfigTemplate, error)
GetKubeadmConfigTemplate retrieves a KubeadmConfigTemplate using a client Implements ObjectRetriever.
func GetProviders ¶ added in v0.11.0
func GetProviders(ctx context.Context, client KubeLister) ([]clusterctlv1.Provider, error)
GetProviders lists all installed CAPI providers across all namespaces from the kube-api server.
func IncrementName ¶ added in v0.9.0
IncrementName takes an object name and increments the suffix number by one. This method is used for updating objects (e.g. machinetemplate, kubeadmconfigtemplate) that are either immutable or require recreation to trigger machine rollout. The original object name should follow the name convention of alphanumeric followed by dash digits, e.g. abc-1, md-0, kct-2. An error will be raised if the original name does not follow this pattern.
func IncrementNameWithFallbackDefault ¶ added in v0.11.0
IncrementNameWithFallbackDefault calls the IncrementName and fallbacks to use the default name if IncrementName returns an error. This method is used to accommodate for any objects with name breaking changes from a previous version. For example, in beta capi snowmachinetemplate is named after the eks-a snowmachineconfig name, without the '-1' suffix. We set the object name to the default new machinetemplate name after detecting the invalid old name.
func InfrastructureAPIVersion ¶ added in v0.8.0
func InfrastructureAPIVersion() string
func InitialTemplateNamesForWorkers ¶ added in v0.16.0
func InitialTemplateNamesForWorkers(clusterSpec *cluster.Spec) (machineTemplateNames, kubeadmConfigTemplateNames map[string]string)
InitialTemplateNamesForWorkers returns the default initial names for workers machine templates and kubeadm config templates.
func KubeadmConfigTemplate ¶ added in v0.8.0
func KubeadmConfigTemplate(clusterSpec *cluster.Spec, workerNodeGroupConfig anywherev1.WorkerNodeGroupConfiguration) (*bootstrapv1.KubeadmConfigTemplate, error)
func KubeadmConfigTemplateEqual ¶ added in v0.12.0
func KubeadmConfigTemplateEqual(new, old *kubeadmv1.KubeadmConfigTemplate) bool
KubeadmConfigTemplateEqual returns true only if the new version of a KubeadmConfigTemplate involves changes with respect to the old one when applied to the cluster. Implements ObjectComparator.
func KubeadmConfigTemplateInCluster ¶ added in v0.9.2
func KubeadmConfigTemplateInCluster(ctx context.Context, kubeclient KubeClient, md *clusterv1.MachineDeployment) (*bootstrapv1.KubeadmConfigTemplate, error)
func KubeadmControlPlane ¶ added in v0.8.0
func KubeadmControlPlane(clusterSpec *cluster.Spec, infrastructureObject APIObject) (*controlplanev1.KubeadmControlPlane, error)
func KubeadmControlPlaneName ¶ added in v0.9.0
KubeadmControlPlaneName generates the kubeadmControlPlane name for an EKSA Cluster.
func MachineDeployment ¶ added in v0.8.0
func MachineDeployment(clusterSpec *cluster.Spec, workerNodeGroupConfig anywherev1.WorkerNodeGroupConfiguration, bootstrapObject, infrastructureObject APIObject) *clusterv1.MachineDeployment
MachineDeployment builds a machineDeployment based on an eks-a cluster spec, workerNodeGroupConfig, bootstrapObject and infrastructureObject.
func MachineDeploymentInCluster ¶ added in v0.9.2
func MachineDeploymentInCluster(ctx context.Context, kubeclient KubeClient, clusterSpec *cluster.Spec, workerNodeGroupConfig v1alpha1.WorkerNodeGroupConfiguration) (*clusterv1.MachineDeployment, error)
func MachineDeploymentName ¶ added in v0.9.0
func MachineDeploymentName(cluster *v1alpha1.Cluster, workerNodeGroupConfig v1alpha1.WorkerNodeGroupConfiguration) string
MachineDeploymentName returns the name for the corresponding MachineDeployment to an EKS-A worker node group.
func MachineHealthCheckForControlPlane ¶ added in v0.11.0
func MachineHealthCheckForControlPlane(clusterSpec *cluster.Spec, unhealthyTimeout, nodeStartupTimeout time.Duration) *clusterv1.MachineHealthCheck
MachineHealthCheckForControlPlane creates MachineHealthCheck resources for the control plane.
func MachineHealthCheckForWorkers ¶ added in v0.11.0
func MachineHealthCheckForWorkers(clusterSpec *cluster.Spec, unhealthyTimeout, nodeStartupTimeout time.Duration) []*clusterv1.MachineHealthCheck
MachineHealthCheckForWorkers creates MachineHealthCheck resources for the workers.
func MachineHealthCheckObjects ¶ added in v0.11.0
func MachineHealthCheckObjects(clusterSpec *cluster.Spec, unhealthyTimeout, nodeStartupTimeout time.Duration) []runtime.Object
MachineHealthCheckObjects creates MachineHealthCheck resources for control plane and all the worker node groups.
func NoProxyDefaults ¶ added in v0.9.2
func NoProxyDefaults() []string
func ObjectName ¶ added in v0.9.0
func RestartContainerdInKubeadmConfigTemplate ¶ added in v0.9.2
func RestartContainerdInKubeadmConfigTemplate(kct *bootstrapv1.KubeadmConfigTemplate, cluster *v1alpha1.Cluster)
RestartContainerdInKubeadmConfigTemplate adds the prekubeadm command to restart containerd daemon in kubeadmConfigTemplate if registry mirror or proxy config exists.
func RestartContainerdInKubeadmControlPlane ¶ added in v0.9.2
func RestartContainerdInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, cluster *v1alpha1.Cluster)
RestartContainerdInKubeadmControlPlane adds the prekubeadm command to restart containerd daemon in kubeadmControlPlane if registry mirror or proxy config exists.
func SetBottlerocketAdminContainerImageInEtcdCluster ¶ added in v0.14.0
func SetBottlerocketAdminContainerImageInEtcdCluster(etcd *etcdv1.EtcdadmCluster, adminImage v1alpha1.Image)
SetBottlerocketAdminContainerImageInEtcdCluster overrides the default bottlerocket admin container image metadata in etcdadmCluster.
func SetBottlerocketAdminContainerImageInKubeadmConfigTemplate ¶ added in v0.13.0
func SetBottlerocketAdminContainerImageInKubeadmConfigTemplate(kct *bootstrapv1.KubeadmConfigTemplate, versionsBundle *cluster.VersionsBundle)
SetBottlerocketAdminContainerImageInKubeadmConfigTemplate overrides the default bottlerocket admin container image metadata in kubeadmConfigTemplate.
func SetBottlerocketAdminContainerImageInKubeadmControlPlane ¶ added in v0.13.0
func SetBottlerocketAdminContainerImageInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, versionsBundle *cluster.VersionsBundle)
SetBottlerocketAdminContainerImageInKubeadmControlPlane overrides the default bottlerocket admin container image metadata in kubeadmControlPlane.
func SetBottlerocketControlContainerImageInEtcdCluster ¶ added in v0.14.0
func SetBottlerocketControlContainerImageInEtcdCluster(etcd *etcdv1.EtcdadmCluster, controlImage v1alpha1.Image)
SetBottlerocketControlContainerImageInEtcdCluster overrides the default bottlerocket control container image metadata in etcdadmCluster.
func SetBottlerocketControlContainerImageInKubeadmConfigTemplate ¶ added in v0.13.0
func SetBottlerocketControlContainerImageInKubeadmConfigTemplate(kct *bootstrapv1.KubeadmConfigTemplate, versionsBundle *cluster.VersionsBundle)
SetBottlerocketControlContainerImageInKubeadmConfigTemplate overrides the default bottlerocket control container image metadata in kubeadmConfigTemplate.
func SetBottlerocketControlContainerImageInKubeadmControlPlane ¶ added in v0.13.0
func SetBottlerocketControlContainerImageInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, versionsBundle *cluster.VersionsBundle)
SetBottlerocketControlContainerImageInKubeadmControlPlane overrides the default bottlerocket control container image metadata in kubeadmControlPlane.
func SetBottlerocketHostConfigInEtcdCluster ¶ added in v0.15.0
func SetBottlerocketHostConfigInEtcdCluster(etcd *etcdv1.EtcdadmCluster, hostOSConfig *anywherev1.HostOSConfiguration)
SetBottlerocketHostConfigInEtcdCluster sets bottlerocket specific kernel settings in etcdadmCluster.
func SetBottlerocketHostConfigInKubeadmConfigTemplate ¶ added in v0.15.0
func SetBottlerocketHostConfigInKubeadmConfigTemplate(kct *bootstrapv1.KubeadmConfigTemplate, hostOSConfig *anywherev1.HostOSConfiguration)
SetBottlerocketHostConfigInKubeadmConfigTemplate sets bottlerocket specific kernel settings in kubeadmConfigTemplate.
func SetBottlerocketHostConfigInKubeadmControlPlane ¶ added in v0.15.0
func SetBottlerocketHostConfigInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, hostOSConfig *anywherev1.HostOSConfiguration)
SetBottlerocketHostConfigInKubeadmControlPlane sets bottlerocket specific kernel settings in kubeadmControlPlane.
func SetBottlerocketInEtcdCluster ¶ added in v0.14.0
func SetBottlerocketInEtcdCluster(etcd *etcdv1.EtcdadmCluster, versionsBundle *cluster.VersionsBundle)
SetBottlerocketInEtcdCluster adds bottlerocket config in etcdadmCluster.
func SetBottlerocketInKubeadmConfigTemplate ¶ added in v0.13.0
func SetBottlerocketInKubeadmConfigTemplate(kct *bootstrapv1.KubeadmConfigTemplate, versionsBundle *cluster.VersionsBundle)
SetBottlerocketInKubeadmConfigTemplate adds bottlerocket bootstrap image metadata in kubeadmConfigTemplate.
func SetBottlerocketInKubeadmControlPlane ¶ added in v0.13.0
func SetBottlerocketInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, versionsBundle *cluster.VersionsBundle)
SetBottlerocketInKubeadmControlPlane adds bottlerocket bootstrap image metadata in kubeadmControlPlane.
func SetIdentityAuthInKubeadmControlPlane ¶ added in v0.9.0
func SetIdentityAuthInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, clusterSpec *cluster.Spec)
func SetKubeVipInKubeadmControlPlane ¶ added in v0.13.0
func SetKubeVipInKubeadmControlPlane(kcp *controlplanev1.KubeadmControlPlane, address, image string) error
SetKubeVipInKubeadmControlPlane appends kube-vip manifest to kubeadmControlPlane's kubeadmConfigSpec files.
func SetProxyConfigInKubeadmConfigTemplateForBottlerocket ¶ added in v0.13.0
func SetProxyConfigInKubeadmConfigTemplateForBottlerocket(kct *bootstrapv1.KubeadmConfigTemplate, cluster *v1alpha1.Cluster)
SetProxyConfigInKubeadmConfigTemplateForBottlerocket sets up proxy configuration in kubeadmConfigTemplate for bottlerocket.
func SetProxyConfigInKubeadmConfigTemplateForUbuntu ¶ added in v0.13.0
func SetProxyConfigInKubeadmConfigTemplateForUbuntu(kct *bootstrapv1.KubeadmConfigTemplate, cluster *v1alpha1.Cluster) error
SetProxyConfigInKubeadmConfigTemplateForUbuntu sets up proxy configuration in kubeadmConfigTemplate for ubuntu.
func SetProxyConfigInKubeadmControlPlaneForBottlerocket ¶ added in v0.13.0
func SetProxyConfigInKubeadmControlPlaneForBottlerocket(kcp *controlplanev1.KubeadmControlPlane, cluster *v1alpha1.Cluster)
SetProxyConfigInKubeadmControlPlaneForBottlerocket sets up proxy configuration in kubeadmControlPlane for bottlerocket.
func SetProxyConfigInKubeadmControlPlaneForUbuntu ¶ added in v0.13.0
func SetProxyConfigInKubeadmControlPlaneForUbuntu(kcp *controlplanev1.KubeadmControlPlane, cluster *v1alpha1.Cluster) error
SetProxyConfigInKubeadmControlPlaneForUbuntu sets up proxy configuration in kubeadmControlPlane for ubuntu.
func SetRegistryMirrorInKubeadmConfigTemplateForBottlerocket ¶ added in v0.13.0
func SetRegistryMirrorInKubeadmConfigTemplateForBottlerocket(kct *bootstrapv1.KubeadmConfigTemplate, mirrorConfig *v1alpha1.RegistryMirrorConfiguration)
SetRegistryMirrorInKubeadmConfigTemplateForBottlerocket sets up registry mirror configuration in kubeadmConfigTemplate for bottlerocket.
func SetRegistryMirrorInKubeadmConfigTemplateForUbuntu ¶ added in v0.13.0
func SetRegistryMirrorInKubeadmConfigTemplateForUbuntu(kct *bootstrapv1.KubeadmConfigTemplate, mirrorConfig *v1alpha1.RegistryMirrorConfiguration) error
SetRegistryMirrorInKubeadmConfigTemplateForUbuntu sets up registry mirror configuration in kubeadmConfigTemplate for ubuntu.
func SetRegistryMirrorInKubeadmControlPlaneForBottlerocket ¶ added in v0.13.0
func SetRegistryMirrorInKubeadmControlPlaneForBottlerocket(kcp *controlplanev1.KubeadmControlPlane, mirrorConfig *v1alpha1.RegistryMirrorConfiguration)
SetRegistryMirrorInKubeadmControlPlaneForBottlerocket sets up registry mirror configuration in kubeadmControlPlane for bottlerocket.
func SetRegistryMirrorInKubeadmControlPlaneForUbuntu ¶ added in v0.13.0
func SetRegistryMirrorInKubeadmControlPlaneForUbuntu(kcp *controlplanev1.KubeadmControlPlane, mirrorConfig *v1alpha1.RegistryMirrorConfiguration) error
SetRegistryMirrorInKubeadmControlPlaneForUbuntu sets up registry mirror configuration in kubeadmControlPlane for ubuntu.
func SetUbuntuConfigInEtcdCluster ¶ added in v0.14.0
func SetUbuntuConfigInEtcdCluster(etcd *etcdv1.EtcdadmCluster, version string)
SetUbuntuConfigInEtcdCluster sets up the etcd config in EtcdadmCluster.
func SetUnstackedEtcdConfigInKubeadmControlPlaneForBottlerocket ¶ added in v0.14.0
func SetUnstackedEtcdConfigInKubeadmControlPlaneForBottlerocket(kcp *controlplanev1.KubeadmControlPlane, externalEtcdConfig *v1alpha1.ExternalEtcdConfiguration)
SetUnstackedEtcdConfigInKubeadmControlPlaneForBottlerocket sets up unstacked etcd configuration in kubeadmControlPlane for bottlerocket.
func SetUnstackedEtcdConfigInKubeadmControlPlaneForUbuntu ¶ added in v0.14.0
func SetUnstackedEtcdConfigInKubeadmControlPlaneForUbuntu(kcp *controlplanev1.KubeadmControlPlane, externalEtcdConfig *v1alpha1.ExternalEtcdConfiguration)
SetUnstackedEtcdConfigInKubeadmControlPlaneForUbuntu sets up unstacked etcd configuration in kubeadmControlPlane for ubuntu.
func WorkerMachineHealthCheckName ¶ added in v0.11.0
func WorkerMachineHealthCheckName(clusterSpec *cluster.Spec, workerNodeGroupConfig v1alpha1.WorkerNodeGroupConfiguration) string
func WorkerMachineTemplateName ¶ added in v0.9.2
func WorkerMachineTemplateName(clusterSpec *cluster.Spec, workerNodeGroupConfig v1alpha1.WorkerNodeGroupConfiguration) string
Types ¶
type CAPIChangeDiff ¶ added in v0.6.0
type CAPIChangeDiff struct { CertManager *types.ComponentChangeDiff Core *types.ComponentChangeDiff ControlPlane *types.ComponentChangeDiff BootstrapProviders []types.ComponentChangeDiff InfrastructureProvider *types.ComponentChangeDiff }
type CAPIClient ¶ added in v0.6.0
type CAPIClient interface { Upgrade(ctx context.Context, managementCluster *types.Cluster, provider providers.Provider, newSpec *cluster.Spec, changeDiff *CAPIChangeDiff) error InstallEtcdadmProviders(ctx context.Context, clusterSpec *cluster.Spec, cluster *types.Cluster, provider providers.Provider, installProviders []string) error }
type ClusterResourceSet ¶
type ClusterResourceSet struct {
// contains filtered or unexported fields
}
func NewClusterResourceSet ¶
func NewClusterResourceSet(clusterName string) *ClusterResourceSet
func (ClusterResourceSet) AddResource ¶
func (c ClusterResourceSet) AddResource(name string, content []byte)
func (ClusterResourceSet) ToYaml ¶
func (c ClusterResourceSet) ToYaml() ([]byte, error)
type ControlPlane ¶ added in v0.12.0
type ControlPlane[C Object[C], M Object[M]] struct { Cluster *clusterv1.Cluster // ProviderCluster is the provider-specific resource that holds the details // for provisioning the infrastructure, referenced in Cluster.Spec.InfrastructureRef ProviderCluster C KubeadmControlPlane *controlplanev1.KubeadmControlPlane // ControlPlaneMachineTemplate is the provider-specific machine template referenced // in KubeadmControlPlane.Spec.MachineTemplate.InfrastructureRef ControlPlaneMachineTemplate M EtcdCluster *etcdv1.EtcdadmCluster // EtcdMachineTemplate is the provider-specific machine template referenced // in EtcdCluster.Spec.InfrastructureTemplate EtcdMachineTemplate M }
ControlPlane represents the provider-specific spec for a CAPI control plane using the kubeadm CP provider.
func (*ControlPlane[C, M]) Objects ¶ added in v0.12.0
func (cp *ControlPlane[C, M]) Objects() []kubernetes.Object
Objects returns all API objects that form a concrete provider-specific control plane.
func (*ControlPlane[C, M]) UpdateImmutableObjectNames ¶ added in v0.12.0
func (cp *ControlPlane[C, M]) UpdateImmutableObjectNames( ctx context.Context, client kubernetes.Client, machineTemplateRetriever ObjectRetriever[M], machineTemplateComparator ObjectComparator[M], ) error
UpdateImmutableObjectNames checks if any control plane immutable objects have changed by comparing the new definition with the current state of the cluster. If they had, it generates a new name for them by increasing a monotonic number at the end of the name This is applied to all provider machine templates.
type ExtraArgs ¶
func AwsIamAuthExtraArgs ¶ added in v0.6.0
func AwsIamAuthExtraArgs(awsiam *v1alpha1.AWSIamConfig) ExtraArgs
func CgroupDriverCgroupfsExtraArgs ¶ added in v0.13.0
func CgroupDriverCgroupfsExtraArgs() ExtraArgs
CgroupDriverExtraArgs args added for kube versions below 1.24.
func CgroupDriverSystemdExtraArgs ¶ added in v0.13.0
func CgroupDriverSystemdExtraArgs() ExtraArgs
CgroupDriverSystemdExtraArgs args added for kube versions 1.24 and above.
func ControlPlaneNodeLabelsExtraArgs ¶ added in v0.7.0
func ControlPlaneNodeLabelsExtraArgs(cpc v1alpha1.ControlPlaneConfiguration) ExtraArgs
func ControllerManagerArgs ¶ added in v0.9.2
func FeatureGatesExtraArgs ¶ added in v0.11.0
FeatureGatesExtraArgs takes a list of features with the value and returns it in the proper format Example FeatureGatesExtraArgs("ServiceLoadBalancerClass=true").
func NodeCIDRMaskExtraArgs ¶ added in v0.9.2
func NodeCIDRMaskExtraArgs(clusterNetwork *v1alpha1.ClusterNetwork) ExtraArgs
func OIDCToExtraArgs ¶
func OIDCToExtraArgs(oidc *v1alpha1.OIDCConfig) ExtraArgs
func PodIAMAuthExtraArgs ¶ added in v0.6.1
func PodIAMAuthExtraArgs(podIAMConfig *v1alpha1.PodIAMConfig) ExtraArgs
func ResolvConfExtraArgs ¶ added in v0.7.0
func ResolvConfExtraArgs(resolvConf *v1alpha1.ResolvConf) ExtraArgs
func SecureEtcdTlsCipherSuitesExtraArgs ¶ added in v0.7.0
func SecureEtcdTlsCipherSuitesExtraArgs() ExtraArgs
func SecureTlsCipherSuitesExtraArgs ¶ added in v0.7.0
func SecureTlsCipherSuitesExtraArgs() ExtraArgs
We don't need to add these once the Kubernetes components default to using the secure cipher suites.
func WorkerNodeLabelsExtraArgs ¶ added in v0.7.0
func WorkerNodeLabelsExtraArgs(wnc v1alpha1.WorkerNodeGroupConfiguration) ExtraArgs
func (ExtraArgs) AddIfNotEmpty ¶
func (ExtraArgs) ToPartialYaml ¶
func (e ExtraArgs) ToPartialYaml() templater.PartialYaml
type Installer ¶ added in v0.6.0
type Installer struct {
// contains filtered or unexported fields
}
func NewInstaller ¶ added in v0.6.0
func NewInstaller(capiClient CAPIClient, kubectlClient KubectlClient) *Installer
type KubeClient ¶ added in v0.9.2
type KubeClient interface {
Get(ctx context.Context, name, namespace string, obj kubernetes.Object) error
}
KubeClient is a kubernetes API client.
type KubeLister ¶ added in v0.11.0
type KubeLister interface {
List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
}
type KubectlClient ¶ added in v0.6.0
type Manager ¶ added in v0.6.0
func NewManager ¶ added in v0.6.0
func NewManager(capiClient CAPIClient, kubectlClient KubectlClient) *Manager
type Object ¶ added in v0.12.0
type Object[O kubernetes.Object] interface { kubernetes.Object DeepCopy() O }
Object represents a kubernetes API object.
type ObjectComparator ¶ added in v0.12.0
ObjectComparator returns true only if only both kubernetes Object's are identical Most of the time, this only requires comparing the Spec field, but that can variate from object to object.
type ObjectRetriever ¶ added in v0.12.0
type ObjectRetriever[O Object[O]] func(ctx context.Context, client kubernetes.Client, name, namespace string) (O, error)
ObjectRetriever gets a kubernetes API object using the provided client If the object doesn't exist, it returns a NotFound error.
type Upgrader ¶ added in v0.6.0
type Upgrader struct {
// contains filtered or unexported fields
}
func NewUpgrader ¶ added in v0.6.0
func NewUpgrader(capiClient CAPIClient, kubectlClient KubectlClient) *Upgrader
type WorkerGroup ¶ added in v0.12.0
type WorkerGroup[M Object[M]] struct { KubeadmConfigTemplate *kubeadmv1.KubeadmConfigTemplate MachineDeployment *clusterv1.MachineDeployment ProviderMachineTemplate M }
WorkerGroup represents the provider specific CAPI spec for an eks-a worker group.
func (*WorkerGroup[M]) DeepCopy ¶ added in v0.13.0
func (g *WorkerGroup[M]) DeepCopy() *WorkerGroup[M]
DeepCopy generates a new WorkerGroup copying the contexts of the receiver.
func (*WorkerGroup[M]) Objects ¶ added in v0.13.0
func (g *WorkerGroup[M]) Objects() []kubernetes.Object
Objects returns a list of API objects for a provider-specific of the worker group.
func (*WorkerGroup[M]) UpdateImmutableObjectNames ¶ added in v0.12.0
func (g *WorkerGroup[M]) UpdateImmutableObjectNames( ctx context.Context, client kubernetes.Client, machineTemplateRetriever ObjectRetriever[M], machineTemplateComparator ObjectComparator[M], ) error
UpdateImmutableObjectNames checks if any immutable objects have changed by comparing the new definition with the current state of the cluster. If they had, it generates a new name for them by increasing a monotonic number at the end of the name. This process is performed to the provider machine template and the kubeadmconfigtemplate. The kubeadmconfigtemplate is not immutable at the API level but we treat it as such for consistency.
type Workers ¶ added in v0.12.0
type Workers[M Object[M]] struct { Groups []WorkerGroup[M] }
Workers represents the provider specific CAPI spec for an eks-a cluster's workers.
func (*Workers[M]) UpdateImmutableObjectNames ¶ added in v0.12.0
func (w *Workers[M]) UpdateImmutableObjectNames( ctx context.Context, client kubernetes.Client, machineTemplateRetriever ObjectRetriever[M], machineTemplateComparator ObjectComparator[M], ) error
UpdateImmutableObjectNames checks if any immutable objects have changed by comparing the new definition with the current state of the cluster. If they had, it generates a new name for them by increasing a monotonic number at the end of the name.
func (*Workers[M]) WorkerObjects ¶ added in v0.13.0
func (w *Workers[M]) WorkerObjects() []kubernetes.Object
WorkerObjects returns a list of API objects for concrete provider-specific collection of worker groups.