Documentation ¶
Index ¶
- Constants
- func ApplyExtraObjects(ctx context.Context, clusterClient ClusterClient, cluster *types.Cluster, ...) error
- func BuildMapForWorkerNodeGroupsByName(workerNodeGroups []eksav1alpha1.WorkerNodeGroupConfiguration) map[string]eksav1alpha1.WorkerNodeGroupConfiguration
- func GetBundlesForCluster(ctx context.Context, cluster *v1alpha1.Cluster, fetch BundlesFetch) (*v1alpha1release.Bundles, error)
- func GetEksdReleaseForCluster(ctx context.Context, cluster *v1alpha1.Cluster, ...) (*eksdv1alpha1.Release, error)
- func GetFluxConfigForCluster(ctx context.Context, cluster *v1alpha1.Cluster, fetch FluxConfigFetch) (*v1alpha1.FluxConfig, error)
- func GetGitOpsForCluster(ctx context.Context, cluster *v1alpha1.Cluster, fetch GitOpsFetch) (*v1alpha1.GitOpsConfig, error)
- func GetOIDCForCluster(ctx context.Context, cluster *v1alpha1.Cluster, fetch OIDCFetch) (*v1alpha1.OIDCConfig, error)
- func GetVersionsBundle(clusterConfig *v1alpha1.Cluster, bundles *v1alpha1release.Bundles) (*v1alpha1release.VersionsBundle, error)
- func GetVersionsBundleForVersion(cliVersion version.Info, kubernetesVersion eksav1alpha1.KubernetesVersion) (*v1alpha1.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 SetSnowMachineConfigsAnnotations(c *Config) error
- func ValidateConfig(c *Config) error
- type APIObject
- type APIObjectGenerator
- type BundlesFetch
- type ClusterClient
- type Config
- func (c *Config) AWSIamConfig(name string) *anywherev1.AWSIamConfig
- func (c *Config) CloudStackMachineConfig(name string) *anywherev1.CloudStackMachineConfig
- func (c *Config) DeepCopy() *Config
- func (c *Config) OIDCConfig(name string) *anywherev1.OIDCConfig
- func (c *Config) SnowMachineConfig(name string) *anywherev1.SnowMachineConfig
- func (c *Config) VsphereMachineConfig(name string) *anywherev1.VSphereMachineConfig
- 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 Defaulter
- type EksdReleaseFetch
- type FluxConfigFetch
- type GitOpsFetch
- type KubeDistro
- type KubeObjects
- type Manifest
- type OIDCFetch
- type ObjectLookup
- type ParsedProcessor
- type Spec
- func BuildSpecForCluster(ctx context.Context, cluster *v1alpha1.Cluster, bundlesFetch BundlesFetch, ...) (*Spec, error)
- func BuildSpecFromBundles(cluster *eksav1alpha1.Cluster, bundlesManifest *v1alpha1.Bundles, ...) (*Spec, error)
- func NewSpec(opts ...SpecOpt) *Spec
- func NewSpecFromClusterConfig(clusterConfigPath string, cliVersion version.Info, opts ...SpecOpt) (*Spec, error)
- type SpecOpt
- func WithEksdRelease(release *eksdv1alpha1.Release) SpecOpt
- func WithEmbedFS(embedFS embed.FS) SpecOpt
- func WithFluxConfig(fluxConfig *eksav1alpha1.FluxConfig) SpecOpt
- func WithGitOpsConfig(gitOpsConfig *eksav1alpha1.GitOpsConfig) SpecOpt
- func WithManagementCluster(cluster *types.Cluster) SpecOpt
- func WithOIDCConfig(oidcConfig *eksav1alpha1.OIDCConfig) SpecOpt
- func WithOverrideBundlesManifest(fileURL string) SpecOpt
- func WithReleasesManifest(manifestURL string) SpecOpt
- func WithUserAgent(userAgent string) SpecOpt
- type Validation
- type VersionedRepository
- type VersionsBundle
Constants ¶
const ( FluxDefaultNamespace = "flux-system" FluxDefaultBranch = "main" )
Variables ¶
This section is empty.
Functions ¶
func ApplyExtraObjects ¶
func BuildMapForWorkerNodeGroupsByName ¶ added in v0.7.1
func BuildMapForWorkerNodeGroupsByName(workerNodeGroups []eksav1alpha1.WorkerNodeGroupConfiguration) map[string]eksav1alpha1.WorkerNodeGroupConfiguration
func GetBundlesForCluster ¶ added in v0.6.0
func GetBundlesForCluster(ctx context.Context, cluster *v1alpha1.Cluster, fetch BundlesFetch) (*v1alpha1release.Bundles, error)
func GetEksdReleaseForCluster ¶ added in v0.8.0
func GetEksdReleaseForCluster(ctx context.Context, cluster *v1alpha1.Cluster, bundles *v1alpha1release.Bundles, fetch EksdReleaseFetch) (*eksdv1alpha1.Release, error)
func GetFluxConfigForCluster ¶ added in v0.9.0
func GetFluxConfigForCluster(ctx context.Context, cluster *v1alpha1.Cluster, fetch FluxConfigFetch) (*v1alpha1.FluxConfig, error)
func GetGitOpsForCluster ¶ added in v0.6.1
func GetGitOpsForCluster(ctx context.Context, cluster *v1alpha1.Cluster, fetch GitOpsFetch) (*v1alpha1.GitOpsConfig, error)
func GetOIDCForCluster ¶ added in v0.8.0
func GetVersionsBundle ¶ added in v0.8.0
func GetVersionsBundle(clusterConfig *v1alpha1.Cluster, bundles *v1alpha1release.Bundles) (*v1alpha1release.VersionsBundle, error)
func GetVersionsBundleForVersion ¶ added in v0.8.0
func GetVersionsBundleForVersion(cliVersion version.Info, kubernetesVersion eksav1alpha1.KubernetesVersion) (*v1alpha1.VersionsBundle, error)
GetVersionsBundleForVersion returns the versionBundle for gitVersion and kubernetes version
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 SetSnowMachineConfigsAnnotations ¶ added in v0.9.0
func ValidateConfig ¶ added in v0.8.0
Types ¶
type APIObjectGenerator ¶ added in v0.8.0
type APIObjectGenerator func() APIObject
APIObjectGenerator returns an implementor of the APIObject interface
type BundlesFetch ¶ added in v0.6.0
type ClusterClient ¶
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 VSphereMachineConfigs map[string]*anywherev1.VSphereMachineConfig CloudStackMachineConfigs map[string]*anywherev1.CloudStackMachineConfig SnowMachineConfigs map[string]*anywherev1.SnowMachineConfig OIDCConfigs map[string]*anywherev1.OIDCConfig AWSIAMConfigs map[string]*anywherev1.AWSIamConfig GitOpsConfig *anywherev1.GitOpsConfig FluxConfig *anywherev1.FluxConfig }
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) CloudStackMachineConfig ¶ added in v0.9.0
func (c *Config) CloudStackMachineConfig(name string) *anywherev1.CloudStackMachineConfig
func (*Config) OIDCConfig ¶ added in v0.8.0
func (c *Config) OIDCConfig(name string) *anywherev1.OIDCConfig
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 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 (*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 EksdReleaseFetch ¶ added in v0.8.0
type FluxConfigFetch ¶ added in v0.9.0
type GitOpsFetch ¶ added in v0.6.1
type KubeDistro ¶
type KubeDistro struct { 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 }
type KubeObjects ¶
func BuildExtraObjects ¶
func BuildExtraObjects(clusterSpec *Spec) KubeObjects
func (KubeObjects) Names ¶
func (objs KubeObjects) Names() []string
func (KubeObjects) Values ¶
func (objs KubeObjects) Values() [][]byte
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 OIDCConfig *eksav1alpha1.OIDCConfig AWSIamConfig *eksav1alpha1.AWSIamConfig VersionsBundle *VersionsBundle Bundles *v1alpha1.Bundles ManagementCluster *types.Cluster TinkerbellTemplateConfigs map[string]*eksav1alpha1.TinkerbellTemplateConfig // contains filtered or unexported fields }
func BuildSpecForCluster ¶ added in v0.6.0
func BuildSpecForCluster(ctx context.Context, cluster *v1alpha1.Cluster, bundlesFetch BundlesFetch, eksdReleaseFetch EksdReleaseFetch, gitOpsFetch GitOpsFetch, fluxConfigFetch FluxConfigFetch, oidcFetch OIDCFetch) (*Spec, error)
func BuildSpecFromBundles ¶
func NewSpecFromClusterConfig ¶ added in v0.6.1
func (*Spec) GetBundles ¶ added in v0.6.0
func (*Spec) KubeDistroImages ¶ added in v0.6.0
type SpecOpt ¶
type SpecOpt func(*Spec)
func WithEksdRelease ¶ added in v0.8.0
func WithEksdRelease(release *eksdv1alpha1.Release) SpecOpt
func WithEmbedFS ¶
func WithFluxConfig ¶ added in v0.9.0
func WithFluxConfig(fluxConfig *eksav1alpha1.FluxConfig) SpecOpt
func WithGitOpsConfig ¶ added in v0.6.1
func WithGitOpsConfig(gitOpsConfig *eksav1alpha1.GitOpsConfig) SpecOpt
func WithManagementCluster ¶ added in v0.6.0
func WithOIDCConfig ¶ added in v0.8.0
func WithOIDCConfig(oidcConfig *eksav1alpha1.OIDCConfig) SpecOpt
func WithOverrideBundlesManifest ¶ added in v0.6.0
func WithReleasesManifest ¶
func WithUserAgent ¶ added in v0.6.1
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) Images ¶ added in v0.6.0
func (vb *VersionsBundle) Images() []v1alpha1.Image
func (*VersionsBundle) KubeDistroImages ¶ added in v0.7.0
func (vb *VersionsBundle) KubeDistroImages() []v1alpha1.Image
func (*VersionsBundle) Ovas ¶ added in v0.6.0
func (vb *VersionsBundle) Ovas() []v1alpha1.Archive