config

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AnnotationDistro = "vcluster.loft.sh/distro"
	AnnotationStore  = "vcluster.loft.sh/store"
)

Variables

This section is empty.

Functions

func CheckUsingHeuristic

func CheckUsingHeuristic(distro string) (bool, error)

CheckUsingHeuristic checks for known file path indicating the existence of a previous distro.

It checks for the existence of the default K3s token path.

func CheckUsingSecretAnnotation

func CheckUsingSecretAnnotation(ctx context.Context, client kubernetes.Interface, name, namespace, distro string, backingStoreType vclusterconfig.StoreType) (bool, error)

CheckUsingSecretAnnotation checks for backend store and distro changes using annotations on the vCluster's secret annotations. Returns true, if both annotations are set and the check was successful, otherwise false.

func EnsureBackingStoreChanges

func EnsureBackingStoreChanges(ctx context.Context, client kubernetes.Interface, name, namespace, distro string, backingStoreType vclusterconfig.StoreType) error

EnsureBackingStoreChanges ensures that only a certain set of allowed changes to the backing store and distro occur.

func InitAndValidateConfig

func InitAndValidateConfig(ctx context.Context, vConfig *config.VirtualClusterConfig) error

func InitClientConfig added in v0.28.0

func InitClientConfig() (*rest.Config, string, error)

func InitClients

func InitClients(vConfig *config.VirtualClusterConfig) error

func SetGlobalOwner

func SetGlobalOwner(ctx context.Context, vConfig *config.VirtualClusterConfig) error

SetGlobalOwner fetches the owning service and populates in translate.Owner if: the vcluster is configured to setOwner is, and if the currentNamespace == targetNamespace (because cross namespace owner refs don't work).

Types

This section is empty.

Jump to

Keyboard shortcuts

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