k8s

package
v1.28.2-0...-a792dfb Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnwrapListItems

func UnwrapListItems(o *uo.UnstructuredObject, withListCallback bool, cb func(o *uo.UnstructuredObject) error) error

Types

type ApiWarning

type ApiWarning struct {
	Code  int
	Agent string
	Text  string
}

type DeleteOptions

type DeleteOptions struct {
	ForceDryRun         bool
	NoWait              bool
	IgnoreNotFoundError bool
}

type K8sCluster

type K8sCluster struct {
	DryRun bool

	ServerVersion *goversion.Version
	// contains filtered or unexported fields
}

func NewK8sCluster

func NewK8sCluster(context string, dryRun bool) (*K8sCluster, error)

func (*K8sCluster) Context

func (k *K8sCluster) Context() string

func (*K8sCluster) DeleteSingleObject

func (k *K8sCluster) DeleteSingleObject(ref k8s.ObjectRef, options DeleteOptions) ([]ApiWarning, error)

func (*K8sCluster) FixNamespace

func (k *K8sCluster) FixNamespace(o *uo.UnstructuredObject, def string)

func (*K8sCluster) FixNamespaceInRef

func (k *K8sCluster) FixNamespaceInRef(ref k8s.ObjectRef) k8s.ObjectRef

func (*K8sCluster) FixObjectForPatch

func (k *K8sCluster) FixObjectForPatch(o *uo.UnstructuredObject) *uo.UnstructuredObject

func (*K8sCluster) GetAllGroupVersions

func (k *K8sCluster) GetAllGroupVersions() ([]string, error)

func (*K8sCluster) GetApiResourceForGVK

func (k *K8sCluster) GetApiResourceForGVK(gvk schema.GroupVersionKind) *v1.APIResource

func (*K8sCluster) GetCRDForGVK

func (k *K8sCluster) GetCRDForGVK(gvk schema.GroupVersionKind) (*uo.UnstructuredObject, error)

func (*K8sCluster) GetFilteredGKs

func (k *K8sCluster) GetFilteredGKs(filters []string) []schema.GroupKind

func (*K8sCluster) GetGVKs

func (k *K8sCluster) GetGVKs(group *string, version *string, kind *string) []schema.GroupVersionKind

func (*K8sCluster) GetObjectsByRefs

func (k *K8sCluster) GetObjectsByRefs(refs []k8s.ObjectRef) ([]*uo.UnstructuredObject, map[k8s.ObjectRef][]ApiWarning, error)

func (*K8sCluster) GetSchemaForGVK

func (k *K8sCluster) GetSchemaForGVK(gvk schema.GroupVersionKind) (*uo.UnstructuredObject, error)

func (*K8sCluster) GetSingleObject

func (k *K8sCluster) GetSingleObject(ref k8s.ObjectRef) (*uo.UnstructuredObject, []ApiWarning, error)

func (*K8sCluster) IsNamespaced

func (k *K8sCluster) IsNamespaced(gvk schema.GroupVersionKind) bool

func (*K8sCluster) ListAllObjects

func (k *K8sCluster) ListAllObjects(verbs []string, namespace string, labels map[string]string, onlyMetadata bool) ([]*uo.UnstructuredObject, map[schema.GroupVersionKind][]ApiWarning, error)

func (*K8sCluster) ListObjects

func (k *K8sCluster) ListObjects(gvk schema.GroupVersionKind, namespace string, labels map[string]string) ([]*uo.UnstructuredObject, []ApiWarning, error)

func (*K8sCluster) ListObjectsMetadata

func (k *K8sCluster) ListObjectsMetadata(gvk schema.GroupVersionKind, namespace string, labels map[string]string) ([]*uo.UnstructuredObject, []ApiWarning, error)

func (*K8sCluster) PatchObject

func (*K8sCluster) ReadWrite

func (k *K8sCluster) ReadWrite() *K8sCluster

func (*K8sCluster) RediscoverResources

func (k *K8sCluster) RediscoverResources() error

func (*K8sCluster) UpdateObject

func (k *K8sCluster) UpdateObject(o *uo.UnstructuredObject, options UpdateOptions) (*uo.UnstructuredObject, []ApiWarning, error)

func (*K8sCluster) WithCoreV1

func (k *K8sCluster) WithCoreV1(cb func(client *corev1.CoreV1Client) error) error

type PatchOptions

type PatchOptions struct {
	ForceDryRun bool
	ForceApply  bool
}

type UpdateOptions

type UpdateOptions struct {
	ForceDryRun bool
}

Jump to

Keyboard shortcuts

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