controllers

package
v0.0.0-...-58c3220 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: Apache-2.0 Imports: 62 Imported by: 0

Documentation

Overview

TODO:

  1. If modelPath is .zip, .gz, .tar then use rclone cp but not sync and then unzip model in validate-model step
  2. Pass on helm chart level env variable with tools image name

Index

Constants

View Source
const (
	DefaultModelPort                     = int32(5000)
	DefaultRequeueDelay                  = 10 * time.Second
	DefaultPortName                      = "http1"
	KnativeMinReplicasKey                = "autoscaling.knative.dev/minScale"
	KnativeMaxReplicasKey                = "autoscaling.knative.dev/maxScale"
	KnativeAutoscalingTargetKey          = "autoscaling.knative.dev/target"
	KnativeAutoscalingTargetDefaultValue = "10"
	KnativeAutoscalingClass              = "autoscaling.knative.dev/class"
	KnativeAutoscalingMetric             = "autoscaling.knative.dev/metric"
	DefaultKnativeAutoscalingMetric      = "concurrency"
	DefaultKnativeAutoscalingClass       = "kpa.autoscaling.knative.dev"
	ModelNameAnnotationKey               = "modelName"
	AppliedModelDeploymentSpecKey        = "odahu.org/applied-model-deployment-spec"
	AppliedPolicyHashKey                 = "odahu.org/applied-policy-hash"

	IstioRewriteHTTPProbesAnnotation = "sidecar.istio.io/rewriteAppHTTPProbers"
	OdahuAuthorizationLabel          = "odahu-flow-authorization"
)
View Source
const (
	DockerConfigSecretKey                = ".dockercfg"
	PeriodUpdatingDockerConnectionToken  = 6 * time.Hour
	PeriodVerifyingDockerConnectionToken = 10 * time.Minute
)
View Source
const (
	ModelRouteVersionKey = "modelRouteVersion"
)

Variables

View Source
var (
	DefaultTerminationPeriod = int64(600)
)

Functions

func GetCMPolicyName

func GetCMPolicyName(modelDeploymentCR *odahuflowv1alpha1.ModelDeployment) string

func KnativeServiceName

func KnativeServiceName(md *odahuflowv1alpha1.ModelDeployment) string

func VirtualServiceName

func VirtualServiceName(mr *odahuflowv1alpha1.ModelRoute) string

Types

type BatchInferenceJobReconciler

type BatchInferenceJobReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

BatchInferenceJobReconciler reconciles a BatchInferenceJob object

func (*BatchInferenceJobReconciler) Reconcile

func (*BatchInferenceJobReconciler) SetupWithManager

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

type BatchInferenceJobReconcilerOptions

type BatchInferenceJobReconcilerOptions struct {
	Client          client.Client
	Schema          *runtime.Scheme
	ConnGetter      controller_types.ConnGetter
	PodGetter       PodGetter
	Cfg             config.BatchConfig
	ResourceGPUName string
}

type DockerSecret

type DockerSecret struct {
	Email    string `json:"email"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type EnqueueRequestForImplicitOwner

type EnqueueRequestForImplicitOwner struct{}

func (*EnqueueRequestForImplicitOwner) Create

func (*EnqueueRequestForImplicitOwner) Delete

func (*EnqueueRequestForImplicitOwner) Generic

Generic implements EventHandler

func (*EnqueueRequestForImplicitOwner) Update

type ModelDeploymentReconciler

type ModelDeploymentReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

ModelDeploymentReconciler reconciles a ModelDeployment object

func NewModelDeploymentReconciler

func NewModelDeploymentReconciler(
	mgr manager.Manager,
	cfg config.Config,
	rootLogger *zap.Logger,
) *ModelDeploymentReconciler

func (*ModelDeploymentReconciler) Reconcile

func (r *ModelDeploymentReconciler) Reconcile(request ctrl.Request) (ctrl.Result, error)

func (*ModelDeploymentReconciler) ReconcileKnativeService

func (r *ModelDeploymentReconciler) ReconcileKnativeService(
	log *zap.SugaredLogger,
	modelDeploymentCR *odahuflowv1alpha1.ModelDeployment,
	predictor predictors.Predictor,
) error

func (*ModelDeploymentReconciler) SetupBuilder

func (r *ModelDeploymentReconciler) SetupBuilder(mgr ctrl.Manager) *ctrl.Builder

func (*ModelDeploymentReconciler) SetupWithManager

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

type ModelPackagingReconciler

type ModelPackagingReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

ModelPackagingReconciler reconciles a ModelPackaging object

func NewModelPackagingReconciler

func NewModelPackagingReconciler(
	mgr manager.Manager, cfg config.Config,
	packAPIClient mp_api_client.Client,
) *ModelPackagingReconciler

newReconciler returns a new reconcile.Reconciler

func (*ModelPackagingReconciler) Reconcile

func (r *ModelPackagingReconciler) Reconcile(request ctrl.Request) (ctrl.Result, error)

func (*ModelPackagingReconciler) SetupBuilder

func (r *ModelPackagingReconciler) SetupBuilder(mgr ctrl.Manager) *ctrl.Builder

func (*ModelPackagingReconciler) SetupWithManager

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

type ModelRouteReconciler

type ModelRouteReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

ModelRouteReconciler reconciles a ModelRoute object

func NewModelRouteReconciler

func NewModelRouteReconciler(
	mgr manager.Manager,
	cfg config.Config,
) *ModelRouteReconciler

func (*ModelRouteReconciler) Reconcile

func (r *ModelRouteReconciler) Reconcile(request ctrl.Request) (ctrl.Result, error)

func (*ModelRouteReconciler) SetupBuilder

func (r *ModelRouteReconciler) SetupBuilder(mgr ctrl.Manager) *ctrl.Builder

func (*ModelRouteReconciler) SetupWithManager

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

type ModelTrainingReconciler

type ModelTrainingReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

ModelTrainingReconciler reconciles a ModelTraining object

func NewModelTrainingReconciler

func NewModelTrainingReconciler(
	mgr manager.Manager, cfg config.Config, trainAPIClient train_api_client.Client,
) *ModelTrainingReconciler

newReconciler returns a new reconcile.Reconciler

func (*ModelTrainingReconciler) Reconcile

func (*ModelTrainingReconciler) SetupBuilder

func (r *ModelTrainingReconciler) SetupBuilder(mgr ctrl.Manager) *ctrl.Builder

func (*ModelTrainingReconciler) SetupWithManager

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

type PodGetter

type PodGetter interface {
	GetPod(ctx context.Context, name string, namespace string) (corev1.Pod, error)
}

Directories

Path Synopsis
utils

Jump to

Keyboard shortcuts

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