cluster

package
v0.29.4-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CreatorPropertyConfigPath           = "configpath"
	CreatorPropertyWorkDir              = "workdir"
	CreatorPropertyFuryctlConf          = "furyctlconf"
	CreatorPropertyKfdManifest          = "kfdmanifest"
	CreatorPropertyDistroPath           = "distropath"
	CreatorPropertyBinPath              = "binpath"
	CreatorPropertyPhase                = "phase"
	CreatorPropertySkipVpn              = "skipvpn"
	CreatorPropertySkipNodesUpgrade     = "skipnodesupgrade"
	CreatorPropertyVpnAutoConnect       = "vpnautoconnect"
	CreatorPropertyDryRun               = "dryrun"
	CreatorPropertyForce                = "force"
	CreatorPropertyUpgrade              = "upgrade"
	CreatorPropertyExternalUpgradesPath = "externalupgradespath"
	CreatorPropertyUpgradeNode          = "upgradenode"
	CreatorPropertyPostApplyPhases      = "postapplyphases"
)
View Source
const (
	DeleterPropertyConfigPath     = "configpath"
	DeleterPropertyFuryctlConf    = "furyctlconf"
	DeleterPropertyPhase          = "phase"
	DeleterPropertyWorkDir        = "workdir"
	DeleterPropertyKfdManifest    = "kfdmanifest"
	DeleterPropertyDistroPath     = "distropath"
	DeleterPropertyBinPath        = "binpath"
	DeleterPropertySkipVpn        = "skipvpn"
	DeleterPropertyVpnAutoConnect = "vpnautoconnect"
	DeleterPropertyDryRun         = "dryrun"
)
View Source
const (
	KubeconfigPropertyOutdir      = "outdir"
	KubeconfigPropertyFuryctlConf = "furyctlconf"
	KubeconfigPropertyConfigPath  = "configpath"
	KubeconfigPropertyKfdManifest = "kfdmanifest"
	KubeconfigPropertyDistroPath  = "distropath"
)
View Source
const (
	OperationPhasePreFlight             = "preflight"
	OperationPhaseInfrastructure        = "infrastructure"
	OperationSubPhasePreInfrastructure  = "pre-infrastructure"
	OperationSubPhasePostInfrastructure = "post-infrastructure"
	OperationPhaseKubernetes            = "kubernetes"
	OperationSubPhasePreKubernetes      = "pre-kubernetes"
	OperationSubPhasePostKubernetes     = "post-kubernetes"
	OperationPhaseDistribution          = "distribution"
	OperationSubPhasePreDistribution    = "pre-distribution"
	OperationSubPhasePostDistribution   = "post-distribution"
	OperationPhasePlugins               = "plugins"
	OperationPhasePreUpgrade            = "pre-upgrade"
	OperationPhaseAll                   = ""

	OperationPhaseOptionVPNAutoConnect = "vpnautoconnect"
)
View Source
const (
	ForceFeatureAll              string = "all"
	ForceFeatureMigrations       string = "migrations"
	ForceFeatureUpgrades         string = "upgrades"
	ForceFeaturePodsRunningCheck string = "pods-running-check"
)

Variables

View Source
var (
	ErrUnsupportedPhase = errors.New(
		"unsupported phase, options are: infrastructure, kubernetes, distribution, plugins",
	)
	ErrUnsupportedOperationPhase = errors.New(
		"unsupported operation phase, options are: pre-infrastructure, infrastructure, post-infrastructure, " +
			"pre-kubernetes, kubernetes, post-kubernetes, pre-distribution, distribution, post-distribution, plugins",
	)
	ErrChangesToOtherPhases = errors.New("changes to other phases detected")
)

Functions

func AskConfirmation added in v0.27.3

func AskConfirmation(force bool) (bool, error)

func AssertPhaseDiffs added in v0.28.0

func AssertPhaseDiffs(d r3diff.Changelog, currentPhase string, supportedPhases []string) error

func CheckPhase added in v0.25.0

func CheckPhase(phase string) error

func GetPhase added in v0.27.0

func GetPhase(phase string) string

func GetPhasesOrder added in v0.27.0

func GetPhasesOrder() []string

func IsForceEnabledForFeature added in v0.27.3

func IsForceEnabledForFeature(force []string, feature string) bool

func RegisterCreatorFactory added in v0.25.0

func RegisterCreatorFactory(apiVersion, kind string, factory CreatorFactory)

func RegisterDeleterFactory added in v0.25.0

func RegisterDeleterFactory(apiVersion, kind string, factory DeleterFactory)

func RegisterKubeconfigFactory added in v0.29.1

func RegisterKubeconfigFactory(apiVersion, kind string, factory KubeconfigFactory)

func ValidateMainPhases added in v0.29.4

func ValidateMainPhases(phase string) error

func ValidateOperationPhase added in v0.27.0

