kubectl

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: AGPL-3.0 Imports: 29 Imported by: 3 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func PaginatedList added in v1.1.0

func PaginatedList[T client.Object](ctx context.Context, kcli client.Client, list client.ObjectList, opts *client.ListOptions) (chan T, error)

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 {
	// Deprecated: use Slogger
	Logger logging.Logger

	Slogger *slog.Logger
}

Jump to

Keyboard shortcuts

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