Skip to content
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

[wip] add RunOnDemand changes in devfile api. It is not ready to be merged. #880

Closed
wants to merge 2 commits into from
Closed
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
20 changes: 20 additions & 0 deletions crds/workspace.devfile.io_devworkspaces.v1beta1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4581,6 +4581,11 @@ spec:
to true for all component types except plugins and
components that set `dedicatedPod` to true."
type: boolean
runOnDemand:
description: "Specify if a container should start only
components that is not referenced by apply, \n Default
value is `false`"
type: boolean
sourceMapping:
description: Optional specification of the path in the
container where project sources should be transferred/mounted
Expand Down Expand Up @@ -5405,6 +5410,11 @@ spec:
except plugins and components that set `dedicatedPod`
to true."
type: boolean
runOnDemand:
description: "Specify if a container should
start only components that is not referenced
by apply, \n Default value is `false`"
type: boolean
sourceMapping:
description: Optional specification of the
path in the container where project sources
Expand Down Expand Up @@ -6346,6 +6356,11 @@ spec:
plugins and components that set `dedicatedPod`
to true."
type: boolean
runOnDemand:
description: "Specify if a container should start
only components that is not referenced by apply,
\n Default value is `false`"
type: boolean
sourceMapping:
description: Optional specification of the path
in the container where project sources should
Expand Down Expand Up @@ -7172,6 +7187,11 @@ spec:
and components that set `dedicatedPod`
to true."
type: boolean
runOnDemand:
description: "Specify if a container should
start only components that is not referenced
by apply, \n Default value is `false`"
type: boolean
sourceMapping:
description: Optional specification of
the path in the container where project
Expand Down
20 changes: 20 additions & 0 deletions crds/workspace.devfile.io_devworkspaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4581,6 +4581,11 @@ spec:
to true for all component types except plugins and
components that set `dedicatedPod` to true."
type: boolean
runOnDemand:
description: "Specify if a container should start only
components that is not referenced by apply, \n Default
value is `false`"
type: boolean
sourceMapping:
default: /projects
description: Optional specification of the path in the
Expand Down Expand Up @@ -5410,6 +5415,11 @@ spec:
except plugins and components that set `dedicatedPod`
to true."
type: boolean
runOnDemand:
description: "Specify if a container should
start only components that is not referenced
by apply, \n Default value is `false`"
type: boolean
sourceMapping:
description: Optional specification of the
path in the container where project sources
Expand Down Expand Up @@ -6351,6 +6361,11 @@ spec:
plugins and components that set `dedicatedPod`
to true."
type: boolean
runOnDemand:
description: "Specify if a container should start
only components that is not referenced by apply,
\n Default value is `false`"
type: boolean
sourceMapping:
description: Optional specification of the path
in the container where project sources should
Expand Down Expand Up @@ -7177,6 +7192,11 @@ spec:
and components that set `dedicatedPod`
to true."
type: boolean
runOnDemand:
description: "Specify if a container should
start only components that is not referenced
by apply, \n Default value is `false`"
type: boolean
sourceMapping:
description: Optional specification of
the path in the container where project
Expand Down
19 changes: 19 additions & 0 deletions crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4338,6 +4338,10 @@ spec:
true for all component types except plugins and components
that set `dedicatedPod` to true."
type: boolean
runOnDemand:
description: "Specify if a container should start only components
that is not referenced by apply, \n Default value is `false`"
type: boolean
sourceMapping:
description: Optional specification of the path in the container
where project sources should be transferred/mounted when
Expand Down Expand Up @@ -5140,6 +5144,11 @@ spec:
except plugins and components that set `dedicatedPod`
to true."
type: boolean
runOnDemand:
description: "Specify if a container should start
only components that is not referenced by apply,
\n Default value is `false`"
type: boolean
sourceMapping:
description: Optional specification of the path
in the container where project sources should
Expand Down Expand Up @@ -6044,6 +6053,11 @@ spec:
to true for all component types except plugins and
components that set `dedicatedPod` to true."
type: boolean
runOnDemand:
description: "Specify if a container should start only
components that is not referenced by apply, \n Default
value is `false`"
type: boolean
sourceMapping:
description: Optional specification of the path in the
container where project sources should be transferred/mounted
Expand Down Expand Up @@ -6840,6 +6854,11 @@ spec:
except plugins and components that set `dedicatedPod`
to true."
type: boolean
runOnDemand:
description: "Specify if a container should
start only components that is not referenced
by apply, \n Default value is `false`"
type: boolean
sourceMapping:
description: Optional specification of the
path in the container where project sources
Expand Down
19 changes: 19 additions & 0 deletions crds/workspace.devfile.io_devworkspacetemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4338,6 +4338,10 @@ spec:
true for all component types except plugins and components
that set `dedicatedPod` to true."
type: boolean
runOnDemand:
description: "Specify if a container should start only components
that is not referenced by apply, \n Default value is `false`"
type: boolean
sourceMapping:
default: /projects
description: Optional specification of the path in the container
Expand Down Expand Up @@ -5145,6 +5149,11 @@ spec:
except plugins and components that set `dedicatedPod`
to true."
type: boolean
runOnDemand:
description: "Specify if a container should start
only components that is not referenced by apply,
\n Default value is `false`"
type: boolean
sourceMapping:
description: Optional specification of the path
in the container where project sources should
Expand Down Expand Up @@ -6049,6 +6058,11 @@ spec:
to true for all component types except plugins and
components that set `dedicatedPod` to true."
type: boolean
runOnDemand:
description: "Specify if a container should start only
components that is not referenced by apply, \n Default
value is `false`"
type: boolean
sourceMapping:
description: Optional specification of the path in the
container where project sources should be transferred/mounted
Expand Down Expand Up @@ -6845,6 +6859,11 @@ spec:
except plugins and components that set `dedicatedPod`
to true."
type: boolean
runOnDemand:
description: "Specify if a container should
start only components that is not referenced
by apply, \n Default value is `false`"
type: boolean
sourceMapping:
description: Optional specification of the
path in the container where project sources
Expand Down
7 changes: 7 additions & 0 deletions pkg/apis/workspaces/v1alpha2/component_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ type Container struct {
// +optional
// +devfile:default:value=false
DedicatedPod *bool `json:"dedicatedPod,omitempty"`

// Specify if a container should start only components that is not referenced by apply,
//
// Default value is `false`
// +optional
// +devfile:default:value=false
RunOnDemand *bool `json:"runOnDemand,omitempty"`
}

