kubernetes

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Namespace

func Namespace() (string, error)

Namespace from the kubeconfig

func NewCoreV1Client added in v0.6.0

func NewCoreV1Client() (*core.CoreV1Client, error)

NewCoreV1Client creates a new dynamic client

func NewDynamicClient

func NewDynamicClient() (dynamic.Interface, error)

NewDynamicClient creates a new dynamic client

func ObjectContains

func ObjectContains(genericObject interface{}, value string) bool

ObjectContains evaluates if a Kubernetes object contains a certain string

func RestConfig

func RestConfig() (*rest.Config, error)

RestConfig from the kubeconfig

func UnstructuredListContains added in v0.7.2

func UnstructuredListContains(unstructuredList *unstructured.UnstructuredList, value string) bool

Types

type Kubernetes

type Kubernetes interface {
	ResourceContains(ctx context.Context, namespace, value string, resource schema.GroupVersionResource) (bool, error)
}

Kubernetes defines the interface to interact with K8s

func New

func New() Kubernetes

New creates a new Kubernetes instance

Jump to

Keyboard shortcuts

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