controllers

package
v0.80.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 86 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SILENTFAIL = "SILENTFAIL"
)
View Source
const (
	SKIPRECONCILE = "SKIPRECONCILE"
)

Variables

View Source
var (
	Scheme        = runtime.NewScheme()
	CacheConfig   *rc.CacheConfig
	DebugOptions  rc.DebugOptions
	ProtectedGVKs = make(map[schema.GroupVersionKind]bool)
)
View Source
var Version string

Functions

func CreateAPIServer added in v0.53.0

func CreateAPIServer() *http.Server

func GetAppResourceFigures added in v0.21.0

func GetAppResourceFigures(ctx context.Context, client client.Client, o *crd.ClowdApp) (crd.AppResourceStatus, string, error)

func GetAppResourceStatus added in v0.21.0

func GetAppResourceStatus(ctx context.Context, client client.Client, o *crd.ClowdApp) (bool, error)

func GetEnvResourceFigures added in v0.21.0

func GetEnvResourceFigures(ctx context.Context, client client.Client, o *crd.ClowdEnvironment) (crd.EnvResourceStatus, string, error)

func GetEnvResourceStatus added in v0.21.0

func GetEnvResourceStatus(ctx context.Context, client client.Client, o *crd.ClowdEnvironment) (bool, string, error)

func GetJobsStatus added in v0.21.0

func GetJobsStatus(jobs *batchv1.JobList, cji *crd.ClowdJobInvocation) bool

func GetManagedApps added in v0.53.0

func GetManagedApps() []string

func GetManagedEnvs added in v0.53.0

func GetManagedEnvs() []string

func GetPresentApps added in v0.53.0

func GetPresentApps() []string

func GetPresentEnvs added in v0.53.0

func GetPresentEnvs() []string

func NewSkippedError added in v0.50.0

func NewSkippedError(errString string) error

func ReadEnv added in v0.19.0

func ReadEnv() string

func ReleaseEnv added in v0.19.0

func ReleaseEnv()

func ReportDependencies added in v0.72.0

func ReportDependencies(ctx context.Context, pClient client.Client, app *crd.ClowdApp, env *crd.ClowdEnvironment) error

func Run

func Run(signalHandler context.Context, metricsAddr string, probeAddr string, enableLeaderElection bool, config *rest.Config, enableWebHooks bool)

Run inits the manager and controllers and then starts the manager

func SetAppResourceStatus added in v0.21.0

func SetAppResourceStatus(ctx context.Context, client client.Client, o *crd.ClowdApp) error

SetAppResourceStatus the status on the passed ClowdObject interface.

func SetClowdAppConditions

func SetClowdAppConditions(ctx context.Context, client client.Client, o *crd.ClowdApp, state clusterv1.ConditionType, oldStatus *crd.ClowdAppStatus, err error) error

func SetClowdEnvConditions

func SetClowdEnvConditions(ctx context.Context, client client.Client, o *crd.ClowdEnvironment, state clusterv1.ConditionType, oldStatus *crd.ClowdEnvironmentStatus, err error) error

func SetClowdJobInvocationConditions added in v0.21.0

func SetClowdJobInvocationConditions(ctx context.Context, client client.Client, o *crd.ClowdJobInvocation, state clusterv1.ConditionType, err error) error

func SetEnv added in v0.19.0

func SetEnv(name string)

func SetEnvResourceStatus added in v0.21.0

func SetEnvResourceStatus(ctx context.Context, client client.Client, o *crd.ClowdEnvironment) error

SetEnvResourceStatus the status on the passed ClowdObject interface.

func UpdateInvokedJobStatus added in v0.21.0

func UpdateInvokedJobStatus(jobs *batchv1.JobList, cji *crd.ClowdJobInvocation) error

Types

type ClowdAppReconciler

type ClowdAppReconciler struct {
	client.Client
	Log       logr.Logger
	Scheme    *runtime.Scheme
	Recorder  record.EventRecorder
	HashCache *hashcache.HashCache
}

ClowdAppReconciler reconciles a ClowdApp object

func (*ClowdAppReconciler) Reconcile

func (r *ClowdAppReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile fn

func (*ClowdAppReconciler) SetupWithManager

func (r *ClowdAppReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up with Manager

type ClowdAppReconciliation added in v0.50.0

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

func (*ClowdAppReconciliation) Reconcile added in v0.50.0

func (r *ClowdAppReconciliation) Reconcile() (ctrl.Result, error)

type ClowdEnvironmentReconciler

type ClowdEnvironmentReconciler struct {
	client.Client
	Log       logr.Logger
	Scheme    *runtime.Scheme
	Recorder  record.EventRecorder
	HashCache *hashcache.HashCache
}

ClowdEnvironmentReconciler reconciles a ClowdEnvironment object

func (*ClowdEnvironmentReconciler) Reconcile

Reconcile fn

func (*ClowdEnvironmentReconciler) SetupWithManager

func (r *ClowdEnvironmentReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up with manager

type ClowdEnvironmentReconciliation added in v0.50.0

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

ClowdEnvironmentReconciliation represents a single reconciliation event This type is created by ClowdEnvironmentReconciler which handles the reconciliation cycle as a whole ClowdEnvironmentReconciliation encapsulates all of the state and logic requires for a single reconciliation event

func (*ClowdEnvironmentReconciliation) Reconcile added in v0.50.0

func (r *ClowdEnvironmentReconciliation) Reconcile() (ctrl.Result, error)

Public method to iterate through the steps of the reconciliation process

type ClowdJobInvocationReconciler

type ClowdJobInvocationReconciler struct {
	client.Client
	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

ClowdJobInvocationReconciler reconciles a ClowdJobInvocation object

func (*ClowdJobInvocationReconciler) HandleNotReady added in v0.62.0

func (*ClowdJobInvocationReconciler) InvokeJob

InvokeJob is responsible for applying the Job. It also updates and reports the status of that job

func (*ClowdJobInvocationReconciler) Reconcile

Reconcile CJI Resources

func (*ClowdJobInvocationReconciler) SetupWithManager

func (r *ClowdJobInvocationReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager registers the CJI with the main manager process

type HandlerFuncs added in v0.54.0

type HandlerFuncs struct {
	// Create returns true if the Create event should be processed
	CreateFunc func(event.CreateEvent) (bool, string)

	// Delete returns true if the Delete event should be processed
	DeleteFunc func(event.DeleteEvent) (bool, string)

	// Update returns true if the Update event should be processed
	UpdateFunc func(event.UpdateEvent) (bool, string)

	// Generic returns true if the Generic event should be processed
	GenericFunc func(event.GenericEvent) (bool, string)
}

type ReconciliationMetrics added in v0.31.0

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

type SkippedError added in v0.50.0

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

func (SkippedError) Error added in v0.50.0

func (se SkippedError) Error() string

Directories

Path Synopsis
iqe
job
metrics/subscriptions
+kubebuilder:object:generate=true +groupName=operators.coreos.com
+kubebuilder:object:generate=true +groupName=operators.coreos.com
web

Jump to

Keyboard shortcuts

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