k8sctrls

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(opts ManagerOptions) (*Manager, error)

func (*Manager) IsReady

func (m *Manager) IsReady(ctx context.Context) bool

func (*Manager) Setup

func (m *Manager) Setup(ctx context.Context, opts SetupOptions) ([]Reconciler, error)

func (*Manager) Start

func (m *Manager) Start(ctx context.Context, opts StartOptions) error

type ManagerOptions

type ManagerOptions struct {
	K8sConfig      *rest.Config
	LeaderElection bool
}

type ReconcileHelper

type ReconcileHelper interface {
	// GetLogger returns the logr.Logger.
	GetLogger() logr.Logger
	// GetConfig returns the rest.Config.
	GetConfig() *rest.Config
	// GetScheme returns the runtime.Schema.
	GetScheme() *runtime.Scheme
	// GetClient returns a client.Client configured with the rest.Config.
	// This client may not be a fully "direct" client -- it may read from a cache, for
	// instance.
	GetClient() client.Client
	// GetFieldIndexer returns a client.FieldIndexer configured with the client.
	GetFieldIndexer() client.FieldIndexer
	// GetCache returns the cache.Cache.
	GetCache() cache.Cache
	// GetEventRecorderFor returns a new record.EventRecorder for the provided name.
	GetEventRecorderFor(name string) record.EventRecorder
	// GetRESTMapper returns a meta.RESTMapper.
	GetRESTMapper() meta.RESTMapper
	// GetAPIReader returns a client.Reader that will be configured to use the API server.
	// This should be used sparingly and only when the client does not fit your
	// use case.
	GetAPIReader() client.Reader
}

type Reconciler

type Reconciler interface {
	Setup(mgr ctrl.Manager) error
}

type SetupOptions

type SetupOptions struct {
	ReconcileHelper
	ModelClient *model.Client
}

type StartOptions

type StartOptions struct {
	SetupOptions
}

Jump to

Keyboard shortcuts

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