Skip to content

feat(serverless_jobs): add local storage limit #1999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions api/jobs/v1alpha1/jobs_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ type JobDefinition struct {

CronSchedule *CronSchedule `json:"cron_schedule"`

LocalStorageCapacity uint32 `json:"local_storage_capacity"`

// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"region"`
}
Expand Down Expand Up @@ -210,6 +212,8 @@ type JobRun struct {

EnvironmentVariables map[string]string `json:"environment_variables"`

LocalStorageCapacity uint32 `json:"local_storage_capacity"`

// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"region"`
}
Expand All @@ -232,9 +236,12 @@ type CreateJobDefinitionRequest struct {
// CPULimit: CPU limit of the job.
CPULimit uint32 `json:"cpu_limit"`

// MemoryLimit: memory limit of the job.
// MemoryLimit: memory limit of the job (in MiB).
MemoryLimit uint32 `json:"memory_limit"`

// LocalStorageCapacity: local storage capacity of the job (in MiB).
LocalStorageCapacity *uint32 `json:"local_storage_capacity,omitempty"`

// ImageURI: image to use for the job.
ImageURI string `json:"image_uri"`

Expand Down Expand Up @@ -413,9 +420,12 @@ type UpdateJobDefinitionRequest struct {
// CPULimit: CPU limit of the job.
CPULimit *uint32 `json:"cpu_limit,omitempty"`

// MemoryLimit: memory limit of the job.
// MemoryLimit: memory limit of the job (in MiB).
MemoryLimit *uint32 `json:"memory_limit,omitempty"`

// LocalStorageCapacity: local storage capacity of the job (in MiB).
LocalStorageCapacity *uint32 `json:"local_storage_capacity,omitempty"`

// ImageURI: image to use for the job.
ImageURI *string `json:"image_uri,omitempty"`

Expand Down