kubectl

package
v0.0.0-...-f3f1ec7 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kubectl

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

Kubectl is a wrapper around kubectl command line.

func New

func New(config string, dryRun, useTess, verbose bool) Kubectl

New a kubectl wrapper

func (Kubectl) Cmd

func (k Kubectl) Cmd(ctx context.Context, params ...string) *exec.Cmd

Cmd constructs a new kubectl command.

func (Kubectl) FleetClientOrDie

func (k Kubectl) FleetClientOrDie() fleet.Interface

FleetClientOrDie returns a new fleet client to deal with fleet APIs.

func (Kubectl) Get

func (k Kubectl) Get(ctx context.Context, target string, withVersion bool) ([]Object, error)

Get retrieves the objects from api server.

func (Kubectl) KubeClientOrDie

func (k Kubectl) KubeClientOrDie() kubernetes.Interface

KubeClientOrDie returns a new kubernetes client to deal with kubernetes APIs.

func (Kubectl) Read

func (k Kubectl) Read(path string, recursive bool) ([]runtime.Object, error)

Read parses the specs stored in path which can be a file or directory. If recursive is set to true, it will read sub-directories, too.

func (Kubectl) Run

func (k Kubectl) Run(ctx context.Context, params ...string) error

Run runs the specific command.

type Object

type Object struct {
	Key       string
	Namespace string
	Name      string
	Deleting  bool
}

Jump to

Keyboard shortcuts

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