Documentation ¶
Index ¶
- type ConfigOption
- type Provider
- func (p *Provider) GetAdminKubeconfig(c *kubermaticv1.Cluster) ([]byte, error)
- func (p *Provider) GetClient(c *kubermaticv1.Cluster, options ...ConfigOption) (ctrlruntimeclient.Client, error)
- func (p *Provider) GetClientConfig(c *kubermaticv1.Cluster, options ...ConfigOption) (*restclient.Config, 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 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