Documentation ¶
Index ¶
- func BuildMapForWorkerNodeGroupsByName(workerNodeGroups []eksav1alpha1.WorkerNodeGroupConfiguration) map[string]eksav1alpha1.WorkerNodeGroupConfiguration
- func BundlesForCluster(ctx context.Context, client Client, cluster *v1alpha1.Cluster) (*v1alpha1release.Bundles, error)
- func GetVersionsBundle(version v1alpha1.KubernetesVersion, bundles *v1alpha1release.Bundles) (*v1alpha1release.VersionsBundle, error)
- func LoadManagement(kubeconfig string) (*types.Cluster, error)
- func NodeGroupsToDelete(currentSpec, newSpec *Spec) []eksav1alpha1.WorkerNodeGroupConfiguration
- func SetConfigDefaults(c *Config) error
- func SetDefaultFluxConfigPath(c *Config) error
- func SetDefaultFluxGitHubConfigPath(c *Config) error
- func SetMachineHealthCheckTimeoutDefaults(cluster *anywherev1.Cluster, ...)
- func SetSnowDatacenterIndentityRefDefault(s *anywherev1.SnowDatacenterConfig)
- func SetSnowMachineConfigsAnnotations(c *Config) error
- func ValidateConfig(c *Config) error
- func ValidateSnowMachineRefExists(c *Config) error
- type APIObject
- type APIObjectGenerator
- type Client
- type Config
- func (c *Config) AWSIamConfig(name string) *anywherev1.AWSIamConfig
- func (c *Config) ChildObjects() []kubernetes.Object
- func (c *Config) CloudStackMachineConfig(name string) *anywherev1.CloudStackMachineConfig
- func (c *Config) DeepCopy() *Config
- func (c *Config) NutanixMachineConfig(name string) *anywherev1.NutanixMachineConfig
- func (c *Config) OIDCConfig(name string) *anywherev1.OIDCConfig
- func (c *Config) SnowIPPool(name string) *anywherev1.SnowIPPool
- func (c *Config) SnowMachineConfig(name string) *anywherev1.SnowMachineConfig
- func (c *Config) VsphereMachineConfig(name string) *anywherev1.VSphereMachineConfig
- type ConfigClientBuilder
- type ConfigClientProcessor
- type ConfigManager
- func (c *ConfigManager) Parse(yamlManifest []byte) (*Config, error)
- func (c *ConfigManager) Register(entries ...*ConfigManagerEntry) error
- func (c *ConfigManager) RegisterDefaulters(defaulters ...Defaulter)
- func (c *ConfigManager) RegisterMapping(kind string, generator APIObjectGenerator) error
- func (c *ConfigManager) RegisterProcessors(processors ...ParsedProcessor)
- func (c *ConfigManager) RegisterValidations(validations ...Validation)
- func (c *ConfigManager) SetDefaults(config *Config) error
- func (c *ConfigManager) Validate(config *Config) error
- type ConfigManagerEntry
- func (c *ConfigManagerEntry) Merge(entries ...*ConfigManagerEntry) error
- func (c *ConfigManagerEntry) RegisterDefaulters(defaulters ...Defaulter)
- func (c *ConfigManagerEntry) RegisterMapping(kind string, generator APIObjectGenerator) error
- func (c *ConfigManagerEntry) RegisterProcessors(processors ...ParsedProcessor)
- func (c *ConfigManagerEntry) RegisterValidations(validations ...Validation)
- type ControlPlaneIPCheckAnnotationDefaulter
- type Defaulter
- type EKSD
- type FileSpecBuilder
- type FileSpecBuilderOpt
- type KubeDistro
- type MachineHealthCheckDefaulter
- type ObjectLookup
- type ParsedProcessor
- type Spec
- type Validation
- type VersionedRepository
- type VersionsBundle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildMapForWorkerNodeGroupsByName ¶ added in v0.7.1
func BuildMapForWorkerNodeGroupsByName(workerNodeGroups []eksav1alpha1.WorkerNodeGroupConfiguration) map[string]eksav1alpha1.WorkerNodeGroupConfiguration
func BundlesForCluster ¶ added in v0.17.0
func BundlesForCluster(ctx context.Context, client Client, cluster *v1alpha1.Cluster) (*v1alpha1release.Bundles, error)
BundlesForCluster returns a bundles resource for the cluster.
func GetVersionsBundle ¶ added in v0.8.0
func GetVersionsBundle(version v1alpha1.KubernetesVersion, bundles *v1alpha1release.Bundles) (*v1alpha1release.VersionsBundle, error)
GetVersionsBundle gets the VersionsBundle that corresponds to KubernetesVersion.
func LoadManagement ¶ added in v0.6.0
func NodeGroupsToDelete ¶ added in v0.7.1
func NodeGroupsToDelete(currentSpec, newSpec *Spec) []eksav1alpha1.WorkerNodeGroupConfiguration
func SetConfigDefaults ¶ added in v0.8.0
func SetDefaultFluxConfigPath ¶ added in v0.9.0
func SetDefaultFluxGitHubConfigPath ¶ added in v0.8.0
func SetMachineHealthCheckTimeoutDefaults ¶ added in v0.17.0
func SetMachineHealthCheckTimeoutDefaults(cluster *anywherev1.Cluster, nodeStartupTimeout, unhealthyMachineTimeout time.Duration)
SetMachineHealthCheckTimeoutDefaults sests defaults for mhcs in the EKSA cluster object based on the input.
func SetSnowDatacenterIndentityRefDefault ¶ added in v0.12.0
func SetSnowDatacenterIndentityRefDefault(s *anywherev1.SnowDatacenterConfig)
SetSnowDatacenterIndentityRefDefault sets a default secret as the identity reference The secret will need to be created by the CLI flow as it's not provided by the user This only runs in CLI. snowDatacenterConfig.SetDefaults() will run in both CLI and webhook.
func SetSnowMachineConfigsAnnotations ¶ added in v0.9.0
func ValidateConfig ¶ added in v0.8.0
func ValidateSnowMachineRefExists ¶ added in v0.13.0
ValidateSnowMachineRefExists checks the cluster spec machine refs and makes sure the snowmachineconfig object exists for each ref with kind == snowmachineconfig.
Types ¶
type APIObjectGenerator ¶ added in v0.8.0
type APIObjectGenerator func() APIObject
APIObjectGenerator returns an implementor of the APIObject interface.
type Client ¶ added in v0.9.2
type Client interface {
Get(ctx context.Context, name, namespace string, obj kubernetes.Object) error
}
Client is a kubernetes API client.
type Config ¶ added in v0.8.0
type Config struct { Cluster *anywherev1.Cluster CloudStackDatacenter *anywherev1.CloudStackDatacenterConfig VSphereDatacenter *anywherev1.VSphereDatacenterConfig DockerDatacenter *anywherev1.DockerDatacenterConfig SnowDatacenter *anywherev1.SnowDatacenterConfig NutanixDatacenter *anywherev1.NutanixDatacenterConfig TinkerbellDatacenter *anywherev1.TinkerbellDatacenterConfig VSphereMachineConfigs map[string]*anywherev1.VSphereMachineConfig CloudStackMachineConfigs map[string]*anywherev1.CloudStackMachineConfig SnowMachineConfigs map[string]*anywherev1.SnowMachineConfig NutanixMachineConfigs map[string]*anywherev1.NutanixMachineConfig TinkerbellMachineConfigs map[string]*anywherev1.TinkerbellMachineConfig TinkerbellTemplateConfigs map[string]*anywherev1.TinkerbellTemplateConfig OIDCConfigs map[string]*anywherev1.OIDCConfig AWSIAMConfigs map[string]*anywherev1.AWSIamConfig GitOpsConfig *anywherev1.GitOpsConfig FluxConfig *anywherev1.FluxConfig SnowCredentialsSecret *v1.Secret SnowIPPools map[string]*anywherev1.SnowIPPool }
func ParseConfig ¶ added in v0.8.0
ParseConfig reads yaml manifest with at least one Cluster object and generates the corresponding Config using the default package config manager.
func ParseConfigFromFile ¶ added in v0.8.0
ParseConfig reads yaml file with at least one Cluster object and generates the corresponding Config using the default package config manager.
func (*Config) AWSIamConfig ¶ added in v0.8.0
func (c *Config) AWSIamConfig(name string) *anywherev1.AWSIamConfig
func (*Config) ChildObjects ¶ added in v0.9.2
func (c *Config) ChildObjects() []kubernetes.Object
ChildObjects returns all API objects in Config except the Cluster.
func (*Config) CloudStackMachineConfig ¶ added in v0.9.0
func (c *Config) CloudStackMachineConfig(name string) *anywherev1.CloudStackMachineConfig
func (*Config) NutanixMachineConfig ¶ added in v0.12.0
func (c *Config) NutanixMachineConfig(name string) *anywherev1.NutanixMachineConfig
func (*Config) OIDCConfig ¶ added in v0.8.0
func (c *Config) OIDCConfig(name string) *anywherev1.OIDCConfig
func (*Config) SnowIPPool ¶ added in v0.14.0
func (c *Config) SnowIPPool(name string) *anywherev1.SnowIPPool
SnowIPPool returns a SnowIPPool based on a name.
func (*Config) SnowMachineConfig ¶ added in v0.8.0
func (c *Config) SnowMachineConfig(name string) *anywherev1.SnowMachineConfig
func (*Config) VsphereMachineConfig ¶ added in v0.8.0
func (c *Config) VsphereMachineConfig(name string) *anywherev1.VSphereMachineConfig
type ConfigClientBuilder ¶ added in v0.9.2
type ConfigClientBuilder struct {
// contains filtered or unexported fields
}
ConfigClientBuilder allows to register processors to build a Config using a cluster client, retrieving the api objects from the API server.
func NewConfigClientBuilder ¶ added in v0.9.2
func NewConfigClientBuilder() *ConfigClientBuilder
NewConfigClientBuilder builds a new ConfigClientBuilder with no processors registered.
func NewDefaultConfigClientBuilder ¶ added in v0.9.2
func NewDefaultConfigClientBuilder() *ConfigClientBuilder
NewDefaultConfigClientBuilder returns a ConfigClientBuilder with the default processors to build a Config.
func (*ConfigClientBuilder) Build ¶ added in v0.9.2
func (b *ConfigClientBuilder) Build(ctx context.Context, client Client, cluster *anywherev1.Cluster) (*Config, error)
Build constructs a Config for a cluster using the registered processors.
func (*ConfigClientBuilder) Register ¶ added in v0.9.2
func (b *ConfigClientBuilder) Register(processors ...ConfigClientProcessor) *ConfigClientBuilder
Register stores processors to be used during Build.
type ConfigClientProcessor ¶ added in v0.9.2
ConfigClientProcessor updates a Config retrieving objects from the API server through a client.
type ConfigManager ¶ added in v0.8.0
type ConfigManager struct {
// contains filtered or unexported fields
}
ConfigManager allows to parse from yaml, set defaults and validate a Cluster struct It allows to dynamically register configuration for all those operations.
func NewConfigManager ¶ added in v0.8.0
func NewConfigManager() *ConfigManager
NewConfigManager builds a ConfigManager with empty configuration.
func NewDefaultConfigManager ¶ added in v0.9.2
func NewDefaultConfigManager() (*ConfigManager, error)
func (*ConfigManager) Parse ¶ added in v0.8.0
func (c *ConfigManager) Parse(yamlManifest []byte) (*Config, error)
Parse reads yaml manifest with at least one cluster object and generates the corresponding Config.
func (*ConfigManager) Register ¶ added in v0.8.0
func (c *ConfigManager) Register(entries ...*ConfigManagerEntry) error
Register records the configuration defined in a ConfigManagerEntry into the ConfigManager This is equivalent to the individual register methods.
func (*ConfigManager) RegisterDefaulters ¶ added in v0.8.0
func (c *ConfigManager) RegisterDefaulters(defaulters ...Defaulter)
RegisterDefaulters records defaults for a Config struct.
func (*ConfigManager) RegisterMapping ¶ added in v0.8.0
func (c *ConfigManager) RegisterMapping(kind string, generator APIObjectGenerator) error
RegisterMapping records the mapping between a kubernetes Kind and an API concrete type.
func (*ConfigManager) RegisterProcessors ¶ added in v0.8.0
func (c *ConfigManager) RegisterProcessors(processors ...ParsedProcessor)
RegisterProcessors records setters to fill the Config struct from the parsed API objects.
func (*ConfigManager) RegisterValidations ¶ added in v0.8.0
func (c *ConfigManager) RegisterValidations(validations ...Validation)
RegisterValidations records validations for a Config struct.
func (*ConfigManager) SetDefaults ¶ added in v0.8.0
func (c *ConfigManager) SetDefaults(config *Config) error
Parse set the registered defaults in a Config struct.
func (*ConfigManager) Validate ¶ added in v0.8.0
func (c *ConfigManager) Validate(config *Config) error
Validate performs the registered validations in a Config struct.
type ConfigManagerEntry ¶ added in v0.8.0
type ConfigManagerEntry struct { APIObjectMapping map[string]APIObjectGenerator Processors []ParsedProcessor Validations []Validation Defaulters []Defaulter }
ConfigManagerEntry allows to declare the necessary configuration to parse from yaml, set defaults and validate a Cluster struct for one or more types. It is semantically equivalent to use the individual register methods and its only purpose is convenience.
func NewConfigManagerEntry ¶ added in v0.8.0
func NewConfigManagerEntry() *ConfigManagerEntry
NewConfigManagerEntry builds a ConfigManagerEntry with empty configuration.
func (*ConfigManagerEntry) Merge ¶ added in v0.8.0
func (c *ConfigManagerEntry) Merge(entries ...*ConfigManagerEntry) error
Merge combines the configuration declared in multiple ConfigManagerEntry.
func (*ConfigManagerEntry) RegisterDefaulters ¶ added in v0.8.0
func (c *ConfigManagerEntry) RegisterDefaulters(defaulters ...Defaulter)
RegisterDefaulters records defaults for a Config struct.
func (*ConfigManagerEntry) RegisterMapping ¶ added in v0.8.0
func (c *ConfigManagerEntry) RegisterMapping(kind string, generator APIObjectGenerator) error
RegisterMapping records the mapping between a kubernetes Kind and an API concrete type.
func (*ConfigManagerEntry) RegisterProcessors ¶ added in v0.8.0
func (c *ConfigManagerEntry) RegisterProcessors(processors ...ParsedProcessor)
RegisterProcessors records setters to fill the Config struct from the parsed API objects.
func (*ConfigManagerEntry) RegisterValidations ¶ added in v0.8.0
func (c *ConfigManagerEntry) RegisterValidations(validations ...Validation)
RegisterValidations records validations for a Config struct.
type ControlPlaneIPCheckAnnotationDefaulter ¶ added in v0.17.0
type ControlPlaneIPCheckAnnotationDefaulter struct {
// contains filtered or unexported fields
}
ControlPlaneIPCheckAnnotationDefaulter is the defaulter created to set the skip ip value.
func NewControlPlaneIPCheckAnnotationDefaulter ¶ added in v0.17.0
func NewControlPlaneIPCheckAnnotationDefaulter(skipIPCheck bool) ControlPlaneIPCheckAnnotationDefaulter
NewControlPlaneIPCheckAnnotationDefaulter allows to create a new ControlPlaneIPCheckAnnotationDefaulter.
func (ControlPlaneIPCheckAnnotationDefaulter) ControlPlaneIPCheckDefault ¶ added in v0.17.0
func (d ControlPlaneIPCheckAnnotationDefaulter) ControlPlaneIPCheckDefault(ctx context.Context, spec *Spec) (*Spec, error)
ControlPlaneIPCheckDefault sets the annotation for control plane skip ip check if the flag is set to true.
type Defaulter ¶ added in v0.8.0
Defaulter sets defaults in a Config object.
func BundlesRefDefaulter ¶ added in v0.9.2
func BundlesRefDefaulter() Defaulter
type EKSD ¶ added in v0.15.0
type EKSD struct { // Channel is the minor Kubernetes version for the eks-d release (eg. "1.23", "1.24", etc.) Channel string // Number is the monotonically increasing number that distinguishes the different eks-d releases // for the same Kubernetes minor version (channel). Number int }
EKSD represents an eks-d release.
type FileSpecBuilder ¶ added in v0.15.0
type FileSpecBuilder struct {
// contains filtered or unexported fields
}
FileSpecBuilder allows to build Spec by reading from files.
func NewFileSpecBuilder ¶ added in v0.15.0
func NewFileSpecBuilder(reader manifests.FileReader, cliVersion version.Info, opts ...FileSpecBuilderOpt) FileSpecBuilder
NewFileSpecBuilder builds a new FileSpecBuilder. cliVersion is used to chose the right Bundles from the the Release manifest.
type FileSpecBuilderOpt ¶ added in v0.15.0
type FileSpecBuilderOpt func(*FileSpecBuilder)
FileSpecBuilderOpt allows to configure FileSpecBuilder.
func WithOverrideBundlesManifest ¶ added in v0.6.0
func WithOverrideBundlesManifest(url string) FileSpecBuilderOpt
WithOverrideBundlesManifest configures the URL to read the Bundles manifest. This overrides the Bundles declared in the Releases so reading the Releases manifest is skipped.
func WithReleasesManifest ¶
func WithReleasesManifest(url string) FileSpecBuilderOpt
WithReleasesManifest configures the URL to read the Releases manifest.
type KubeDistro ¶
type KubeDistro struct { EKSD EKSD Kubernetes VersionedRepository CoreDNS VersionedRepository Etcd VersionedRepository NodeDriverRegistrar v1alpha1.Image LivenessProbe v1alpha1.Image ExternalAttacher v1alpha1.Image ExternalProvisioner v1alpha1.Image Pause v1alpha1.Image EtcdImage v1alpha1.Image EtcdVersion string AwsIamAuthImage v1alpha1.Image KubeProxy v1alpha1.Image }
type MachineHealthCheckDefaulter ¶ added in v0.17.0
type MachineHealthCheckDefaulter struct { NodeStartupTimeout time.Duration UnhealthyMachineTimeout time.Duration }
MachineHealthCheckDefaulter is the defaulter created to configure the machine health check timeouts.
func NewMachineHealthCheckDefaulter ¶ added in v0.17.0
func NewMachineHealthCheckDefaulter(nodeStartupTimeout, unhealthyMachineTimeout time.Duration) MachineHealthCheckDefaulter
NewMachineHealthCheckDefaulter allows to create a new MachineHealthCheckDefaulter.
func (MachineHealthCheckDefaulter) MachineHealthCheckDefault ¶ added in v0.17.0
func (d MachineHealthCheckDefaulter) MachineHealthCheckDefault(ctx context.Context, spec *Spec) (*Spec, error)
MachineHealthCheckDefault sets the defaults for machine health check timeouts.
type ObjectLookup ¶ added in v0.8.0
func (ObjectLookup) GetFromRef ¶ added in v0.8.0
func (o ObjectLookup) GetFromRef(apiVersion string, ref anywherev1.Ref) APIObject
GetFromRef searches in a ObjectLookup for an APIObject referenced by a anywherev1.Ref.
type ParsedProcessor ¶ added in v0.8.0
type ParsedProcessor func(*Config, ObjectLookup)
ParsedProcessor fills the Config struct from the parsed API objects in ObjectLookup.
type Spec ¶
type Spec struct { *Config Bundles *v1alpha1.Bundles OIDCConfig *eksav1alpha1.OIDCConfig AWSIamConfig *eksav1alpha1.AWSIamConfig ManagementCluster *types.Cluster // TODO(g-gaston): cleanup, this doesn't belong here EKSARelease *v1alpha1.EKSARelease VersionsBundles map[eksav1alpha1.KubernetesVersion]*VersionsBundle }
func BuildSpec ¶ added in v0.9.2
BuildSpec constructs a cluster.Spec for an eks-a cluster by retrieving all necessary objects from the cluster using a kubernetes client.
func BuildSpecFromConfig ¶ added in v0.14.0
BuildSpecFromConfig constructs a cluster.Spec for an eks-a cluster config by retrieving all dependencies objects from the cluster using a kubernetes client.
func NewSpec ¶
func NewSpec(config *Config, bundles *v1alpha1.Bundles, eksdReleases []eksdv1alpha1.Release, eksaRelease *v1alpha1.EKSARelease) (*Spec, error)
NewSpec builds a new Spec.
func (*Spec) ControlPlaneVersionsBundle ¶ added in v0.17.0
func (s *Spec) ControlPlaneVersionsBundle() *VersionsBundle
ControlPlaneVersionsBundle returns a VersionsBundle for the top level kubernetes version.
func (*Spec) VersionsBundle ¶
func (s *Spec) VersionsBundle(version eksav1alpha1.KubernetesVersion) *VersionsBundle
VersionsBundle returns a VersionsBundle if one exists for the provided kubernetes version and nil otherwise.
func (*Spec) WorkerNodeGroupVersionsBundle ¶ added in v0.17.0
func (s *Spec) WorkerNodeGroupVersionsBundle(w eksav1alpha1.WorkerNodeGroupConfiguration) *VersionsBundle
WorkerNodeGroupVersionsBundle returns a VersionsBundle for the Worker Node's kubernetes version.
type Validation ¶ added in v0.8.0
Validation performs a validation over the Config object.
type VersionedRepository ¶
type VersionedRepository struct {
Repository, Tag string
}
type VersionsBundle ¶
type VersionsBundle struct { *v1alpha1.VersionsBundle KubeDistro *KubeDistro }
func (*VersionsBundle) Ovas ¶ added in v0.6.0
func (vb *VersionsBundle) Ovas() []v1alpha1.Archive
Source Files ¶
- apiobject.go
- awsiam.go
- build.go
- builder.go
- client_builder.go
- cloudstack.go
- cluster.go
- config.go
- config_manager.go
- default_manager.go
- defaults.go
- docker.go
- fetch.go
- flux.go
- gitops.go
- load.go
- manager_entry.go
- node_groups.go
- nutanix.go
- oidc.go
- parse.go
- snow.go
- spec.go
- tinkerbell.go
- validate.go
- vsphere.go