Documentation ¶
Index ¶
- Variables
- func New(getApplication application.GetterFunc, name string) *application.Provisioner
- type Client
- func (c *Client) ClientConfig(ctx context.Context, namespace string, external bool) (*clientcmdapi.Config, error)
- func (c *Client) GetSecret(ctx context.Context, namespace, name string) (*corev1.Secret, error)
- func (c *Client) Kubeconfig(ctx context.Context, namespace string, external bool) (string, error)
- func (c *Client) RESTConfig(ctx context.Context, namespace string, external bool) (*rest.Config, error)
- type ConfigGetter
- type ControllerRuntimeClient
- func (c *ControllerRuntimeClient) Client(ctx context.Context, namespace string, external bool) (client.Client, error)
- func (c *ControllerRuntimeClient) ClientConfig(ctx context.Context, namespace string, external bool) (*clientcmdapi.Config, error)
- func (c *ControllerRuntimeClient) GetSecret(ctx context.Context, namespace, name string) (*corev1.Secret, error)
- func (c *ControllerRuntimeClient) Kubeconfig(ctx context.Context, namespace string, external bool) (string, error)
- func (c *ControllerRuntimeClient) RESTConfig(ctx context.Context, namespace string, external bool) (*rest.Config, error)
- 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 Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides vcluster services for standard client-go apps.
func NewClient ¶
func NewClient(client kubernetes.Interface) *Client
NewClient returns vcluster abstraction with a client-go client.
func (*Client) ClientConfig ¶
func (c *Client) ClientConfig(ctx context.Context, namespace string, external bool) (*clientcmdapi.Config, error)
ClientConfig returns a raw client configuration.
func (*Client) Kubeconfig ¶
Kubeconfig return the Kubernetes configuration file blob.
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 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 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) Kubeconfig ¶
func (c *ControllerRuntimeClient) Kubeconfig(ctx context.Context, namespace string, external bool) (string, error)
Kubeconfig return the Kubernetes configuration file blob.
func (*ControllerRuntimeClient) RESTConfig ¶
func (c *ControllerRuntimeClient) RESTConfig(ctx context.Context, namespace string, external bool) (*rest.Config, error)
RESTConfig returns a REST client configuration.
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 string, external bool) (*clientcmdapi.Config, error) // RESTConfig returns a REST client configuration. RESTConfig(ctx context.Context, namespace string, external bool) (*rest.Config, error) // Kubeconfig return the Kubernetes configuration file blob. Kubeconfig(ctx context.Context, namespace string, external bool) (string, error) }
VCluster provides services around virtual clusters.