client

package
v2.30.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 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 NewExternalWithProxy added in v2.28.0

func NewExternalWithProxy(seedClient ctrlruntimeclient.Client, proxy string) (*Provider, error)

NewExternalWithProxy provides the same client connection provider as NewExternal but with support to use a Proxy.

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