kubectl

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 28 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Deployments  batchable = "deployments"
	Statefulsets batchable = "statefulsets"
)

Variables

This section is empty.

Functions

func RestartWithKubectl

func RestartWithKubectl(kind batchable, namespace string, labels map[string]string) (int, error)

func Scale

func Scale(kind batchable, namespace string, labels map[string]string, count int) (int, error)

Types

type ControllerClient

type ControllerClient interface {
	client.Client
}

func NewClientWithScheme

func NewClientWithScheme(restCfg *rest.Config, scheme *runtime.Scheme) (ControllerClient, error)

type Restartable

type Restartable string
const (
	Deployment  Restartable = "deployment"
	StatefulSet Restartable = "statefulset"
)

func (Restartable) String

func (r Restartable) String() string

type YAMLClient

type YAMLClient interface {
	Apply(ctx context.Context, obj client.Object) ([]rApi.ResourceRef, error)
	ApplyYAML(ctx context.Context, yamls ...[]byte) ([]rApi.ResourceRef, error)
	DeleteResource(ctx context.Context, obj client.Object) error
	DeleteYAML(ctx context.Context, yamls ...[]byte) error
	RolloutRestart(ctx context.Context, kind Restartable, namespace string, labels map[string]string) error

	Client() *kubernetes.Clientset
}

func NewYAMLClient

func NewYAMLClient(config *rest.Config, opts YAMLClientOpts) (YAMLClient, error)

func NewYAMLClientOrDie

func NewYAMLClientOrDie(config *rest.Config, opts YAMLClientOpts) YAMLClient

type YAMLClientOpts

type YAMLClientOpts struct {
	Logger logging.Logger
}

Jump to

Keyboard shortcuts

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