client

package
v2.14.10+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 clusters network

func (*Provider) GetAdminKubeconfig

func (p *Provider) GetAdminKubeconfig(c *kubermaticv1.Cluster) ([]byte, error)

GetAdminKubeconfig returns the admin kubeconfig for the given cluster. For internal use by ourselves only.

func (*Provider) GetClient

func (p *Provider) GetClient(c *kubermaticv1.Cluster, options ...ConfigOption) (ctrlruntimeclient.Client, error)

GetClient returns a dynamic client

func (*Provider) GetClientConfig

func (p *Provider) GetClientConfig(c *kubermaticv1.Cluster, options ...ConfigOption) (*restclient.Config, error)

GetClientConfig returns the client config used for initiating a connection for the given cluster

Jump to

Keyboard shortcuts

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