//GetMountSources returns the value of the boolean property. If it's unset, the default value is true for all component types except plugins and components that set `dedicatedPod` to true.
Expand Down
20 changes: 20 additions & 0 deletions pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go

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

5 changes: 5 additions & 0 deletions pkg/apis/workspaces/v1alpha2/zz_generated.getters.go

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

12 changes: 12 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.

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

16 changes: 16 additions & 0 deletions schemas/latest/dev-workspace-template-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@
"description": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.",
"type": "boolean"
},
"runOnDemand": {
"description": "Specify if a container should start only components that is not referenced by apply,\n\nDefault value is `false`",
"type": "boolean"
},
"sourceMapping": {
"description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.",
"type": "string",
Expand Down Expand Up @@ -1237,6 +1241,10 @@
"description": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.",
"type": "boolean"
},
"runOnDemand": {
"description": "Specify if a container should start only components that is not referenced by apply,\n\nDefault value is `false`",
"type": "boolean"
},
"sourceMapping": {
"description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.",
"type": "string"
Expand Down Expand Up @@ -2092,6 +2100,10 @@
"description": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.",
"type": "boolean"
},
"runOnDemand": {
"description": "Specify if a container should start only components that is not referenced by apply,\n\nDefault value is `false`",
"type": "boolean"
},
"sourceMapping": {
"description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.",
"type": "string"
Expand Down Expand Up @@ -2828,6 +2840,10 @@
"description": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.",
"type": "boolean"
},
"runOnDemand": {
"description": "Specify if a container should start only components that is not referenced by apply,\n\nDefault value is `false`",
"type": "boolean"
},
"sourceMapping": {
"description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.",
"type": "string"
Expand Down
Loading