platform

package
v0.20.0-beta.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultPlatformSecretName = "vcluster-platform-api-key"
View Source
const (
	VClusterProFolder = "pro"
)

Variables

View Source
var (
	MinimumVersionTag = "v3.3.0-alpha.26"
	MinimumVersion    = semver.MustParse(strings.TrimPrefix(MinimumVersionTag, "v"))
)
View Source
var ErrConfigNotFound = errors.New("couldn't find vCluster platform config")

Functions

func ConfigFilePath

func ConfigFilePath() (string, error)

ConfigFilePath returns the path to the loft config file

func GlobalFlags

func GlobalFlags(globalFlags *flags.GlobalFlags) (*loftctlflags.GlobalFlags, error)

GlobalFlags converts vcluster global flags to vcluster pro global flags

func LatestCompatibleVersion

func LatestCompatibleVersion(ctx context.Context) (string, error)

LatestCompatibleVersion returns the latest compatible version of vCluster.Pro

func PrintManagerInfo

func PrintManagerInfo(verb string, manager ManagerType, log log.Logger)

func SaveManagerFile

func SaveManagerFile(managerConfig *ManagerConfig) error

Types

type Client

type Client interface {
	loftclient.Client

	Self() *managementv1.Self
	ApplyPlatformSecret(ctx context.Context, kubeClient kubernetes.Interface, name, namespace, project string) error
	ListVClusters(ctx context.Context, virtualClusterName, projectName string) ([]VirtualClusterInstanceProject, error)
}

func CreatePlatformClient

func CreatePlatformClient() (Client, error)

type ManagerConfig

type ManagerConfig struct {
	// Manager is the current manager that is used, either helm or platform
	Manager ManagerType `json:"manager,omitempty"`
}

func LoadManagerFile

func LoadManagerFile() (*ManagerConfig, error)

type ManagerType

type ManagerType string
const (
	ManagerHelm     ManagerType = "helm"
	ManagerPlatform ManagerType = "platform"
)

func GetManager

func GetManager(manager string) (ManagerType, error)

type VirtualClusterInstanceProject

type VirtualClusterInstanceProject struct {
	VirtualCluster *managementv1.VirtualClusterInstance
	Project        *managementv1.Project
}

Jump to

Keyboard shortcuts

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