Documentation ¶
Index ¶
- Constants
- Variables
- func GetEnv(key, fallback string) string
- func InjectModelInitializer(deployment *appsv1.Deployment, containerName string, srcURI string, ...) (deploy *appsv1.Deployment, err error)
- func SetUriParamsForTFServingProxyContainer(pu *machinelearningv1.PredictiveUnit, c *v1.Container)
- type AmbassadorConfig
- type AmbassadorRetryPolicy
- type ResourceCleaner
- type SeldonDeploymentReconciler
- type StorageInitializerConfig
Constants ¶
View Source
const ( ANNOTATION_REST_TIMEOUT = "seldon.io/rest-timeout" ANNOTATION_GRPC_TIMEOUT = "seldon.io/grpc-timeout" ANNOTATION_AMBASSADOR_CUSTOM = "seldon.io/ambassador-config" 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" ANNOTATION_AMBASSADOR_RETRIES = "seldon.io/ambassador-retries" YAML_SEP = "---\n" AMBASSADOR_IDLE_TIMEOUT = 300000 AMBASSADOR_DEFAULT_RETRIES = "0" )
View Source
const ( ENV_ISTIO_ENABLED = "ISTIO_ENABLED" ENV_ISTIO_GATEWAY = "ISTIO_GATEWAY" ENV_ISTIO_TLS_MODE = "ISTIO_TLS_MODE" ANNOTATION_ISTIO_GATEWAY = "seldon.io/istio-gateway" ANNOTATION_ISTIO_RETRIES = "seldon.io/istio-retries" ANNOTATION_ISTIO_RETRIES_TIMEOUT = "seldon.io/istio-retries-timeout" )
View Source
const ( DefaultModelLocalMountPath = "/mnt/models" StorageInitializerConfigMapKeyName = "storageInitializer" 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? is at least configurable by configmap now (with fixed version there) TODO: check PVC
View Source
const ( ENV_DEFAULT_ENGINE_SERVER_PORT = "ENGINE_SERVER_PORT" ENV_DEFAULT_ENGINE_SERVER_GRPC_PORT = "ENGINE_SERVER_GRPC_PORT" ENV_CONTROLLER_ID = "CONTROLLER_ID" DEFAULT_ENGINE_CONTAINER_PORT = 8000 DEFAULT_ENGINE_GRPC_PORT = 5001 AMBASSADOR_ANNOTATION = "getambassador.io/config" LABEL_CONTROLLER_ID = "seldon.io/controller-id" )
View Source
const ( ENV_DEFAULT_EXECUTOR_SERVER_PORT = "EXECUTOR_SERVER_PORT" ENV_DEFAULT_EXECUTOR_SERVER_GRPC_PORT = "EXECUTOR_SERVER_GRPC_PORT" ENV_EXECUTOR_PROMETHEUS_PATH = "EXECUTOR_PROMETHEUS_PATH" ENV_ENGINE_PROMETHEUS_PATH = "ENGINE_PROMETHEUS_PATH" ENV_EXECUTOR_USER = "EXECUTOR_CONTAINER_USER" ENV_ENGINE_USER = "ENGINE_CONTAINER_USER" ENV_USE_EXECUTOR = "USE_EXECUTOR" DEFAULT_EXECUTOR_CONTAINER_PORT = 8000 DEFAULT_EXECUTOR_GRPC_PORT = 5001 ENV_EXECUTOR_IMAGE = "EXECUTOR_CONTAINER_IMAGE_AND_VERSION" ENV_EXECUTOR_IMAGE_RELATED = "RELATED_IMAGE_EXECUTOR" //RedHat specific ENV_ENGINE_IMAGE = "ENGINE_CONTAINER_IMAGE_AND_VERSION" ENV_ENGINE_IMAGE_RELATED = "RELATED_IMAGE_ENGINE" //Redhat specific )
View Source
const (
ENV_DEFAULT_USER_ID = "DEFAULT_USER_ID"
)
View Source
const (
ENV_PREDICTIVE_UNIT_DEFAULT_ENV_SECRET_REF_NAME = "PREDICTIVE_UNIT_DEFAULT_ENV_SECRET_REF_NAME"
)
Variables ¶
View Source
var ( ControllerNamespace = GetEnv("POD_NAMESPACE", "seldon-system") ControllerConfigMapName = "seldon-config" )
View Source
var (
EngineContainerName = "seldon-container-engine"
)
View Source
var (
PredictiveUnitDefaultEnvSecretRefName = GetEnv(ENV_PREDICTIVE_UNIT_DEFAULT_ENV_SECRET_REF_NAME, "")
)
Functions ¶
func InjectModelInitializer ¶
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 ¶
func SetUriParamsForTFServingProxyContainer(pu *machinelearningv1.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"` PrefixRegex *bool `yaml:"prefix_regex,omitempty"` Rewrite string `yaml:"rewrite"` 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 ResourceCleaner ¶
type ResourceCleaner struct {
// contains filtered or unexported fields
}
type SeldonDeploymentReconciler ¶
type SeldonDeploymentReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Namespace string Recorder record.EventRecorder }
SeldonDeploymentReconciler reconciles a SeldonDeployment object
func (*SeldonDeploymentReconciler) SetupWithManager ¶
func (r *SeldonDeploymentReconciler) SetupWithManager(mgr ctrl.Manager, name string) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.