capi

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package capi contains capi util helpers specific to Theila.

Index

Constants

This section is empty.

Variables

View Source
var Scheme = runtime.NewScheme()

Scheme for CAPI kubernetes client.

Functions

This section is empty.

Types

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

Proxy custom implementation of clusterapi proxy that allows getting kubeconfig from memory.

func NewProxy

func NewProxy(config *rest.Config) *Proxy

NewProxy creates new proxy.

func (*Proxy) CheckClusterAvailable

func (k *Proxy) CheckClusterAvailable() error

CheckClusterAvailable implements proxy interface.

func (*Proxy) CurrentNamespace

func (k *Proxy) CurrentNamespace() (string, error)

CurrentNamespace implements cluster.Proxy interface.

func (*Proxy) GetConfig

func (k *Proxy) GetConfig() (*rest.Config, error)

GetConfig returns the config for a kubernetes client.

func (*Proxy) GetContexts

func (k *Proxy) GetContexts(string) ([]string, error)

GetContexts implements cluster.Proxy interface.

func (*Proxy) GetResourceNames

func (k *Proxy) GetResourceNames(groupVersion, kind string, options []client.ListOption, prefix string) ([]string, error)

GetResourceNames returns the list of resource names which begin with prefix.

func (*Proxy) ListResources

func (k *Proxy) ListResources(labels map[string]string, namespaces ...string) ([]unstructured.Unstructured, error)

ListResources implements cluster.Proxy interface.

func (*Proxy) NewClient

func (k *Proxy) NewClient() (client.Client, error)

NewClient implements cluster.Proxy interface.

func (*Proxy) ValidateKubernetesMaxVersion

func (k *Proxy) ValidateKubernetesMaxVersion() error

ValidateKubernetesMaxVersion implements cluster.Proxy interface.

func (*Proxy) ValidateKubernetesVersion

func (k *Proxy) ValidateKubernetesVersion() error

ValidateKubernetesVersion implements cluster.Proxy interface.

Jump to

Keyboard shortcuts

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