Documentation
¶
Index ¶
- Variables
- func ErrorWithBackoff(err error) (reconcile.Result, error)
- func ErrorWithoutBackoff(err error) (reconcile.Result, error)
- func FromUnstructuredList[T any, PT interface{ ... }](list *unstructured.UnstructuredList) (*T, error)
- func FromUnstructuredObject[T any, PT interface{ ... }](object *unstructured.Unstructured) (*T, error)
- func GetConfig() (*rest.Config, error)
- func NewManager(config *rest.Config, options manager.Options) (manager.Manager, error)
- func NewPodExecutor(config *rest.Config) (podExecutor, error)
- func NewTicker(d time.Duration, e event.GenericEvent, h handler.EventHandler) source.Source
- func NewTickerImmediate(d time.Duration, e event.GenericEvent, h handler.EventHandler) source.Source
- func RequeueWithBackoff() reconcile.Result
- func RequeueWithoutBackoff(delay time.Duration) reconcile.Result
- func SetLogger(logger logging.Logger)
- func SignalHandler() context.Context
- func ToUnstructuredList(list client.ObjectList) (*unstructured.UnstructuredList, error)
- func ToUnstructuredObject(object client.Object) (*unstructured.Unstructured, error)
- type CacheConfig
- type ClientCreate
- type ClientDelete
- type ClientDeleteAll
- type ClientGet
- type ClientList
- type ClientPatch
- type ClientReader
- type ClientUpdate
- type ClientWriter
- type GR
- type GV
- type GVK
- type GVR
- type Manager
- type Options
Constants ¶
This section is empty.
Variables ¶
var Scheme *runtime.Scheme = runtime.NewScheme()
Scheme associates standard Kubernetes API objects and PGO API objects with Go structs.
Functions ¶
func ErrorWithBackoff ¶
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 ¶
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 ¶
GetConfig returns a Kubernetes client configuration from KUBECONFIG or the service account Kubernetes gives to pods.
func NewManager ¶
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 NewTicker ¶
func NewTicker(d time.Duration, e event.GenericEvent, h handler.EventHandler) source.Source
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 ¶
RequeueWithBackoff returns a Result that indicates a reconcile.Request should be retried later.
func RequeueWithoutBackoff ¶
RequeueWithoutBackoff returns a Result that indicates a reconcile.Request should be retried on or before delay.
func SetLogger ¶
SetLogger assigns the default Logger used by sigs.k8s.io/controller-runtime.
func SignalHandler ¶
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 ClientCreate ¶
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 ¶
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 ¶
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.
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.
type ClientReader ¶
type ClientReader struct { ClientGet ClientList }
ClientReader implements client.Reader by composing assignable functions.
type ClientUpdate ¶
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 ¶
type ClientWriter struct { ClientCreate ClientDelete ClientDeleteAll ClientPatch ClientUpdate }
ClientWriter implements client.Writer by composing assignable functions.
type GR ¶
type GR = schema.GroupResource
type GV ¶
type GV = schema.GroupVersion
type GVK ¶
type GVK = schema.GroupVersionKind
type GVR ¶
type GVR = schema.GroupVersionResource