dependencies

package
v0.20.9 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterManagerTimeoutOptions added in v0.14.4

type ClusterManagerTimeoutOptions struct {
	NoTimeouts bool

	ControlPlaneWait, ExternalEtcdWait, MachineWait time.Duration
}

ClusterManagerTimeoutOptions maintains the timeout options for cluster manager.

type Dependencies

type Dependencies struct {
	Logger                      logr.Logger
	Provider                    providers.Provider
	ClusterAwsCli               *executables.Clusterawsadm
	DockerClient                *executables.Docker
	Kubectl                     *executables.Kubectl
	Govc                        *executables.Govc
	CloudStackValidatorRegistry cloudstack.ValidatorRegistry
	SnowAwsClientRegistry       *snow.AwsClientRegistry
	SnowConfigManager           *snow.ConfigManager
	Writer                      filewriter.FileWriter
	Kind                        *executables.Kind
	Clusterctl                  *executables.Clusterctl
	Flux                        *executables.Flux
	Troubleshoot                *executables.Troubleshoot
	Helm                        *executables.Helm
	UnAuthKubeClient            *kubernetes.UnAuthClient
	CNIInstaller                workload.CNIInstaller
	CiliumTemplater             *cilium.Templater
	AwsIamAuth                  *awsiamauth.Installer
	ClusterManager              *clustermanager.ClusterManager
	KubernetesRetrierClient     *clustermanager.KubernetesRetrierClient
	Bootstrapper                *bootstrapper.Bootstrapper
	GitOpsFlux                  *flux.Flux
	Git                         *gitfactory.GitTools
	EksdInstaller               *eksd.Installer
	EksdUpgrader                *eksd.Upgrader
	ClusterApplier              clustermanager.Applier
	AnalyzerFactory             diagnostics.AnalyzerFactory
	CollectorFactory            diagnostics.CollectorFactory
	DignosticCollectorFactory   diagnostics.DiagnosticBundleFactory
	CAPIManager                 *clusterapi.Manager
	FileReader                  *files.Reader
	ManifestReader              *manifests.Reader

	CliConfig               *cliconfig.CliConfig
	CreateCliConfig         *cliconfig.CreateClusterCLIConfig
	PackageManager          interfaces.PackageManager
	BundleRegistry          curatedpackages.BundleRegistry
	PackageControllerClient *curatedpackages.PackageControllerClient
	PackageClient           curatedpackages.PackageHandler
	VSphereValidator        *vsphere.Validator
	VSphereDefaulter        *vsphere.Defaulter
	NutanixClientCache      *nutanix.ClientCache
	NutanixDefaulter        *nutanix.Defaulter
	NutanixValidator        *nutanix.Validator
	SnowValidator           *snow.Validator
	IPValidator             *validator.IPValidator
	UnAuthKubectlClient     KubeClients
	HelmEnvClientFactory    *helm.EnvClientFactory
	ExecutableBuilder       *executables.ExecutablesBuilder
	CreateClusterDefaulter  cli.CreateClusterDefaulter
	UpgradeClusterDefaulter cli.UpgradeClusterDefaulter
	KubeconfigWriter        kubeconfig.Writer
	ClusterCreator          *clustermanager.ClusterCreator
	EksaInstaller           *clustermanager.EKSAInstaller
	DeleteClusterDefaulter  cli.DeleteClusterDefaulter
	ClusterDeleter          clustermanager.Deleter
	ClusterMover            *clustermanager.Mover
	// contains filtered or unexported fields
}

func (*Dependencies) Close added in v0.7.0

func (d *Dependencies) Close(ctx context.Context) error

type Factory

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

Factory helps initialization.

func ForSpec

func ForSpec(clusterSpec *cluster.Spec) *Factory

ForSpec constructs a Factory using the bundle referenced by clusterSpec.

func NewFactory

func NewFactory() *Factory

func (*Factory) Build

func (f *Factory) Build(ctx context.Context) (*Dependencies, error)

func (*Factory) GetProxyConfiguration added in v0.11.0

func (f *Factory) GetProxyConfiguration() map[string]string

func (*Factory) UseExecutableImage added in v0.9.0

func (f *Factory) UseExecutableImage(image string) *Factory

func (*Factory) UseExecutablesDockerClient added in v0.11.0

func (f *Factory) UseExecutablesDockerClient(client executables.DockerClient) *Factory

