Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Empty structs for task resource defaults #530

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
12 changes: 2 additions & 10 deletions pkg/runtime/task_resource_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,13 @@ package runtime
import (
"github.com/flyteorg/flyteadmin/pkg/runtime/interfaces"
"github.com/flyteorg/flytestdlib/config"
"k8s.io/apimachinery/pkg/api/resource"
)

const taskResourceKey = "task_resources"

var taskResourceConfig = config.MustRegisterSection(taskResourceKey, &TaskResourceSpec{
Defaults: interfaces.TaskResourceSet{
CPU: resource.MustParse("2"),
Memory: resource.MustParse("200Mi"),
},
Limits: interfaces.TaskResourceSet{
CPU: resource.MustParse("2"),
Memory: resource.MustParse("1Gi"),
GPU: resource.MustParse("1"),
},
Defaults: interfaces.TaskResourceSet{},
Limits: interfaces.TaskResourceSet{},
})

type TaskResourceSpec struct {
Expand Down