utils

package
v0.1.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectErrors

func CollectErrors(cerr <-chan error) error

CollectErrors reduce erros in cerr into a single go error using github.com/hashicorp/go-multierror.

func DefaultConfig

func DefaultConfig(context string) (*rest.Config, error)

DefaultConfig returns the kubernetes config and client from default configuration. The default context is used if context is empty.

Types

type CommonMetaOptions

type CommonMetaOptions struct {
	metav1.TypeMeta
	DryRun []string

	ResourceVersion string

	Force        *bool
	FieldManager string

	GracePeriodSeconds *int64
	Preconditions      *metav1.Preconditions
	PropagationPolicy  *metav1.DeletionPropagation
}

func (CommonMetaOptions) CreateOptions

func (cmo CommonMetaOptions) CreateOptions() metav1.CreateOptions

func (CommonMetaOptions) DeleteOptions

func (cmo CommonMetaOptions) DeleteOptions() metav1.DeleteOptions

func (CommonMetaOptions) GetOptions

func (cmo CommonMetaOptions) GetOptions() metav1.GetOptions

func (CommonMetaOptions) PatchOptions

func (cmo CommonMetaOptions) PatchOptions() metav1.PatchOptions

type K8sConfig

type K8sConfig struct {
	Client          kubernetes.Interface
	DynamicClient   dynamic.Interface
	ExtensionClient extension.Interface
	RESTMapper      *restmapper.DeferredDiscoveryRESTMapper
}

func NewFakeK8sConfig

func NewFakeK8sConfig() (*K8sConfig, *testing.Fake, *dfake.FakeDynamicClient)

func NewK8sConfig

func NewK8sConfig(config *rest.Config) (*K8sConfig, error)

Jump to

Keyboard shortcuts

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