k8s

package
v0.0.0-...-4760111 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInprocessKubeProxyTransport

func NewInprocessKubeProxyTransport(handler http.Handler) http.RoundTripper

func NewKubeApiProxyTransport

func NewKubeApiProxyTransport(cfg *kube_rest.Config) (http.RoundTripper, error)

func NewKubeProxyHandler

func NewKubeProxyHandler(cfg *rest.Config) (http.Handler, error)

NewKubeProxyHandler creates a proxy server which is similar to `kubectl proxy` but, unlike it, is not exposed outside of the process.

func NewServiceProxyTransport

func NewServiceProxyTransport(kubeApiServer http.RoundTripper, namespace, name string) http.RoundTripper

Types

type Client

type Client interface {
	HasNamespace(name string) (bool, error)
}

func NewClient

func NewClient(cfg *kube_rest.Config) (Client, error)

type KubeConfig

type KubeConfig interface {
	GetFilename() string
	GetCurrentContext() string
	NewClient() (Client, error)
	NewServiceProxyTransport(namespace, service string) (http.RoundTripper, error)
}

func DetectKubeConfig

func DetectKubeConfig() (KubeConfig, error)

func GetKubeConfig

func GetKubeConfig(kubeconfig, context, namespace string) (KubeConfig, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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