func ValidateOperationPhase(phase string) error

Types

type Creator added in v0.25.0

type Creator interface {
	SetProperties(props []CreatorProperty)
	SetProperty(name string, value any)
	Create(startFrom string, timeout, podRunningTimeout int) error
	GetPhasePath(phase string) (string, error)
}

func NewCreator added in v0.25.0

func NewCreator(
	minimalConf config.Furyctl,
	kfdManifest config.KFD,
	paths CreatorPaths,
	phase string,
	skipVpn,
	vpnAutoConnect,
	skipNodesUpgrade,
	dryRun bool,
	force []string,
	upgrade bool,
	externalUpgradesPath,
	upgradeNode string,
	postApplyPhases []string,
) (Creator, error)

type CreatorFactory added in v0.25.0

type CreatorFactory func(configPath string, props []CreatorProperty) (Creator, error)

func NewCreatorFactory added in v0.25.0

func NewCreatorFactory[T Creator, S any](cc T) CreatorFactory

type CreatorPaths added in v0.25.0

type CreatorPaths struct {
	ConfigPath string
	WorkDir    string
	DistroPath string
	BinPath    string
}

type CreatorProperty added in v0.25.0

type CreatorProperty struct {
	Name  string
	Value any
}

type Deleter added in v0.25.0

type Deleter interface {
	SetProperties(props []DeleterProperty)
	SetProperty(name string, value any)
	Delete() error
}

func NewDeleter added in v0.25.0

func NewDeleter(
	minimalConf config.Furyctl,
	kfdManifest config.KFD,
	paths DeleterPaths,
	phase string,
	skipVpn,
	vpnAutoConnect,
	dryRun bool,
) (Deleter, error)

type DeleterFactory added in v0.25.0

type DeleterFactory func(configPath string, props []DeleterProperty) (Deleter, error)

func NewDeleterFactory added in v0.25.0

func NewDeleterFactory[T Deleter, S any](dd T) DeleterFactory

type DeleterPaths added in v0.25.0

type DeleterPaths struct {
	DistroPath string
	ConfigPath string
	WorkDir    string
	BinPath    string
}

type DeleterProperty added in v0.25.0

type DeleterProperty struct {
	Name  string
	Value any
}

type KubeconfigFactory added in v0.29.1

type KubeconfigFactory func(configPath string, props []KubeconfigProperty) (KubeconfigGetter, error)

func NewKubeconfigFactory added in v0.29.1

func NewKubeconfigFactory[T KubeconfigGetter, S any](cc T) KubeconfigFactory

type KubeconfigGetter added in v0.29.1

type KubeconfigGetter interface {
	SetProperties(props []KubeconfigProperty)
	SetProperty(name string, value any)
	Get() error
}

func NewKubeconfigGetter added in v0.29.1

func NewKubeconfigGetter(
	minimalConf config.Furyctl,
	kfdManifest config.KFD,
	distroPath string,
	configPath string,
	outDir string,
) (KubeconfigGetter, error)

type KubeconfigProperty added in v0.29.1

type KubeconfigProperty struct {
	Name  string
	Value any
}

type OperationPhase added in v0.25.0

type OperationPhase struct {
	Path                 string
	TerraformPath        string
	KustomizePath        string
	KubectlPath          string
	YqPath               string
	HelmPath             string
	HelmfilePath         string
	TerraformPlanPath    string
	TerraformLogsPath    string
	TerraformOutputsPath string
	TerraformSecretsPath string
	// contains filtered or unexported fields
}

func NewOperationPhase added in v0.25.0

func NewOperationPhase(folder string, kfdTools config.KFDTools, binPath string) *OperationPhase

func (*OperationPhase) CopyFromTemplate added in v0.25.0

func (*OperationPhase) CopyFromTemplate(
	cfg template.Config,
	prefix,
	sourcePath,
	targetPath,
	furyctlConfPath string,
) error

func (*OperationPhase) CopyPathsToConfig added in v0.27.0

func (op *OperationPhase) CopyPathsToConfig(cfg *template.Config)

func (*OperationPhase) CreateFuryctlMerger added in v0.27.0

func (*OperationPhase) CreateFuryctlMerger(
	distroPath string,
	furyctlConfPath string,
	apiVersion string,
	kind string,
) (*merge.Merger, error)

func (*OperationPhase) CreateRootFolder added in v0.27.0

func (op *OperationPhase) CreateRootFolder() error

func (*OperationPhase) CreateTerraformFolderStructure added in v0.27.0

func (op *OperationPhase) CreateTerraformFolderStructure() error

func (*OperationPhase) Self added in v0.27.0

func (op *OperationPhase) Self() *OperationPhase

type OperationPhaseOption added in v0.25.0

type OperationPhaseOption struct {
	Name  string
	Value any
}

Jump to

Keyboard shortcuts

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