k8sutil

package
v0.12.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrUpdate

func CreateOrUpdate(ctx context.Context, c client.Client, obj client.Object) error

func NewControllerRuntimeLogger added in v0.9.2

func NewControllerRuntimeLogger(level slog.Level) logr.Logger

func NewK8sClient

func NewK8sClient(options ClientOptions) (client.WithWatch, error)

func NewRestConfig

func NewRestConfig(options ClientOptions) (*rest.Config, error)

Types

type ClientOptions

type ClientOptions struct {
	Kubeconfig *string
	RestConfig *rest.Config
	Scheme     *runtime.Scheme

	QPS   float32
	Burst int
}

type RequeueOp

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

func DoNotRequeue

func DoNotRequeue() RequeueOp

func LoadResult

func LoadResult(result *reconcile.Result, err error) RequeueOp

func Requeue

func Requeue() RequeueOp

func RequeueAfter

func RequeueAfter(d time.Duration) RequeueOp

func RequeueErr

func RequeueErr(err error) RequeueOp

func (RequeueOp) Result

func (r RequeueOp) Result() (ctrl.Result, error)

func (RequeueOp) ResultPtr

func (r RequeueOp) ResultPtr() (result *ctrl.Result, err error)

func (RequeueOp) ShouldRequeue

func (r RequeueOp) ShouldRequeue() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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