kube

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MPL-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeConfiguration

func InitializeConfiguration(k *types.Kubeconfig) (*rest.Config, error)

func SplitYAML

func SplitYAML(yamlData []byte) ([]unstructured.Unstructured, error)

Types

type ApplyOpts

type ApplyOpts struct {
	DryRunStrategy cmdutil.DryRunStrategy
	Force          bool
	Validate       bool
}

type DeleteOpts

type DeleteOpts struct {
	Force           bool
	WaitForDeletion bool
	IgnoreNotFound  bool
	GracePeriod     int
}

type Kubectl

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

func NewKubectl

func NewKubectl(config *rest.Config) (*Kubectl, error)

NewKubectl returns a kubectl instance from a rest config

func (*Kubectl) ApplyResource

func (k *Kubectl) ApplyResource(ctx context.Context, obj *unstructured.Unstructured, applyOpts ApplyOpts) (string, error)

ApplyResource performs an apply of a unstructured resource

func (*Kubectl) DeleteResource

func (k *Kubectl) DeleteResource(ctx context.Context, obj *unstructured.Unstructured, deleteOpts DeleteOpts) (string, error)

func (*Kubectl) OpenAPISchema

func (k *Kubectl) OpenAPISchema() (openapi.Resources, error)

Jump to

Keyboard shortcuts

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