hosting

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReconcilingEndpointStatus = "ReconcilingEndpoint"

	// Defines the maximum number of characters in a SageMaker Hosting Deployment Resource name
	MaxResourceNameLength = 63
)

Variables

This section is empty.

Functions

func GetResourceOwnershipLabelsForHostingDeployment

func GetResourceOwnershipLabelsForHostingDeployment(deployment hostingv1.HostingDeployment) map[string]string

Helper method to get Kubernetes labels that are applied to all created models. These labels contain the namespaced-name of the HostingDeployment, allowing it to retrieve all owned models. This is necessary when the spec is updated and a model is completely deleted from the spec. In order to delete the model in Kubernetes, the HostingDeployment controller needs to be able to list all models that it created.

func GetSubresourceNamespacedName

func GetSubresourceNamespacedName(objectName string, hostingDeployment hostingv1.HostingDeployment) types.NamespacedName

Get the Kubernetes name of the Model/EndpointConfig. This must be idempotent so that future reconciler invocations are able to find the object. Kubernetes resources can have names up to 253 characters long. The characters allowed in names are: digits (0-9), lower case letters (a-z), -, and .

Types

type EndpointConfigReconciler

type EndpointConfigReconciler interface {
	Reconcile(ctx context.Context, desiredDeployment *hostingv1.HostingDeployment, shouldDeleteUnusedResources bool) error
	GetSageMakerEndpointConfigName(ctx context.Context, desiredDeployment *hostingv1.HostingDeployment) (string, error)
}

Helper type that is responsible for reconciling EndpointConfigs of an endpoint.

func NewEndpointConfigReconciler

func NewEndpointConfigReconciler(client client.Client, log logr.Logger) EndpointConfigReconciler

Helper method to create a EndpointConfigReconciler.

type EndpointConfigReconcilerProvider

type EndpointConfigReconcilerProvider func(client.Client, logr.Logger) EndpointConfigReconciler

Type that returns an instantiated EndpointConfigReconciler given parameters.

type HostingDeploymentReconciler

type HostingDeploymentReconciler struct {
	client.Client
	Log          logr.Logger
	PollInterval time.Duration
	// contains filtered or unexported fields
}

HostingDeploymentReconciler reconciles a HostingDeployment object

func NewHostingDeploymentReconciler

func NewHostingDeploymentReconciler(client client.Client, log logr.Logger, pollInterval time.Duration) *HostingDeploymentReconciler

func (*HostingDeploymentReconciler) Reconcile

func (*HostingDeploymentReconciler) SetupWithManager

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

type ModelReconciler

type ModelReconciler interface {
	Reconcile(ctx context.Context, desiredDeployment *hostingv1.HostingDeployment, shouldDeleteUnusedModels bool) error
	GetSageMakerModelNames(ctx context.Context, desiredDeployment *hostingv1.HostingDeployment) (map[string]*string, error)
}

Helper type that is responsible for reconciling models of an endpoint.

func NewModelReconciler

func NewModelReconciler(client client.Client, log logr.Logger) ModelReconciler

Helper method to create a ModelReconciler.

type ModelReconcilerProvider

type ModelReconcilerProvider func(client.Client, logr.Logger) ModelReconciler

Type that returns an instantiated ModelReconciler given parameters.

Jump to

Keyboard shortcuts

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