k8s

package
v0.0.0-...-5a9cfe4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OnConflictLabel   string = "conflict-strategy"
	ReplaceOnConflict string = "Replace"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericClient

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

func NewGenericClient

func NewGenericClient(restMapper RESTMapper, dynamicClient dynamic.Interface, k8sClientSet kubernetes.Interface) *GenericClient

func (GenericClient) ApplyConfigMaps

func (c GenericClient) ApplyConfigMaps(configMaps []*corev1.ConfigMap, namespace string) error

func (GenericClient) ApplyResources

func (c GenericClient) ApplyResources(resources []K8sObject) ([]*unstructured.Unstructured, error)

func (GenericClient) ApplySecrets

func (c GenericClient) ApplySecrets(secrets []*corev1.Secret, namespace string) error

func (GenericClient) CreateResources

func (c GenericClient) CreateResources(resources []K8sObject) ([]*unstructured.Unstructured, error)

func (GenericClient) WaitForPodByLabel

func (c GenericClient) WaitForPodByLabel(namespace, labelSelector string, desiredPhase corev1.PodPhase, timeout, checkInterval time.Duration) error

type K8sObject

type K8sObject struct {
	Object runtime.Object
	GVK    *schema.GroupVersionKind
}

func ParseYamlToK8sObjects

func ParseYamlToK8sObjects(decoder runtime.Decoder, yamlContent string) ([]K8sObject, error)

type RESTMapper

type RESTMapper interface {
	RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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