seldondeployment

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: Apache-2.0 Imports: 34 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ANNOTATION_REST_READ_TIMEOUT       = "seldon.io/rest-read-timeout"
	ANNOTATION_GRPC_READ_TIMEOUT       = "seldon.io/grpc-read-timeout"
	ANNOTATION_AMBASSADOR_CUSTOM       = "seldon.io/ambassador-config"
	ANNOTATION_AMBASSADOR_SHADOW       = "seldon.io/ambassador-shadow"
	ANNOTATION_AMBASSADOR_SERVICE      = "seldon.io/ambassador-service-name"
	ANNOTATION_AMBASSADOR_HEADER       = "seldon.io/ambassador-header"
	ANNOTATION_AMBASSADOR_REGEX_HEADER = "seldon.io/ambassador-regex-header"
	ANNOTATION_AMBASSADOR_ID           = "seldon.io/ambassador-id"

	YAML_SEP = "---\n"

	AMBASSADOR_IDLE_TIMEOUT = 300000
)
View Source
const (
	ENV_ISTIO_ENABLED        = "ISTIO_ENABLED"
	ENV_ISTIO_GATEWAY        = "ISTIO_GATEWAY"
	ANNOTATION_ISTIO_GATEWAY = "seldon.io/istio-gateway"
)
View Source
const (
	DefaultModelLocalMountPath       = "/mnt/models"
	ModelInitializerContainerImage   = "gcr.io/kfserving/model-initializer"
	ModelInitializerContainerVersion = "latest"
	PvcURIPrefix                     = "pvc://"
	PvcSourceMountName               = "kfserving-pvc-source"
	PvcSourceMountPath               = "/mnt/pvc"
	ModelInitializerVolumeSuffix     = "provision-location"
	ModelInitializerContainerSuffix  = "model-initializer"
)

TODO: change image to seldon TODO: check PVC

View Source
const (
	ENV_DEFAULT_ENGINE_SERVER_PORT      = "ENGINE_SERVER_PORT"
	ENV_DEFAULT_ENGINE_SERVER_GRPC_PORT = "ENGINE_SERVER_GRPC_PORT"

	DEFAULT_ENGINE_CONTAINER_PORT = 8000
	DEFAULT_ENGINE_GRPC_PORT      = 5001

	AMBASSADOR_ANNOTATION = "getambassador.io/config"
)

Variables

View Source
var (
	ControllerNamespace     = getEnv("POD_NAMESPACE", "seldon-system")
	ControllerConfigMapName = "seldon-config"
)
View Source
var (
	EngineContainerName = "seldon-container-engine"
)

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new SeldonDeployment 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.

func InjectModelInitializer added in v0.4.0

func InjectModelInitializer(deployment *appsv1.Deployment, containerName string, srcURI string, serviceAccountName string, envSecretRefName string, Client client.Client) (deploy *appsv1.Deployment, err error)

InjectModelInitializer injects an init container to provision model data

func SetUriParamsForTFServingProxyContainer added in v0.4.0

func SetUriParamsForTFServingProxyContainer(pu *machinelearningv1alpha2.PredictiveUnit, c *v1.Container)

Types

type AmbassadorConfig

type AmbassadorConfig struct {
	ApiVersion    string                 `yaml:"apiVersion"`
	Kind          string                 `yaml:"kind"`
	Name          string                 `yaml:"name"`
	Grpc          *bool                  `yaml:"grpc,omitempty"`
	Prefix        string                 `yaml:"prefix"`
	Rewrite       string                 `yaml:"rewrite,omitempty"`
	Service       string                 `yaml:"service"`
	TimeoutMs     int                    `yaml:"timeout_ms"`
	IdleTimeoutMs *int                   `yaml:"idle_timeout_ms,omitempty"`
	Headers       map[string]string      `yaml:"headers,omitempty"`
	RegexHeaders  map[string]string      `yaml:"regex_headers,omitempty"`
	Weight        int32                  `yaml:"weight,omitempty"`
	Shadow        *bool                  `yaml:"shadow,omitempty"`
	RetryPolicy   *AmbassadorRetryPolicy `yaml:"retry_policy,omitempty"`
	InstanceId    string                 `yaml:"ambassador_id,omitempty"`
}

Struct for Ambassador configuration

type AmbassadorRetryPolicy

type AmbassadorRetryPolicy struct {
	RetryOn    string `yaml:"retry_on,omitempty"`
	NumRetries int    `yaml:"num_retries,omitempty"`
}

type ReconcileSeldonDeployment

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

ReconcileSeldonDeployment reconciles a SeldonDeployment object

func (*ReconcileSeldonDeployment) Reconcile

Reconcile reads that state of the cluster for a SeldonDeployment object and makes changes based on the state read and what is in the SeldonDeployment.Spec TODO(user): Modify this Reconcile function to implement your Controller logic. The scaffolding writes a Deployment as an example Automatically generate RBAC rules to allow the Controller to read and write Deployments +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=apps,resources=deployments/status,verbs=get;update;patch +kubebuilder:rbac:groups=v1,resources=services,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=v1,resources=services/status,verbs=get;update;patch +kubebuilder:rbac:groups=networking.istio.io,resources=virtualservices,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=networking.istio.io,resources=virtualservices/status,verbs=get;update;patch +kubebuilder:rbac:groups=networking.istio.io,resources=destinationrules,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=networking.istio.io,resources=destinationrules/status,verbs=get;update;patch +kubebuilder:rbac:groups=autoscaling,resources=horizontalpodautoscalers,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=autoscaling,resources=horizontalpodautoscalers/status,verbs=get;update;patch +kubebuilder:rbac:groups=machinelearning.seldon.io,resources=seldondeployments,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=machinelearning.seldon.io,resources=seldondeployments/status,verbs=get;update;patch +kubebuilder:rbac:groups=machinelearning.seldon.io,resources=seldondeployments/finalizers,verbs=get;update;patch

Jump to

Keyboard shortcuts

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