provider

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package provider contains the interface required to support the Liqo install for a given provider.

Index

Constants

This section is empty.

Variables

View Source
var Providers = []string{"kubeadm", "kind", "k3s", "eks", "gke", "aks", "openshift"}

Providers list of providers supported by liqoctl.

Functions

This section is empty.

Types

type CommonArguments

type CommonArguments struct {
	Version              string
	Verbose              bool
	Timeout              time.Duration
	DumpValues           bool
	DumpValuesPath       string
	DryRun               bool
	CommonValues         map[string]interface{}
	Devel                bool
	DisableEndpointCheck bool
	ChartPath            string
	DownloadChart        bool
	ChartTmpDir          string
}

CommonArguments encapsulates all the arguments common across install providers.

func ValidateCommonArguments

func ValidateCommonArguments(providerName string, flags *flag.FlagSet, s *pterm.SpinnerPrinter) (*CommonArguments, error)

ValidateCommonArguments validates install common arguments. If the inputs are valid, it returns a *CommonArgument with all the parameters contents.

type GenericProvider

type GenericProvider struct {
	ReservedSubnets     []string
	ClusterLabels       map[string]string
	GenerateClusterName bool
	ClusterName         string
	LanDiscovery        *bool
}

GenericProvider includes the fields and the logic required by every install provider.

func (*GenericProvider) PostValidateGenericCommandArguments added in v0.3.2

func (p *GenericProvider) PostValidateGenericCommandArguments(oldClusterName string) (err error)

PostValidateGenericCommandArguments validates the flags required by every install provider after the specific provider validation.

func (*GenericProvider) PreValidateGenericCommandArguments added in v0.3.2

func (p *GenericProvider) PreValidateGenericCommandArguments(flags *flag.FlagSet) (err error)

PreValidateGenericCommandArguments validates the flags required by every install provider before the specific provider validation.

type InstallProviderInterface

type InstallProviderInterface interface {
	// PreValidateGenericCommandArguments validates the flags passed to a generic provider,
	// before the specific provider validation.
	PreValidateGenericCommandArguments(*flag.FlagSet) error
	// ValidateCommandArguments validates the flags passed as arguments to the install command
	ValidateCommandArguments(*flag.FlagSet) error
	// PostValidateGenericCommandArguments validates the flags passed to a generic provider,
	// after the specific provider validation.
	PostValidateGenericCommandArguments(oldClusterName string) error
	// ExtractChartParameters retrieves the install parameters required for a correct installation. This may require
	// instantiating extra clients to interact with cloud provider or the target cluster.
	ExtractChartParameters(context.Context, *rest.Config, *CommonArguments) error
	// UpdateChartValues patches the values map of a selected chart, modifying keys and entries to correctly install Liqo on a given
	// provider
	UpdateChartValues(values map[string]interface{})
}

InstallProviderInterface defines the methods required to support the Liqo install for a given provider.

Jump to

Keyboard shortcuts

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