UseExecutablesDockerClient forces a specific DockerClient to build Executables as opposed to follow the normal building flow This is only for testing.

func (*Factory) UseProxyConfiguration added in v0.11.0

func (f *Factory) UseProxyConfiguration(proxyConfig map[string]string) *Factory

func (*Factory) WithAnalyzerFactory

func (f *Factory) WithAnalyzerFactory() *Factory

func (*Factory) WithAwsIamAuth

func (f *Factory) WithAwsIamAuth(clusterConfig *v1alpha1.Cluster) *Factory

WithAwsIamAuth builds dependencies for AWS IAM Auth.

func (*Factory) WithAwsSnow added in v0.9.0

func (f *Factory) WithAwsSnow() *Factory

func (*Factory) WithBootstrapper

func (f *Factory) WithBootstrapper() *Factory

func (*Factory) WithCAPIManager

func (f *Factory) WithCAPIManager() *Factory

func (*Factory) WithCiliumTemplater added in v0.12.0

func (f *Factory) WithCiliumTemplater() *Factory

func (*Factory) WithCliConfig added in v0.9.2

func (f *Factory) WithCliConfig(cliConfig *cliconfig.CliConfig) *Factory

WithCliConfig builds a cli config.

func (*Factory) WithCloudStackValidatorRegistry added in v0.13.0

func (f *Factory) WithCloudStackValidatorRegistry(skipIPCheck bool) *Factory

WithCloudStackValidatorRegistry initializes the CloudStack validator for the object being constructed to make it available in the constructor.

func (*Factory) WithClusterApplier added in v0.18.0

func (f *Factory) WithClusterApplier() *Factory

WithClusterApplier builds a cluster applier.

func (*Factory) WithClusterCreator added in v0.19.0

func (f *Factory) WithClusterCreator(clusterConfig *v1alpha1.Cluster) *Factory

WithClusterCreator adds the ClusterCreator dependency.

func (*Factory) WithClusterDeleter added in v0.19.0

func (f *Factory) WithClusterDeleter() *Factory

WithClusterDeleter builds a cluster deleter.

func (*Factory) WithClusterManager

func (f *Factory) WithClusterManager(clusterConfig *v1alpha1.Cluster, timeoutOpts *ClusterManagerTimeoutOptions) *Factory

WithClusterManager builds a cluster manager based on the cluster config and timeout options.

func (*Factory) WithClusterMover added in v0.20.0

func (f *Factory) WithClusterMover() *Factory

WithClusterMover builds a cluster mover.

func (*Factory) WithClusterctl

func (f *Factory) WithClusterctl() *Factory

func (*Factory) WithCollectorFactory

func (f *Factory) WithCollectorFactory() *Factory

func (*Factory) WithCreateClusterDefaulter added in v0.17.0

func (f *Factory) WithCreateClusterDefaulter(createCliConfig *cliconfig.CreateClusterCLIConfig) *Factory

WithCreateClusterDefaulter builds a create cluster defaulter that builds defaulter dependencies specific to the create cluster command. The defaulter is then run once the factory is built in the create cluster command.

func (*Factory) WithCuratedPackagesRegistry added in v0.9.2

func (f *Factory) WithCuratedPackagesRegistry(registryName, kubeVersion string, version version.Info) *Factory

func (*Factory) WithCustomBundles added in v0.15.3

func (f *Factory) WithCustomBundles(bundlesOverride string) *Factory

WithCustomBundles allows configuring a bundle override.

func (*Factory) WithDeleteClusterDefaulter added in v0.19.0

func (f *Factory) WithDeleteClusterDefaulter(deleteCliConfig *cliconfig.DeleteClusterCLIConfig) *Factory

WithDeleteClusterDefaulter builds a delete cluster defaulter that builds defaulter dependencies specific to the delete cluster command. The defaulter is then run once the factory is built in the delete cluster command.

func (*Factory) WithDiagnosticBundleFactory

func (f *Factory) WithDiagnosticBundleFactory() *Factory

func (*Factory) WithDiagnosticCollectorImage

func (f *Factory) WithDiagnosticCollectorImage(diagnosticCollectorImage string) *Factory

func (*Factory) WithDocker

func (f *Factory) WithDocker() *Factory

func (*Factory) WithDockerLogin added in v0.12.0

