runtime

package
v0.0.0-...-43879ce Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Scheme associates standard Kubernetes API objects and PGO API objects with Go structs.

Functions

func ErrorWithBackoff

func ErrorWithBackoff(err error) (reconcile.Result, error)

ErrorWithBackoff returns a Result and error that indicate a non-nil err should be logged and measured and its reconcile.Request should be retried later. When err is nil, nothing is logged and the Request is not retried. When err unwraps to reconcile.TerminalError, the Request is not retried.

func ErrorWithoutBackoff

func ErrorWithoutBackoff(err error) (reconcile.Result, error)

ErrorWithoutBackoff returns a Result and error that indicate a non-nil err should be logged and measured without retrying its reconcile.Request. When err is nil, nothing is logged and the Request is not retried.

func FromUnstructuredList

func FromUnstructuredList[

	T any, PT interface {
		client.ObjectList
		*T
	},
](list *unstructured.UnstructuredList) (*T, error)

FromUnstructuredList returns a copy of list by marshaling through JSON.

func FromUnstructuredObject

func FromUnstructuredObject[

	T any, PT interface {
		client.Object
		*T
	},
](object *unstructured.Unstructured) (*T, error)

FromUnstructuredObject returns a copy of object by marshaling through JSON.

func GetConfig

func GetConfig() (*rest.Config, error)

GetConfig returns a Kubernetes client configuration from KUBECONFIG or the service account Kubernetes gives to pods.

func NewManager

func NewManager(config *rest.Config, options manager.Options) (manager.Manager, error)

NewManager returns a Manager that interacts with the Kubernetes API of config. When config is nil, it reads from KUBECONFIG or the local service account. When options.Scheme is nil, it uses the Scheme from this package.

func NewPodExecutor

func NewPodExecutor(config *rest.Config) (podExecutor, error)

func NewTicker

NewTicker returns a Source that emits e every d.

func NewTickerImmediate

func NewTickerImmediate(d time.Duration, e event.GenericEvent,
	h handler.EventHandler) source.Source

NewTickerImmediate returns a Source that emits e at start and every d.

func RequeueWithBackoff

func RequeueWithBackoff() reconcile.Result

RequeueWithBackoff returns a Result that indicates a reconcile.Request should be retried later.

func RequeueWithoutBackoff

func RequeueWithoutBackoff(delay time.Duration) reconcile.Result

RequeueWithoutBackoff returns a Result that indicates a reconcile.Request should be retried on or before delay.

func SetLogger

func SetLogger(logger logging.Logger)

SetLogger assigns the default Logger used by sigs.k8s.io/controller-runtime.

func SignalHandler

func SignalHandler() context.Context

SignalHandler returns a Context that is canceled on SIGINT or SIGTERM.

func ToUnstructuredList

func ToUnstructuredList(list client.ObjectList) (*unstructured.UnstructuredList, error)

ToUnstructuredList returns a copy of list by marshaling through JSON.

func ToUnstructuredObject

func ToUnstructuredObject(object client.Object) (*unstructured.Unstructured, error)

ToUnstructuredObject returns a copy of object by marshaling through JSON.

Types

type CacheConfig

type CacheConfig = cache.Config

type ClientCreate

type ClientCreate func(context.Context, client.Object, ...client.CreateOption) error

Types that implement single methods of the client.Writer interface.

func (ClientCreate) Create

func (fn ClientCreate) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error

type ClientDelete

type ClientDelete func(context.Context, client.Object, ...client.DeleteOption) error

Types that implement single methods of the client.Writer interface.

func (ClientDelete) Delete

func (fn ClientDelete) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error

type ClientDeleteAll

type ClientDeleteAll func(context.Context, client.Object, ...client.DeleteAllOfOption) error

Types that implement single methods of the client.Writer interface.

func (ClientDeleteAll) DeleteAllOf

func (fn ClientDeleteAll) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error

type ClientGet

Types that implement single methods of the client.Reader interface.

func (ClientGet) Get

func (fn ClientGet) Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error

type ClientList

type ClientList func(context.Context, client.ObjectList, ...client.ListOption) error

Types that implement single methods of the client.Reader interface.

func (ClientList) List

func (fn ClientList) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

type ClientPatch

Types that implement single methods of the client.Writer interface.

func (ClientPatch) Patch

func (fn ClientPatch) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error

type ClientReader

type ClientReader struct {
	ClientGet
	ClientList
}

ClientReader implements client.Reader by composing assignable functions.

type ClientUpdate

type ClientUpdate func(context.Context, client.Object, ...client.UpdateOption) error

Types that implement single methods of the client.Writer interface.

func (ClientUpdate) Update

func (fn ClientUpdate) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error

type ClientWriter

ClientWriter implements client.Writer by composing assignable functions.

type GR

type GR = schema.GroupResource

type GV

type GV = schema.GroupVersion

type GVK

type GVR

type Manager

type Manager = manager.Manager

type Options

type Options = manager.Options

Jump to

Keyboard shortcuts

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