Documentation ¶
Index ¶
- Variables
- func New(getApplication application.GetterFunc, name string) *application.Provisioner
- type ConfigGetter
- type ControllerRuntimeClient
- func (c *ControllerRuntimeClient) Client(ctx context.Context, namespace, name string, external bool) (client.Client, error)
- func (c *ControllerRuntimeClient) ClientConfig(ctx context.Context, namespace, name string, external bool) (*clientcmdapi.Config, error)
- func (c *ControllerRuntimeClient) GetSecret(ctx context.Context, namespace, name string) (*corev1.Secret, error)
- func (c *ControllerRuntimeClient) RESTConfig(ctx context.Context, namespace, name string, external bool) (*rest.Config, error)
- type Provisioner
- type RemoteCluster
- type VCluster
Constants ¶
This section is empty.
Variables ¶
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 ¶
func (g *RemoteCluster) Config(ctx context.Context) (*clientcmdapi.Config, error)
Config implements the remotecluster.Generator interface.
func (*RemoteCluster) ID ¶
func (g *RemoteCluster) ID() *cd.ResourceIdentifier
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.