trial

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 31 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DefaultJobKind = "Job"

	// For trials
	TrialCreatedReason            = "TrialCreated"
	TrialRunningReason            = "TrialRunning"
	TrialSucceededReason          = "TrialSucceeded"
	TrialMetricsUnavailableReason = "MetricsUnavailable"
	TrialFailedReason             = "TrialFailed"
	TrialKilledReason             = "TrialKilled"

	// For Jobs
	JobCreatedReason            = "JobCreated"
	JobDeletedReason            = "JobDeleted"
	JobSucceededReason          = "JobSucceeded"
	JobMetricsUnavailableReason = "MetricsUnavailable"
	JobFailedReason             = "JobFailed"
	JobRunningReason            = "JobRunning"
	ReconcileFailedReason       = "ReconcileFailed"
)
View Source
const (
	// ControllerName is the controller name.
	ControllerName = "trial-controller"
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new Trial Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.

Types

type ReconcileTrial

type ReconcileTrial struct {
	client.Client

	managerclient.ManagerClient
	// contains filtered or unexported fields
}

ReconcileTrial reconciles a Trial object

func (*ReconcileTrial) Reconcile

func (r *ReconcileTrial) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a Trial object and makes changes based on the state read and what is in the Trial.Spec +kubebuilder:rbac:groups=trials.kubeflow.org,resources=trials,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=trials.kubeflow.org,resources=trials/status,verbs=get;update;patch

func (*ReconcileTrial) UpdateTrialStatusCondition

func (r *ReconcileTrial) UpdateTrialStatusCondition(instance *trialsv1beta1.Trial, deployedJob *unstructured.Unstructured, jobCondition *commonv1.JobCondition)

func (*ReconcileTrial) UpdateTrialStatusObservation

func (r *ReconcileTrial) UpdateTrialStatusObservation(instance *trialsv1beta1.Trial, deployedJob *unstructured.Unstructured) error

type TrialsCollector

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

func NewTrialsCollector

func NewTrialsCollector(store cache.Cache, registerer prometheus.Registerer) *TrialsCollector

func (*TrialsCollector) Collect

func (m *TrialsCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (*TrialsCollector) Describe

func (m *TrialsCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

func (*TrialsCollector) IncreaseTrialsCreatedCount

func (c *TrialsCollector) IncreaseTrialsCreatedCount(ns string)

func (*TrialsCollector) IncreaseTrialsDeletedCount

func (c *TrialsCollector) IncreaseTrialsDeletedCount(ns string)

func (*TrialsCollector) IncreaseTrialsFailedCount

func (c *TrialsCollector) IncreaseTrialsFailedCount(ns string)

func (*TrialsCollector) IncreaseTrialsSucceededCount

func (c *TrialsCollector) IncreaseTrialsSucceededCount(ns string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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