Skip to content

add more resources settings for container component #318

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 2 commits into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
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
24 changes: 24 additions & 0 deletions crds/workspace.devfile.io_devworkspaces.v1beta1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4502,6 +4502,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should run in its
own separated pod, instead of running as part of the
Expand Down Expand Up @@ -4605,6 +4609,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the project source
code should be mounted in the component. \n Defaults
Expand Down Expand Up @@ -5225,6 +5231,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should
run in its own separated pod, instead of
Expand Down Expand Up @@ -5336,6 +5346,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the project
source code should be mounted in the component.
Expand Down Expand Up @@ -6035,6 +6047,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should run
in its own separated pod, instead of running as
Expand Down Expand Up @@ -6139,6 +6155,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the project
source code should be mounted in the component.
Expand Down Expand Up @@ -6751,6 +6769,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should
run in its own separated pod, instead
Expand Down Expand Up @@ -6869,6 +6891,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the
project source code should be mounted
Expand Down
24 changes: 24 additions & 0 deletions crds/workspace.devfile.io_devworkspaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4500,6 +4500,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should run in its
own separated pod, instead of running as part of the
Expand Down Expand Up @@ -4605,6 +4609,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the project source
code should be mounted in the component. \n Defaults
Expand Down Expand Up @@ -5230,6 +5236,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should
run in its own separated pod, instead of
Expand Down Expand Up @@ -5341,6 +5351,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the project
source code should be mounted in the component.
Expand Down Expand Up @@ -6040,6 +6052,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should run
in its own separated pod, instead of running as
Expand Down Expand Up @@ -6144,6 +6160,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the project
source code should be mounted in the component.
Expand Down Expand Up @@ -6756,6 +6774,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should
run in its own separated pod, instead
Expand Down Expand Up @@ -6874,6 +6896,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the
project source code should be mounted
Expand Down
24 changes: 24 additions & 0 deletions crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4256,6 +4256,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should run in its own
separated pod, instead of running as part of the main
Expand Down Expand Up @@ -4353,6 +4357,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the project source
code should be mounted in the component. \n Defaults to
Expand Down Expand Up @@ -4959,6 +4965,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should run
in its own separated pod, instead of running
Expand Down Expand Up @@ -5064,6 +5074,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the project
source code should be mounted in the component.
Expand Down Expand Up @@ -5736,6 +5748,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should run in its
own separated pod, instead of running as part of the
Expand Down Expand Up @@ -5837,6 +5853,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the project source
code should be mounted in the component. \n Defaults
Expand Down Expand Up @@ -6432,6 +6450,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should
run in its own separated pod, instead of
Expand Down Expand Up @@ -6543,6 +6565,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the project
source code should be mounted in the component.
Expand Down
24 changes: 24 additions & 0 deletions crds/workspace.devfile.io_devworkspacetemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4254,6 +4254,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should run in its own
separated pod, instead of running as part of the main
Expand Down Expand Up @@ -4353,6 +4357,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the project source
code should be mounted in the component. \n Defaults to
Expand Down Expand Up @@ -4964,6 +4970,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should run
in its own separated pod, instead of running
Expand Down Expand Up @@ -5069,6 +5079,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the project
source code should be mounted in the component.
Expand Down Expand Up @@ -5741,6 +5753,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should run in its
own separated pod, instead of running as part of the
Expand Down Expand Up @@ -5842,6 +5858,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the project source
code should be mounted in the component. \n Defaults
Expand Down Expand Up @@ -6437,6 +6455,10 @@ spec:
items:
type: string
type: array
cpuLimit:
type: string
cpuRequest:
type: string
dedicatedPod:
description: "Specify if a container should
run in its own separated pod, instead of
Expand Down Expand Up @@ -6548,6 +6570,8 @@ spec:
type: string
memoryLimit:
type: string
memoryRequest:
type: string
mountSources:
description: "Toggles whether or not the project
source code should be mounted in the component.
Expand Down
9 changes: 9 additions & 0 deletions pkg/apis/workspaces/v1alpha2/containerComponent.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ type Container struct {
// +optional
MemoryLimit string `json:"memoryLimit,omitempty"`

// +optional
MemoryRequest string `json:"memoryRequest,omitempty"`

// +optional
CpuLimit string `json:"cpuLimit,omitempty"`

// +optional
CpuRequest string `json:"cpuRequest,omitempty"`

// The command to run in the dockerimage component instead of the default one provided in the image.
//
// Defaults to an empty array, meaning use whatever is defined in the image.
Expand Down
18 changes: 18 additions & 0 deletions pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions pkg/apis/workspaces/v1alpha2/zz_generated.plugin_overrides.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading