resource

package
v0.0.0-...-d58d4f3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResourceSchemaAndNamespace

func GetResourceSchemaAndNamespace(manifest unstructured.Unstructured) (schema.GroupVersionResource, string, string)

Types

type Batch

type Batch struct {
	ResourceManager *Manager
}

func (*Batch) CreateResources

func (b *Batch) CreateResources(k8sClient dynamic.Interface, resources ...unstructured.Unstructured)

func (*Batch) DeleteResources

func (b *Batch) DeleteResources(k8sClient dynamic.Interface, resources ...unstructured.Unstructured)

func (*Batch) UpdateResources

func (b *Batch) UpdateResources(k8sClient dynamic.Interface, resources ...unstructured.Unstructured)

type Manager

type Manager struct {
	RetryOptions []retry.Option
}

Manager .

func (*Manager) CreateResource

func (m *Manager) CreateResource(client dynamic.Interface, resourceSchema schema.GroupVersionResource, namespace string, manifest unstructured.Unstructured)

CreateResource creates a given k8s resource

func (*Manager) DeleteResource

func (m *Manager) DeleteResource(client dynamic.Interface, resourceSchema schema.GroupVersionResource, namespace string, resourceName string)

DeleteResource deletes a given k8s resource

func (*Manager) GetResource

func (m *Manager) GetResource(client dynamic.Interface, resourceSchema schema.GroupVersionResource, namespace string, resourceName string) (*unstructured.Unstructured, error)

GetResource returns chosed k8s object

func (*Manager) GetStatus

func (m *Manager) GetStatus(client dynamic.Interface, resourceSchema schema.GroupVersionResource, namespace string, resourceName string) (map[string]interface{}, error)

GetStatus do a GetResource and extract status field

func (*Manager) UpdateResource

func (m *Manager) UpdateResource(client dynamic.Interface, resourceSchema schema.GroupVersionResource, namespace string, name string, updateTo unstructured.Unstructured)

UpdateResource updates a given k8s resource

Jump to

Keyboard shortcuts

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