client

package
v2.25.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 11 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 cluster's network.

func (*Provider) GetAdminKubeconfig

func (p *Provider) GetAdminKubeconfig(ctx context.Context, 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(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 added in v2.21.0

func (p *Provider) GetK8sClient(ctx context.Context, c *kubermaticv1.Cluster, options ...ConfigOption) (kubernetes.Interface, error)

GetK8sClient returns a k8s go client.

Jump to

Keyboard shortcuts

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