Skip to content

Commit 724a13e

Browse files
committed
Adding volume fields to workspace CRs
1 parent 992da81 commit 724a13e

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

components/ws-manager-api/go/crd/v1/workspace_types.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ type WorkspaceSpec struct {
6262

6363
// the XFS quota to enforce on the workspace's /workspace folder
6464
StorageQuota int `json:"storageQuota,omitempty"`
65+
66+
// Storage configures the backing storage for this workspace
67+
Storage StorageSpec `json:"storageSpec,omitempty"`
6568
}
6669

6770
type Ownership struct {
@@ -166,6 +169,11 @@ func (ps PortSpec) Equal(other PortSpec) bool {
166169
return true
167170
}
168171

172+
type StorageSpec struct {
173+
Volume string `json:"volume"`
174+
MountPath string `json:"mountPath"`
175+
}
176+
169177
// WorkspaceStatus defines the observed state of Workspace
170178
type WorkspaceStatus struct {
171179
PodStarts int `json:"podStarts"`
@@ -188,6 +196,8 @@ type WorkspaceStatus struct {
188196
// +kubebuilder:validation:Optional
189197
Runtime *WorkspaceRuntimeStatus `json:"runtime,omitempty"`
190198

199+
VolumeDevice string `json:"volumeDevice,omitempty"`
200+
191201
LastActivity *metav1.Time `json:"lastActivity,omitempty"`
192202
}
193203

@@ -243,6 +253,11 @@ const (
243253

244254
// NodeDisappeared is true if the workspace's node disappeared before the workspace was stopped
245255
WorkspaceConditionNodeDisappeared WorkspaceCondition = "NodeDisappeared"
256+
257+
// VolumeAttached is true if the workspace's volume has been attached to the node
258+
VolumeAttached WorkspaceCondition = "VolumeAttached"
259+
// VolumeMounted is true if the workspace's volume has been mounted on the node
260+
VolumeMounted WorkspaceCondition = "VolumeMounted"
246261
)
247262

248263
func NewWorkspaceConditionDeployed() metav1.Condition {

components/ws-manager-api/go/crd/v1/zz_generated.deepcopy.go

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gitpod-next-gen

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/workspace/gitpod-next-gen

0 commit comments

Comments
 (0)