controllers

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: Apache-2.0 Imports: 69 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClowdJob = providers.NewMultiResourceIdent("cji", "clowdjob", &batchv1.Job{})
View Source
var IqeClowdJob = providers.NewSingleResourceIdent("cji", "iqe_clowdjob", &batchv1.Job{})
View Source
var IqeSecret = providers.NewSingleResourceIdent("cji", "iqe_secret", &core.Secret{})

Functions

func GetAppResourceFigures added in v0.21.0

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

func GetAppResourceStatus added in v0.21.0

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

func GetClowdAppCondition

func GetClowdAppCondition(status *crd.ClowdAppStatus, conditionType crd.ClowdConditionType) (int, *crd.ClowdCondition)

The following function was modified from the kubnernetes repo under the apache license here https://github.com/kubernetes/kubernetes/blob/v1.21.1/pkg/api/v1/pod/util.go#L317-L367

func GetClowdAppConditionFromList

func GetClowdAppConditionFromList(conditions []crd.ClowdCondition, conditionType crd.ClowdConditionType) (int, *crd.ClowdCondition)

The following function was modified from the kubnernetes repo under the apache license here https://github.com/kubernetes/kubernetes/blob/v1.21.1/pkg/api/v1/pod/util.go#L317-L367

func GetClowdEnvCondition

func GetClowdEnvCondition(status *crd.ClowdEnvironmentStatus, conditionType crd.ClowdConditionType) (int, *crd.ClowdCondition)

The following function was modified from the kubnernetes repo under the apache license here https://github.com/kubernetes/kubernetes/blob/v1.21.1/pkg/api/v1/pod/util.go#L317-L367

func GetClowdEnvConditionFromList

func GetClowdEnvConditionFromList(conditions []crd.ClowdCondition, conditionType crd.ClowdConditionType) (int, *crd.ClowdCondition)

The following function was modified from the kubnernetes repo under the apache license here https://github.com/kubernetes/kubernetes/blob/v1.21.1/pkg/api/v1/pod/util.go#L317-L367

func GetClowdJobInvocationCondition added in v0.21.0

func GetClowdJobInvocationCondition(status *crd.ClowdJobInvocationStatus, conditionType crd.ClowdConditionType) (int, *crd.ClowdCondition)

The following function was modified from the kubnernetes repo under the apache license here https://github.com/kubernetes/kubernetes/blob/v1.21.1/pkg/api/v1/pod/util.go#L317-L367

func GetClowdJobInvocationConditionFromList added in v0.21.0

func GetClowdJobInvocationConditionFromList(conditions []crd.ClowdCondition, conditionType crd.ClowdConditionType) (int, *crd.ClowdCondition)

The following function was modified from the kubnernetes repo under the apache license here https://github.com/kubernetes/kubernetes/blob/v1.21.1/pkg/api/v1/pod/util.go#L317-L367

func GetEnvResourceFigures added in v0.21.0

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

func GetEnvResourceStatus added in v0.21.0

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

func GetJobsStatus added in v0.21.0

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

func ReadEnv added in v0.19.0

func ReadEnv() string

func ReleaseEnv added in v0.19.0

func ReleaseEnv()

func Run

func Run(metricsAddr string, probeAddr string, enableLeaderElection bool, config *rest.Config, signalHandler context.Context, 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 crd.ClowdConditionType, err error) error

func SetClowdEnvConditions

func SetClowdEnvConditions(ctx context.Context, client client.Client, o *crd.ClowdEnvironment, state crd.ClowdConditionType, err error) error

func SetClowdJobInvocationConditions added in v0.21.0

func SetClowdJobInvocationConditions(ctx context.Context, client client.Client, o *crd.ClowdJobInvocation, state crd.ClowdConditionType, 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 UpdateClowdAppCondition

func UpdateClowdAppCondition(status *crd.ClowdAppStatus, condition *crd.ClowdCondition) bool

The following function was modified from the kubnernetes repo under the apache license here https://github.com/kubernetes/kubernetes/blob/v1.21.1/pkg/api/v1/pod/util.go#L317-L367

func UpdateClowdEnvCondition

func UpdateClowdEnvCondition(status *crd.ClowdEnvironmentStatus, condition *crd.ClowdCondition) bool

The following function was modified from the kubnernetes repo under the apache license here https://github.com/kubernetes/kubernetes/blob/v1.21.1/pkg/api/v1/pod/util.go#L317-L367

func UpdateClowdJobInvocationCondition added in v0.21.0

func UpdateClowdJobInvocationCondition(status *crd.ClowdJobInvocationStatus, condition *crd.ClowdCondition) bool

The following function was modified from the kubnernetes repo under the apache license here https://github.com/kubernetes/kubernetes/blob/v1.21.1/pkg/api/v1/pod/util.go#L317-L367

func UpdateInvokedJobStatus added in v0.21.0

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

Types

type ClowdAppReconciler

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

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 ClowdEnvironmentReconciler

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

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 ClowdJobInvocationReconciler

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

ClowdJobInvocationReconciler reconciles a ClowdJobInvocation object

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

Jump to

Keyboard shortcuts

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