kubernetes

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoEnvNames              = errors.New("dialect does not contain any env names")
	ErrEnvNoExist              = errors.New("env is not set")
	ErrSecretDoesNotHaveKey    = errors.New("secret does not have key")
	ErrConfigMapDoesNotHaveKey = errors.New("config map does not have key")
)
View Source
var ErrInvalidVersion = errors.New("invalid version")
View Source
var ErrNoPods = errors.New("no pods in namespace")
View Source
var ErrPodNotFound = errors.New("no pods with matching label")
View Source
var ErrVolumeNoExist = errors.New("volume does not exist")

Functions

func FilterPodList added in v1.8.0

func FilterPodList(pods []v1.Pod, query filter.Filter) []v1.Pod

func NewConfigLoader added in v1.4.3

func NewConfigLoader(kubeconfig, context string) clientcmd.ClientConfig

Types

type ConfigLookup added in v1.12.0

type ConfigLookup interface {
	GetValue(ctx context.Context, client KubeClient, pod corev1.Pod) (string, error)
}

type ConfigLookups added in v1.12.0

type ConfigLookups []ConfigLookup

func (ConfigLookups) Search added in v1.12.0

func (c ConfigLookups) Search(ctx context.Context, client KubeClient, pod corev1.Pod) (string, error)

type ExecOptions added in v1.7.0

type ExecOptions struct {
	Pod            v1.Pod
	Container      string
	Cmd            string
	Stdin          io.Reader
	Stdout, Stderr io.Writer
	TTY            bool
	SizeQueue      remotecommand.TerminalSizeQueue
	DisablePing    bool
}

type KubeClient

type KubeClient struct {
	ClientSet    kubernetes.Interface
	ClientConfig *rest.Config
	Discovery    *discovery.DiscoveryClient
	Context      string
	Namespace    string
}

func NewClient

func NewClient(kubeconfig, context, namespace string) (KubeClient, error)

func NewClientFromCmd

func NewClientFromCmd(cmd *cobra.Command) (KubeClient, error)

func (KubeClient) ConfigMaps added in v1.7.0

func (client KubeClient) ConfigMaps() v1.ConfigMapInterface

func (KubeClient) Exec

func (client KubeClient) Exec(ctx context.Context, opt ExecOptions) error

func (KubeClient) GetNamespacedPods

func (client KubeClient) GetNamespacedPods(ctx context.Context) (*v1.PodList, error)

func (KubeClient) GetPodsFiltered

func (client KubeClient) GetPodsFiltered(ctx context.Context, queries filter.Filter) ([]v1.Pod, error)

func (KubeClient) Jobs added in v1.7.0

func (client KubeClient) Jobs() batchv1.JobInterface

func (*KubeClient) MinServerVersion added in v1.6.7

func (client *KubeClient) MinServerVersion(wantMajor, wantMinor int) (bool, error)

func (KubeClient) Namespaces

func (client KubeClient) Namespaces() v1.NamespaceInterface

func (KubeClient) NetworkPolicies added in v1.12.0

func (client KubeClient) NetworkPolicies() networkingv1.NetworkPolicyInterface

func (KubeClient) Pods

func (client KubeClient) Pods() v1.PodInterface

func (KubeClient) Secrets

func (client KubeClient) Secrets() v1.SecretInterface

type LookupEnv added in v1.12.0

type LookupEnv []string

func (LookupEnv) GetValue added in v1.12.0

func (e LookupEnv) GetValue(ctx context.Context, client KubeClient, pod corev1.Pod) (string, error)

type LookupNop added in v1.12.0

type LookupNop struct{}

func (LookupNop) GetValue added in v1.12.0

func (l LookupNop) GetValue(_ context.Context, _ KubeClient, _ corev1.Pod) (string, error)

type LookupVolumeSecret added in v1.12.0

type LookupVolumeSecret struct {
	Name string
	Key  string
}

func (LookupVolumeSecret) GetValue added in v1.12.0

func (f LookupVolumeSecret) GetValue(ctx context.Context, client KubeClient, pod corev1.Pod) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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