Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigFilePath() (string, error)
- func GlobalFlags(globalFlags *flags.GlobalFlags) (*loftctlflags.GlobalFlags, error)
- func LatestCompatibleVersion(ctx context.Context) (string, error)
- func PrintManagerInfo(verb string, manager ManagerType, log log.Logger)
- func SaveManagerFile(managerConfig *ManagerConfig) error
- type Client
- type ManagerConfig
- type ManagerType
- type VirtualClusterInstanceProject
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")
View Source
var Self *managementv1.Self
Functions ¶
func ConfigFilePath ¶
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 ¶
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 ¶
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 }
Click to show internal directories.
Click to hide internal directories.