func (f *Factory) WithDockerLogin() *Factory

WithDockerLogin adds a docker login to the build steps.

func (*Factory) WithEKSAInstaller added in v0.19.0

func (f *Factory) WithEKSAInstaller() *Factory

WithEKSAInstaller builds a cluster manager based on the cluster config and timeout options.

func (*Factory) WithEksdInstaller added in v0.9.0

func (f *Factory) WithEksdInstaller() *Factory

func (*Factory) WithEksdUpgrader added in v0.9.0

func (f *Factory) WithEksdUpgrader() *Factory

func (*Factory) WithExecutableBuilder

func (f *Factory) WithExecutableBuilder() *Factory

func (*Factory) WithExecutableImage added in v0.7.0

func (f *Factory) WithExecutableImage() *Factory

WithExecutableImage sets the right cli tools image for the executable builder, reading from the Bundle and using the first VersionsBundle This is just the default for when there is not an specific kubernetes version available For commands that receive a cluster config file or a kubernetes version directly as input, use UseExecutableImage to specify the image directly.

func (*Factory) WithExecutableMountDirs added in v0.7.0

func (f *Factory) WithExecutableMountDirs(mountDirs ...string) *Factory

func (*Factory) WithFileReader added in v0.9.0

func (f *Factory) WithFileReader() *Factory

func (*Factory) WithFlux

func (f *Factory) WithFlux() *Factory

func (*Factory) WithGit added in v0.9.0

func (f *Factory) WithGit(clusterConfig *v1alpha1.Cluster, fluxConfig *v1alpha1.FluxConfig) *Factory

func (*Factory) WithGitOpsFlux added in v0.11.0

func (f *Factory) WithGitOpsFlux(clusterConfig *v1alpha1.Cluster, fluxConfig *v1alpha1.FluxConfig, cliConfig *cliconfig.CliConfig) *Factory

WithGitOpsFlux builds a gitops flux.

func (*Factory) WithGovc

func (f *Factory) WithGovc() *Factory

func (*Factory) WithHelm added in v0.7.0

func (f *Factory) WithHelm(opts ...helm.Opt) *Factory

WithHelm initializes a new Helm executable as a factory dependency.

func (*Factory) WithHelmEnvClientFactory added in v0.17.6

func (f *Factory) WithHelmEnvClientFactory(opts ...helm.Opt) *Factory

WithHelmEnvClientFactory configures the HelmEnvClientFactory dependency with a helm.EnvClientFactory.

func (*Factory) WithHelmExecutableBuilder added in v0.18.4

func (f *Factory) WithHelmExecutableBuilder() *Factory

WithHelmExecutableBuilder adds a build step to initializes the helm.ExecutableBuilder dependency.

func (*Factory) WithIPValidator added in v0.13.0

func (f *Factory) WithIPValidator() *Factory

WithIPValidator builds the IPValidator for the given cluster.

func (*Factory) WithKind

func (f *Factory) WithKind() *Factory

func (*Factory) WithKubeconfigWriter added in v0.19.0

func (f *Factory) WithKubeconfigWriter(clusterConfig *v1alpha1.Cluster) *Factory

WithKubeconfigWriter adds the KubeconfigReader dependency depending on the provider.

func (*Factory) WithKubectl

func (f *Factory) WithKubectl() *Factory

func (*Factory) WithKubernetesRetrierClient added in v0.19.0

func (f *Factory) WithKubernetesRetrierClient() *Factory

WithKubernetesRetrierClient builds a cluster manager based on the cluster config and timeout options.

func (*Factory) WithLocalExecutables added in v0.11.0

func (f *Factory) WithLocalExecutables() *Factory

func (*Factory) WithLogger added in v0.15.0

func (f *Factory) WithLogger() *Factory

WithLogger setups a logger to be injected in constructors. It uses the logger package level logger.

func (*Factory) WithManifestReader added in v0.9.0

func (f *Factory) WithManifestReader() *Factory

func (*Factory) WithNoTimeouts added in v0.15.2

func (f *Factory) WithNoTimeouts() *Factory

WithNoTimeouts injects no timeouts to all the dependencies with configurable timeout. Calling this method sets no timeout for the waits and retries in all the cluster operations, i.e. cluster manager, eksa installer, networking installer. Instead of passing the option to each dependency's constructor, use this method to pass no timeouts to new dependency.

