Documentation ¶
Index ¶
- type ConfigOption
- type Provider
- func (p *Provider) GetAdminKubeconfig(ctx context.Context, c *kubermaticv1.Cluster) ([]byte, error)
- func (p *Provider) GetClient(ctx context.Context, c *kubermaticv1.Cluster, options ...ConfigOption) (ctrlruntimeclient.Client, error)
- func (p *Provider) GetClientConfig(ctx context.Context, c *kubermaticv1.Cluster, options ...ConfigOption) (*restclient.Config, error)
- func (p *Provider) GetK8sClient(ctx context.Context, c *kubermaticv1.Cluster, options ...ConfigOption) (kubernetes.Interface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigOption ¶
type ConfigOption func(*restclient.Config) *restclient.Config
ConfigOption defines a function that applies additional configuration to restclient.Config in a generic way.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewExternal ¶
func NewExternal(seedClient ctrlruntimeclient.Client) (*Provider, error)
NewExternal returns a new instance of the client connection provider that uses the external cluster address and hence works from everywhere. Use NewInternal if possible.
func NewInternal ¶
func NewInternal(seedClient ctrlruntimeclient.Client) (*Provider, error)
NewInternal returns a new instance of the client connection provider that only works from within the seed cluster but has the advantage that it doesn't leave the seed cluster's network.
func (*Provider) GetAdminKubeconfig ¶
GetAdminKubeconfig returns the admin kubeconfig for the given cluster. For internal use by ourselves only.
func (*Provider) GetClient ¶
func (p *Provider) GetClient(ctx context.Context, c *kubermaticv1.Cluster, options ...ConfigOption) (ctrlruntimeclient.Client, error)
GetClient returns a dynamic client.
func (*Provider) GetClientConfig ¶
func (p *Provider) GetClientConfig(ctx context.Context, c *kubermaticv1.Cluster, options ...ConfigOption) (*restclient.Config, error)
GetClientConfig returns the client config used for initiating a connection for the given cluster.
func (*Provider) GetK8sClient ¶
func (p *Provider) GetK8sClient(ctx context.Context, c *kubermaticv1.Cluster, options ...ConfigOption) (kubernetes.Interface, error)
GetK8sClient returns a k8s go client.