Skip to content

Commit

Permalink
Dedicated pod: implement issue #48
Browse files Browse the repository at this point in the history
Signed-off-by: David Festal <dfestal@redhat.com>
  • Loading branch information
davidfestal committed Jun 22, 2020
1 parent 28e3e6a commit f426d6e
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 6 deletions.
24 changes: 24 additions & 0 deletions deploy/crds/workspace.devfile.io_devworkspaces_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,12 @@ spec:
items:
type: string
type: array
dedicatedPod:
description: "Specify if a container should run in its
own separated pod, instead of running as part of the
main development environment pod. \n Default value is
`false`"
type: boolean
endpoints:
items:
properties:
Expand Down Expand Up @@ -886,6 +892,12 @@ spec:
items:
type: string
type: array
dedicatedPod:
description: "Specify if a container should
run in its own separated pod, instead of running
as part of the main development environment
pod. \n Default value is `false`"
type: boolean
endpoints:
items:
properties:
Expand Down Expand Up @@ -1477,6 +1489,12 @@ spec:
items:
type: string
type: array
dedicatedPod:
description: "Specify if a container should run in
its own separated pod, instead of running as part
of the main development environment pod. \n Default
value is `false`"
type: boolean
endpoints:
items:
properties:
Expand Down Expand Up @@ -2005,6 +2023,12 @@ spec:
items:
type: string
type: array
dedicatedPod:
description: "Specify if a container should
run in its own separated pod, instead
of running as part of the main development
environment pod. \n Default value is `false`"
type: boolean
endpoints:
items:
properties:
Expand Down
23 changes: 23 additions & 0 deletions deploy/crds/workspace.devfile.io_devworkspacetemplates_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@ spec:
items:
type: string
type: array
dedicatedPod:
description: "Specify if a container should run in its own
separated pod, instead of running as part of the main development
environment pod. \n Default value is `false`"
type: boolean
endpoints:
items:
properties:
Expand Down Expand Up @@ -858,6 +863,12 @@ spec:
items:
type: string
type: array
dedicatedPod:
description: "Specify if a container should run
in its own separated pod, instead of running as
part of the main development environment pod.
\n Default value is `false`"
type: boolean
endpoints:
items:
properties:
Expand Down Expand Up @@ -1425,6 +1436,12 @@ spec:
items:
type: string
type: array
dedicatedPod:
description: "Specify if a container should run in its
own separated pod, instead of running as part of the
main development environment pod. \n Default value is
`false`"
type: boolean
endpoints:
items:
properties:
Expand Down Expand Up @@ -1941,6 +1958,12 @@ spec:
items:
type: string
type: array
dedicatedPod:
description: "Specify if a container should
run in its own separated pod, instead of running
as part of the main development environment
pod. \n Default value is `false`"
type: boolean
endpoints:
items:
properties:
Expand Down
18 changes: 12 additions & 6 deletions pkg/apis/workspaces/v1alpha1/containerComponent.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,34 @@ type Container struct {
// List of volumes mounts that should be mounted is this container.
VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"`

//+optional
// +optional
MemoryLimit string `json:"memoryLimit,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.
//+optional
// +optional
Command []string `json:"command,omitempty"`

// The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.
// Defaults to an empty array, meaning use whatever is defined in the image.
//+optional
// +optional
Args []string `json:"args,omitempty"`

//+optional
// +optional
MountSources bool `json:"mountSources"`

//+optional
//
// Optional specification of the path in the container where
// project sources should be transferred/mounted when `mountSources` is `true`.
// When omitted, the value of the `PROJECTS_ROOT` environment variable is used.
// +optional
SourceMapping string `json:"sourceMapping"`

// Specify if a container should run in its own separated pod,
// instead of running as part of the main development environment pod.
//
// Default value is `false`
// +optional
DedicatedPod bool `json:"dedicatedPod"`
}

type EnvVar struct {
Expand Down
16 changes: 16 additions & 0 deletions schemas/devfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down Expand Up @@ -849,6 +853,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down Expand Up @@ -1554,6 +1562,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down Expand Up @@ -2075,6 +2087,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down
16 changes: 16 additions & 0 deletions schemas/devworkspace-template-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down Expand Up @@ -1001,6 +1005,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down Expand Up @@ -1775,6 +1783,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down Expand Up @@ -2384,6 +2396,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down
16 changes: 16 additions & 0 deletions schemas/devworkspace-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down Expand Up @@ -1016,6 +1020,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down Expand Up @@ -1790,6 +1798,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down Expand Up @@ -2399,6 +2411,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down
16 changes: 16 additions & 0 deletions schemas/devworkspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down Expand Up @@ -1025,6 +1029,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down Expand Up @@ -1799,6 +1807,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down Expand Up @@ -2408,6 +2420,10 @@
},
"type": "array"
},
"dedicatedPod": {
"description": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod. \n Default value is `false`",
"type": "boolean"
},
"endpoints": {
"items": {
"properties": {
Expand Down

0 comments on commit f426d6e

Please sign in to comment.