func (*Factory) WithNutanixClientCache added in v0.15.0

func (f *Factory) WithNutanixClientCache() *Factory

WithNutanixClientCache adds a new NutanixClientCache to the factory.

func (*Factory) WithNutanixDefaulter added in v0.15.0

func (f *Factory) WithNutanixDefaulter() *Factory

WithNutanixDefaulter adds a new NutanixDefaulter to the factory.

func (*Factory) WithNutanixValidator added in v0.15.0

func (f *Factory) WithNutanixValidator() *Factory

WithNutanixValidator adds a new NutanixValidator to the factory.

func (*Factory) WithPackageClient added in v0.11.0

func (f *Factory) WithPackageClient() *Factory

func (*Factory) WithPackageControllerClient added in v0.11.0

func (f *Factory) WithPackageControllerClient(spec *cluster.Spec, kubeConfig string, opts ...curatedpackages.PackageControllerClientOpt) *Factory

WithPackageControllerClient builds a client for package controller.

func (*Factory) WithPackageManager added in v0.19.7

func (f *Factory) WithPackageManager(spec *cluster.Spec, packagesLocation, kubeConfig string) *Factory

WithPackageManager builds a package manager.

func (*Factory) WithPackageManagerWithoutWait added in v0.19.7

func (f *Factory) WithPackageManagerWithoutWait(spec *cluster.Spec, packagesLocation, kubeConfig string) *Factory

WithPackageManagerWithoutWait builds a package manager that doesn't wait for active bundles.

func (*Factory) WithProvider

func (f *Factory) WithProvider(clusterConfigFile string, clusterConfig *v1alpha1.Cluster, skipIPCheck bool, hardwareCSVPath string, force bool, tinkerbellBootstrapIP string, skippedValidations map[string]bool, opts *ProviderOptions) *Factory

WithProvider initializes the provider dependency and adds to the build steps.

func (*Factory) WithProxyConfiguration added in v0.9.0

func (f *Factory) WithProxyConfiguration() *Factory

func (*Factory) WithRegistryMirror added in v0.9.0

func (f *Factory) WithRegistryMirror(registryMirror *registrymirror.RegistryMirror) *Factory

WithRegistryMirror configures the factory to use registry mirror wherever applicable.

func (*Factory) WithSnowConfigManager added in v0.9.0

func (f *Factory) WithSnowConfigManager() *Factory

func (*Factory) WithTroubleshoot

func (f *Factory) WithTroubleshoot() *Factory

func (*Factory) WithUnAuthKubeClient added in v0.9.0

func (f *Factory) WithUnAuthKubeClient() *Factory

func (*Factory) WithUpgradeClusterDefaulter added in v0.17.0

func (f *Factory) WithUpgradeClusterDefaulter(upgradeCliConfig *cliconfig.UpgradeClusterCLIConfig) *Factory

WithUpgradeClusterDefaulter builds a create cluster defaulter that builds defaulter dependencies specific to the create cluster command. The defaulter is then run once the factory is built in the create cluster command.

func (*Factory) WithVSphereDefaulter added in v0.11.0

func (f *Factory) WithVSphereDefaulter() *Factory

func (*Factory) WithVSphereValidator added in v0.11.0

func (f *Factory) WithVSphereValidator() *Factory

func (*Factory) WithValidatorClients added in v0.16.0

func (f *Factory) WithValidatorClients() *Factory

WithValidatorClients builds KubeClients.

func (*Factory) WithWriter

func (f *Factory) WithWriter() *Factory

func (*Factory) WithWriterFolder

func (f *Factory) WithWriterFolder(folder string) *Factory

type KubeClients added in v0.16.0

type KubeClients struct {
	*executables.Kubectl
	*kubernetes.UnAuthClient
}

KubeClients defines super struct that exposes all behavior.

type ProviderOptions added in v0.18.0

type ProviderOptions struct {
	// Tinkerbell contains Tinkerbell specific options.
	Tinkerbell *TinkerbellOptions
}

ProviderOptions contains per provider options.

type TinkerbellOptions added in v0.18.0

type TinkerbellOptions struct {
	// BMCOptions contains options for configuring BMC interactions.
	BMCOptions *hardware.BMCOptions
}

TinkerbellOptions contains Tinkerbell specific options.

Jump to

Keyboard shortcuts

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