k8s

package
v0.0.0-...-f7aa2fe Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewK8s

func NewK8s(discoveryClient discovery.DiscoveryInterface, dynClientSet dynamic.Interface) *k8s

func ServerResourceForGroupVersionKind

func ServerResourceForGroupVersionKind(disco discovery.DiscoveryInterface, gvk schema.GroupVersionKind, verb string) (*metav1.APIResource, error)

func ToResourceInterface

func ToResourceInterface(dynamicIf dynamic.Interface, apiResource *metav1.APIResource, resource schema.GroupVersionResource, namespace string) dynamic.ResourceInterface

Types

type K8s

type K8s interface {
	CreateResource(ctx context.Context, obj *unstructured.Unstructured, namespace string) error
	PatchResource(ctx context.Context, currentObj *unstructured.Unstructured, namespace string) error
	DeleteResource(ctx context.Context, currentObj *unstructured.Unstructured, namespace string) error
	GenerateManifests(path string) ([]*unstructured.Unstructured, error)
	GetResourceWithLabel(label map[string]string) ([]*unstructured.Unstructured, error)
	DiffResources(old []*unstructured.Unstructured, new []*unstructured.Unstructured) (bool, error)
	SetLabelsForResources(resources []*unstructured.Unstructured, labels map[string]string) error
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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