k8sdynamic

package
v0.0.0-...-e06b190 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ResourceSeparator = "---"
View Source
const ServiceKind = "Service"

Variables

This section is empty.

Functions

func GetDynamicK8sClient

func GetDynamicK8sClient() dynamic.Interface

func WatchInformer

func WatchInformer(name string, namespace string, resourceVersion string, gvr schema.GroupVersionResource, eventHandle cache.ResourceEventHandler, stopper chan struct{})

Types

type GroupVersionResource

type GroupVersionResource struct {
	Group    string `json:"group,omitempty"`
	Version  string `json:"version,omitempty"`
	Resource string `json:"resource,omitempty"`
}

func (GroupVersionResource) GetGvr

type K8sDynClient

type K8sDynClient struct {
	// contains filtered or unexported fields
}

func New

func New(genClient *kubernetes.Clientset) K8sDynClient

func (K8sDynClient) ApplyConcatenatedResources

func (k K8sDynClient) ApplyConcatenatedResources(resourcesStr string, namespace string) ([]ResourceDescriptor, error)

func (K8sDynClient) ApplyYamlResource

func (k K8sDynClient) ApplyYamlResource(resourceStr string, namespace string) (ResourceDescriptor, error)

func (*K8sDynClient) DeleteResources

func (k *K8sDynClient) DeleteResources(appliedResources []ResourceDescriptor) error

type ResourceDescriptor

type ResourceDescriptor struct {
	Name      string               `json:"name,omitempty"`
	Namespace string               `json:"namespace,omitempty"`
	Gvr       GroupVersionResource `json:"gvr,omitempty"`
}

Jump to

Keyboard shortcuts

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