vcluster

package
v0.2.23 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConfigDataMissing = errors.New("config data not found")
)

Functions

func New

func New(getApplication application.GetterFunc, name string) *application.Provisioner

New returns a new initialized provisioner object.

Types

type ConfigGetter

type ConfigGetter interface {
	// GetSecret provides an implementation specific way to get a secret.
	GetSecret(ctx context.Context, namespace, name string) (*corev1.Secret, error)
}

ConfigGetter abstracts the fact that we call this code from a controller-runtime world, and a kubectl one, each having wildly different client models.

type ControllerRuntimeClient

type ControllerRuntimeClient struct{}

ControllerRuntimeClient provides vcluster services for controllers.

func NewControllerRuntimeClient

func NewControllerRuntimeClient() *ControllerRuntimeClient

NewControllerRuntimeClient returns vcluster abstraction with a controller runtime client.

func (*ControllerRuntimeClient) Client

func (c *ControllerRuntimeClient) Client(ctx context.Context, namespace, name string, external bool) (client.Client, error)

Client returns a controller runtime client able to access resources in the vcluster.

func (*ControllerRuntimeClient) ClientConfig

func (c *ControllerRuntimeClient) ClientConfig(ctx context.Context, namespace, name string, external bool) (*clientcmdapi.Config, error)

ClientConfig returns a raw client configuration.

func (*ControllerRuntimeClient) GetSecret

func (c *ControllerRuntimeClient) GetSecret(ctx context.Context, namespace, name string) (*corev1.Secret, error)

GetSecret provides an implementation specific way to get a secret.

func (*ControllerRuntimeClient) RESTConfig

func (c *ControllerRuntimeClient) RESTConfig(ctx context.Context, namespace, name string, external bool) (*rest.Config, error)

RESTConfig returns a REST client configuration.

type Provisioner added in v0.2.21

type Provisioner struct{}

func (*Provisioner) ReleaseName added in v0.2.21

func (*Provisioner) ReleaseName(ctx context.Context) string

type RemoteCluster

type RemoteCluster struct {
	// contains filtered or unexported fields
}

func NewRemoteCluster

func NewRemoteCluster(namespace, name string, labeller unikornv1core.ResourceLabeller) *RemoteCluster

NewRemoteCluster return a new instance of a remote cluster generator.

func (*RemoteCluster) Config

Config implements the remotecluster.Generator interface.

func (*RemoteCluster) ID

ID implements the remotecluster.Generator interface.

type VCluster

type VCluster interface {
	// ClientConfig returns a raw client configuration.
	ClientConfig(ctx context.Context, namespace, name string, external bool) (*clientcmdapi.Config, error)

	// RESTConfig returns a REST client configuration.
	RESTConfig(ctx context.Context, namespace, name string, external bool) (*rest.Config, error)
}

VCluster provides services around virtual clusters.

Jump to

Keyboard shortcuts

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