kubernetes

package
v0.0.0-...-d37e48f Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourcePlural = "scannedimages"
)

Variables

This section is empty.

Functions

func Init

func Init() error

Types

type Client

type Client interface {
	GetSecret(namespace, secretName string) (*v1.Secret, error)
	GetResource(gvr schema.GroupVersionResource, namespace, name string) (*unstructured.Unstructured, error)
}

type KubernetesClient

type KubernetesClient struct {
	*k8s.Clientset
	RestConfig *rest.Config
	Dynamic    dynamic.Interface
}

func GetClient

func GetClient() *KubernetesClient

func (KubernetesClient) GetResource

func (c KubernetesClient) GetResource(gvr schema.GroupVersionResource, namespace, name string) (*unstructured.Unstructured, error)

func (KubernetesClient) GetSecret

func (c KubernetesClient) GetSecret(namespace, secretName string) (*v1.Secret, error)

Jump to

Keyboard shortcuts

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