Documentation ¶
Index ¶
- Constants
- Variables
- func ErrorComputeResourceConflict(resourceA, resourceB string) error
- func ErrorConfigGreaterThanOtherConfig(tooBigKey string, tooBigVal interface{}, tooSmallKey string, ...) error
- func ErrorCortexPrefixedEnvVarNotAllowed(prefixes ...string) error
- func ErrorDisallowedEnvVars(disallowedValues ...string) error
- func ErrorDuplicateContainerName(containerName string) error
- func ErrorDuplicateEndpoint(apiName string) error
- func ErrorDuplicateEndpointInOneDeploy(apis []userconfig.API) error
- func ErrorDuplicateName(apis []userconfig.API) error
- func ErrorFieldIsNotSupportedForKind(field string, kind userconfig.Kind) error
- func ErrorFieldMustBeSpecifiedForKind(field string, kind userconfig.Kind) error
- func ErrorIncorrectTrafficSplitterWeightTotal(totalWeight int32) error
- func ErrorInitReplicasGreaterThanMax(init int32, max int32) error
- func ErrorInitReplicasLessThanMin(init int32, min int32) error
- func ErrorInvalidSurgeOrUnavailable(val string) error
- func ErrorMalformedConfig() error
- func ErrorMinReplicasGreaterThanMax(min int32, max int32) error
- func ErrorNoAPIs() error
- func ErrorOneOfPrerequisitesNotDefined(argName string, prerequisite string, prerequisites ...string) error
- func ErrorOneShadowPerTrafficSplitter() error
- func ErrorShmCannotExceedMem(shm k8s.Quantity, mem k8s.Quantity) error
- func ErrorSpecifyAllOrNone(val string, vals ...string) error
- func ErrorSpecifyExactlyOneField(numSpecified int, fields ...string) error
- func ErrorSurgeAndUnavailableBothZero() error
- func ErrorTargetInFlightLimitReached(targetInFlight float64, maxConcurrency, maxQueueLength int64) error
- func ErrorTrafficSplitterAPIsNotUnique(names []string) error
- func ErrorUnexpectedDockerSecretData(reason string, secretData map[string][]byte) error
- func ExtractAPIConfigs(configBytes []byte, configFileName string) ([]userconfig.API, error)
- func FindDuplicateNames(apis []userconfig.API) []userconfig.API
- func JobAPIPrefix(clusterUID string, kind userconfig.Kind, apiName string) string
- func JobBatchCountKey(clusterUID string, kind userconfig.Kind, apiName string, jobID string) string
- func JobMetricsKey(clusterUID string, kind userconfig.Kind, apiName string, jobID string) string
- func JobPayloadKey(clusterUID string, kind userconfig.Kind, apiName string, jobID string) string
- func Key(apiName string, apiID string, clusterUID string) string
- func KeysPrefix(apiName string, clusterUID string) string
- func MetadataRoot(apiName string, clusterUID string) string
- func MonotonicallyDecreasingID() string
- func TimeFromAPIID(apiID string) (time.Time, error)
- func ValidateAPI(api *userconfig.API, awsClient *aws.Client, k8sClient *k8s.Client) error
- func ValidateTrafficSplitter(api *userconfig.API) error
- type API
- type BatchJob
- type JobKey
- type Metadata
- type RuntimeBatchJobConfig
- type RuntimeTaskJobConfig
- type SQSDeadLetterQueue
- type TaskJob
Constants ¶
View Source
const ( ErrMalformedConfig = "spec.malformed_config" ErrNoAPIs = "spec.no_apis" ErrDuplicateName = "spec.duplicate_name" ErrDuplicateEndpointInOneDeploy = "spec.duplicate_endpoint_in_one_deploy" ErrDuplicateEndpoint = "spec.duplicate_endpoint" ErrDuplicateContainerName = "spec.duplicate_container_name" ErrSpecifyExactlyOneField = "spec.specify_exactly_one_field" ErrSpecifyAllOrNone = "spec.specify_all_or_none" ErrOneOfPrerequisitesNotDefined = "spec.one_of_prerequisites_not_defined" ErrConfigGreaterThanOtherConfig = "spec.config_greater_than_other_config" ErrMinReplicasGreaterThanMax = "spec.min_replicas_greater_than_max" ErrInitReplicasGreaterThanMax = "spec.init_replicas_greater_than_max" ErrInitReplicasLessThanMin = "spec.init_replicas_less_than_min" ErrTargetInFlightLimitReached = "spec.target_in_flight_limit_reached" ErrShmCannotExceedMem = "spec.shm_cannot_exceed_mem" ErrFieldMustBeSpecifiedForKind = "spec.field_must_be_specified_for_kind" ErrFieldIsNotSupportedForKind = "spec.field_is_not_supported_for_kind" ErrCortexPrefixedEnvVarNotAllowed = "spec.cortex_prefixed_env_var_not_allowed" ErrDisallowedEnvVars = "spec.disallowed_env_vars" ErrComputeResourceConflict = "spec.compute_resource_conflict" ErrIncorrectTrafficSplitterWeight = "spec.incorrect_traffic_splitter_weight" ErrTrafficSplitterAPIsNotUnique = "spec.traffic_splitter_apis_not_unique" ErrOneShadowPerTrafficSplitter = "spec.one_shadow_per_traffic_splitter" ErrUnexpectedDockerSecretData = "spec.unexpected_docker_secret_data" )
View Source
const (
MetricsFileKey = "metrics.json"
)
Variables ¶
View Source
var AutoscalingTickInterval = 10 * time.Second
Functions ¶
func ErrorComputeResourceConflict ¶ added in v0.18.0
func ErrorConfigGreaterThanOtherConfig ¶ added in v0.17.0
func ErrorCortexPrefixedEnvVarNotAllowed ¶ added in v0.16.0
func ErrorDisallowedEnvVars ¶ added in v0.36.0
func ErrorDuplicateContainerName ¶ added in v0.36.0
func ErrorDuplicateEndpoint ¶ added in v0.16.0
func ErrorDuplicateEndpointInOneDeploy ¶ added in v0.16.0
func ErrorDuplicateEndpointInOneDeploy(apis []userconfig.API) error
func ErrorDuplicateName ¶ added in v0.16.0
func ErrorDuplicateName(apis []userconfig.API) error
func ErrorFieldIsNotSupportedForKind ¶ added in v0.36.0
func ErrorFieldIsNotSupportedForKind(field string, kind userconfig.Kind) error
func ErrorFieldMustBeSpecifiedForKind ¶ added in v0.36.0
func ErrorFieldMustBeSpecifiedForKind(field string, kind userconfig.Kind) error
func ErrorIncorrectTrafficSplitterWeightTotal ¶ added in v0.19.0
func ErrorInitReplicasGreaterThanMax ¶ added in v0.16.0
func ErrorInitReplicasLessThanMin ¶ added in v0.16.0
func ErrorInvalidSurgeOrUnavailable ¶ added in v0.16.0
func ErrorMalformedConfig ¶ added in v0.16.0
func ErrorMalformedConfig() error
func ErrorMinReplicasGreaterThanMax ¶ added in v0.16.0
func ErrorNoAPIs ¶ added in v0.16.0
func ErrorNoAPIs() error
func ErrorOneOfPrerequisitesNotDefined ¶ added in v0.16.0
func ErrorOneShadowPerTrafficSplitter ¶ added in v0.31.0
func ErrorOneShadowPerTrafficSplitter() error
func ErrorShmCannotExceedMem ¶ added in v0.36.0
func ErrorSpecifyAllOrNone ¶ added in v0.16.0
func ErrorSpecifyExactlyOneField ¶ added in v0.36.0
func ErrorSurgeAndUnavailableBothZero ¶ added in v0.16.0
func ErrorSurgeAndUnavailableBothZero() error
func ErrorTargetInFlightLimitReached ¶ added in v0.36.0
func ErrorTrafficSplitterAPIsNotUnique ¶ added in v0.19.0
func ErrorUnexpectedDockerSecretData ¶ added in v0.21.0
func ExtractAPIConfigs ¶ added in v0.16.0
func ExtractAPIConfigs(configBytes []byte, configFileName string) ([]userconfig.API, error)
func FindDuplicateNames ¶ added in v0.16.0
func FindDuplicateNames(apis []userconfig.API) []userconfig.API
func JobAPIPrefix ¶ added in v0.27.0
func JobAPIPrefix(clusterUID string, kind userconfig.Kind, apiName string) string
e.g. /<cluster UID>/jobs/<job_api_kind>/<cortex version>/<api_name>
func JobBatchCountKey ¶ added in v0.35.0
func JobMetricsKey ¶ added in v0.35.0
func JobPayloadKey ¶ added in v0.35.0
func KeysPrefix ¶ added in v0.23.0
The path to the directory which contains one subdirectory for each API ID (for its API spec)
func MetadataRoot ¶ added in v0.16.0
func MonotonicallyDecreasingID ¶ added in v0.20.0
func MonotonicallyDecreasingID() string
ID creation optimized for listing the most recently created jobs in S3. S3 objects are listed in ascending UTF-8 binary order. This should work until the year 2262.
func TimeFromAPIID ¶ added in v0.23.0
Extract the timestamp from an API ID
func ValidateAPI ¶ added in v0.16.0
func ValidateTrafficSplitter ¶ added in v0.19.0
func ValidateTrafficSplitter(api *userconfig.API) error
Types ¶
type API ¶
type API struct { *userconfig.API ID string `json:"id" yaml:"id"` SpecID string `json:"spec_id" yaml:"spec_id"` PodID string `json:"pod_id" yaml:"pod_id"` DeploymentID string `json:"deployment_id" yaml:"deployment_id"` Key string `json:"key" yaml:"key"` InitialDeploymentTime int64 `json:"initial_deployment_time" yaml:"initial_deployment_time"` LastUpdated int64 `json:"last_updated" yaml:"last_updated"` MetadataRoot string `json:"metadata_root" yaml:"metadata_root"` }
func GetAPISpec ¶ added in v0.16.0
func GetAPISpec(apiConfig *userconfig.API, initialDeploymentTime int64, deploymentID string, clusterUID string) *API
* ID (uniquely identifies an api configuration for a given deployment)
- DeploymentID (used for refreshing a deployment)
- SpecID (uniquely identifies api configuration specified by user)
- PodID (an ID representing the pod spec)
- Resource
- Containers
- Compute
- Pod
- Deployment Strategy
- Autoscaling
- Networking
- APIs
initialDeploymentTime is Time.UnixNano()
type BatchJob ¶ added in v0.27.0
type BatchJob struct { JobKey RuntimeBatchJobConfig APIID string `json:"api_id" yaml:"api_id"` SQSUrl string `json:"sqs_url" yaml:"sqs_url"` TotalBatchCount int `json:"total_batch_count,omitempty" yaml:"total_batch_count,omitempty"` StartTime time.Time `json:"start_time,omitempty" yaml:"start_time,omitempty"` }
type JobKey ¶ added in v0.19.0
type JobKey struct { ID string `json:"job_id" yaml:"job_id"` APIName string `json:"api_name" yaml:"api_name"` Kind userconfig.Kind `json:"kind" yaml:"kind"` }
func (JobKey) Prefix ¶ added in v0.19.0
e.g. /<cluster UID>/jobs/<job_api_kind>/<cortex version>/<api_name>/<job_id>
func (JobKey) SpecFilePath ¶ added in v0.19.0
e.g. /<cluster UID>/jobs/<job_api_kind>/<cortex version>/<api_name>/<job_id>/spec.json
func (JobKey) UserString ¶ added in v0.19.0
type Metadata ¶ added in v0.40.0
type Metadata struct { *userconfig.Resource APIID string `json:"id" yaml:"id"` DeploymentID string `json:"deployment_id,omitempty" yaml:"deployment_id,omitempty"` LastUpdated int64 `json:"last_updated" yaml:"last_updated"` }
func MetadataFromDeployment ¶ added in v0.40.0
func MetadataFromDeployment(deployment *kapps.Deployment) (*Metadata, error)
func MetadataFromVirtualService ¶ added in v0.40.0
func MetadataFromVirtualService(vs *istioclientnetworking.VirtualService) (*Metadata, error)
type RuntimeBatchJobConfig ¶ added in v0.27.0
type RuntimeBatchJobConfig struct { Workers int `json:"workers" yaml:"workers"` SQSDeadLetterQueue *SQSDeadLetterQueue `json:"sqs_dead_letter_queue" yaml:"sqs_dead_letter_queue"` Config map[string]interface{} `json:"config" yaml:"config"` Timeout *int `json:"timeout" yaml:"timeout"` }
type RuntimeTaskJobConfig ¶ added in v0.27.0
type SQSDeadLetterQueue ¶ added in v0.25.0
Click to show internal directories.
Click to hide internal directories.