Documentation ¶
Index ¶
- Constants
- Variables
- func SetUriParamsForTFServingProxyContainer(pu *machinelearningv1.PredictiveUnit, c *v1.Container)
- type AmbassadorCircuitBreakerConfig
- type AmbassadorConfig
- type AmbassadorRetryPolicy
- type AmbassadorTLSContextConfig
- type ExplainerConfig
- type ExplainerInitialiser
- type ModelInitialiser
- type PrePackedInitialiser
- 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" ANNOTATION_AMBASSADOR_CIRCUIT_BREAKING_MAX_CONNECTIONS = "seldon.io/ambassador-circuit-breakers-max-connections" ANNOTATION_AMBASSADOR_CIRCUIT_BREAKING_MAX_PENDING_REQUESTS = "seldon.io/ambassador-circuit-breakers-max-pending-requests" ANNOTATION_AMBASSADOR_CIRCUIT_BREAKING_MAX_REQUESTS = "seldon.io/ambassador-circuit-breakers-max-requests" ANNOTATION_AMBASSADOR_CIRCUIT_BREAKING_MAX_RETRIES = "seldon.io/ambassador-circuit-breakers-max-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 ( MLServerSKLearnImplementation = "mlserver.models.SKLearnModel" MLServerXGBoostImplementation = "mlserver.models.XGBoostModel" MLServerHTTPPortEnv = "MLSERVER_HTTP_PORT" MLServerGRPCPortEnv = "MLSERVER_GRPC_PORT" MLServerModelNameEnv = "MLSERVER_MODEL_NAME" MLServerModelImplementationEnv = "MLSERVER_MODEL_IMPLEMENTATION" MLServerModelURIEnv = "MLSERVER_MODEL_URI" )
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" EnvStorageInitializerImageRelated = "RELATED_IMAGE_STORAGE_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" // This env var in the operator allows you to change the default path // to mount the cert in the containers ENV_DEFAULT_CERT_MOUNT_PATH_NAME = "DEFAULT_CERT_MOUNT_PATH_NAME" // The ENV VAR NAME for containers to be able to find the path SELDON_MOUNT_PATH_ENV_NAME = "SELDON_CERT_MOUNT_PATH" DEFAULT_ENGINE_CONTAINER_PORT = 8000 DEFAULT_ENGINE_GRPC_PORT = 5001 AMBASSADOR_ANNOTATION = "getambassador.io/config" LABEL_CONTROLLER_ID = "seldon.io/controller-id" ENV_KEDA_ENABLED = "KEDA_ENABLED" )
View Source
const ( ENV_DEFAULT_EXECUTOR_SERVER_PORT = "EXECUTOR_SERVER_PORT" ENV_DEFAULT_EXECUTOR_SERVER_GRPC_PORT = "EXECUTOR_SERVER_GRPC_PORT" ENV_DEFAULT_EXECUTOR_CPU_REQUEST = "EXECUTOR_DEFAULT_CPU_REQUEST" ENV_DEFAULT_EXECUTOR_MEMORY_REQUEST = "EXECUTOR_DEFAULT_MEMORY_REQUEST" ENV_DEFAULT_EXECUTOR_CPU_LIMIT = "EXECUTOR_DEFAULT_CPU_LIMIT" ENV_DEFAULT_EXECUTOR_MEMORY_LIMIT = "EXECUTOR_DEFAULT_MEMORY_LIMIT" ENV_DEFAULT_ENGINE_CPU_REQUEST = "ENGINE_DEFAULT_CPU_REQUEST" ENV_DEFAULT_ENGINE_MEMORY_REQUEST = "ENGINE_DEFAULT_MEMORY_REQUEST" ENV_DEFAULT_ENGINE_CPU_LIMIT = "ENGINE_DEFAULT_CPU_LIMIT" ENV_DEFAULT_ENGINE_MEMORY_LIMIT = "ENGINE_DEFAULT_MEMORY_LIMIT" ENV_EXECUTOR_METRICS_PORT_NAME = "EXECUTOR_SERVER_METRICS_PORT_NAME" 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 ( ExplainerConfigMapKeyName = "explainer" EnvExplainerImageRelated = "RELATED_IMAGE_EXPLAINER" )
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 = utils.GetEnv("POD_NAMESPACE", "seldon-system") ControllerConfigMapName = "seldon-config" )
View Source
var (
EngineContainerName = "seldon-container-engine"
)
View Source
var (
PredictiveUnitDefaultEnvSecretRefName = utils.GetEnv(ENV_PREDICTIVE_UNIT_DEFAULT_ENV_SECRET_REF_NAME, "")
)
Functions ¶
func SetUriParamsForTFServingProxyContainer ¶
func SetUriParamsForTFServingProxyContainer(pu *machinelearningv1.PredictiveUnit, c *v1.Container)
Types ¶
type AmbassadorCircuitBreakerConfig ¶
type AmbassadorCircuitBreakerConfig struct { MaxConnections int `yaml:"max_connections,omitempty"` MaxPendingRequests int `yaml:"max_pending_requests,omitempty"` MaxRequests int `yaml:"max_requests,omitempty"` MaxRetries int `yaml:"max_retries,omitempty"` }
AmbassadorCircuitBreakerConfig - struct for ambassador circuit breaker
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"` CircuitBreakers []*AmbassadorCircuitBreakerConfig `yaml:"circuit_breakers,omitempty"` TLS string `yaml:"tls,omitempty"` }
Struct for Ambassador configuration
type AmbassadorRetryPolicy ¶
type AmbassadorTLSContextConfig ¶
type AmbassadorTLSContextConfig struct { ApiVersion string `yaml:"apiVersion"` Kind string `yaml:"kind"` Name string `yaml:"name"` Hosts []string `yaml:"hosts"` Secret string `yaml:"secret"` }
Struct for Ambassador configuration
type ExplainerConfig ¶
type ExplainerConfig struct {
Image string `json:"image"`
}
type ExplainerInitialiser ¶
type ExplainerInitialiser struct {
// contains filtered or unexported fields
}
func NewExplainerInitializer ¶
func NewExplainerInitializer(ctx context.Context, clientset kubernetes.Interface) *ExplainerInitialiser
type ModelInitialiser ¶
type ModelInitialiser struct {
// contains filtered or unexported fields
}
func NewModelInitializer ¶
func NewModelInitializer(ctx context.Context, clientset kubernetes.Interface) *ModelInitialiser
func (*ModelInitialiser) InjectModelInitializer ¶
func (mi *ModelInitialiser) InjectModelInitializer(deployment *appsv1.Deployment, containerName string, srcURI string, serviceAccountName string, envSecretRefName string, storageInitializerImage string) (deploy *appsv1.Deployment, err error)
InjectModelInitializer injects an init container to provision model data
type PrePackedInitialiser ¶
type PrePackedInitialiser struct {
// contains filtered or unexported fields
}
func NewPrePackedInitializer ¶
func NewPrePackedInitializer(ctx context.Context, clientset kubernetes.Interface) *PrePackedInitialiser
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 ClientSet kubernetes.Interface }
SeldonDeploymentReconciler reconciles a SeldonDeployment object
func (*SeldonDeploymentReconciler) SetupWithManager ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.