diff --git a/components/ws-manager/pkg/manager/create.go b/components/ws-manager/pkg/manager/create.go index 20dd8e79c0fde7..0c1445833fdc18 100644 --- a/components/ws-manager/pkg/manager/create.go +++ b/components/ws-manager/pkg/manager/create.go @@ -268,6 +268,7 @@ func (m *Manager) createPVCForWorkspacePod(startContext *startWorkspaceContext) ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-%s", prefix, req.Id), Namespace: m.Config.Namespace, + Labels: startContext.Labels, }, Spec: corev1.PersistentVolumeClaimSpec{ AccessModes: []corev1.PersistentVolumeAccessMode{corev1.ReadWriteOnce}, diff --git a/components/ws-manager/pkg/manager/monitor.go b/components/ws-manager/pkg/manager/monitor.go index 26394554c18533..4548fdca0419e6 100644 --- a/components/ws-manager/pkg/manager/monitor.go +++ b/components/ws-manager/pkg/manager/monitor.go @@ -1131,6 +1131,7 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb ObjectMeta: metav1.ObjectMeta{ Name: pvcVolumeSnapshotName, Namespace: m.manager.Config.Namespace, + Labels: wso.Pod.Labels, }, Spec: volumesnapshotv1.VolumeSnapshotSpec{ Source: volumesnapshotv1.VolumeSnapshotSource{ diff --git a/components/ws-manager/pkg/manager/testdata/cpwp_custom_storage.golden b/components/ws-manager/pkg/manager/testdata/cpwp_custom_storage.golden index 82c679353f99b5..6748fe06fe22e4 100644 --- a/components/ws-manager/pkg/manager/testdata/cpwp_custom_storage.golden +++ b/components/ws-manager/pkg/manager/testdata/cpwp_custom_storage.golden @@ -3,7 +3,20 @@ "metadata": { "name": "ws-test", "namespace": "default", - "creationTimestamp": null + "creationTimestamp": null, + "labels": { + "app": "gitpod", + "component": "workspace", + "gitpod.io/workspaceClass": "gitpodio-pvc", + "gpwsman": "true", + "headless": "false", + "metaID": "foobar", + "owner": "tester", + "project": "", + "team": "", + "workspaceID": "test", + "workspaceType": "regular" + } }, "spec": { "accessModes": [ diff --git a/components/ws-manager/pkg/manager/testdata/cpwp_default_storage.golden b/components/ws-manager/pkg/manager/testdata/cpwp_default_storage.golden index 67ed8370fe43f5..d26feb8fbc7514 100644 --- a/components/ws-manager/pkg/manager/testdata/cpwp_default_storage.golden +++ b/components/ws-manager/pkg/manager/testdata/cpwp_default_storage.golden @@ -3,7 +3,20 @@ "metadata": { "name": "ws-test", "namespace": "default", - "creationTimestamp": null + "creationTimestamp": null, + "labels": { + "app": "gitpod", + "component": "workspace", + "gitpod.io/workspaceClass": "gitpodio-pvc", + "gpwsman": "true", + "headless": "false", + "metaID": "foobar", + "owner": "tester", + "project": "", + "team": "", + "workspaceID": "test", + "workspaceType": "regular" + } }, "spec": { "accessModes": [ diff --git a/components/ws-manager/pkg/manager/testdata/cpwp_from_volume_snapshot.golden b/components/ws-manager/pkg/manager/testdata/cpwp_from_volume_snapshot.golden index ab91543153fef6..b575b5a4685701 100644 --- a/components/ws-manager/pkg/manager/testdata/cpwp_from_volume_snapshot.golden +++ b/components/ws-manager/pkg/manager/testdata/cpwp_from_volume_snapshot.golden @@ -3,7 +3,20 @@ "metadata": { "name": "ws-test", "namespace": "default", - "creationTimestamp": null + "creationTimestamp": null, + "labels": { + "app": "gitpod", + "component": "workspace", + "gitpod.io/workspaceClass": "gitpodio-pvc", + "gpwsman": "true", + "headless": "false", + "metaID": "foobar", + "owner": "tester", + "project": "", + "team": "", + "workspaceID": "test", + "workspaceType": "regular" + } }, "spec": { "accessModes": [ diff --git a/components/ws-manager/pkg/manager/testdata/cpwp_no_class.golden b/components/ws-manager/pkg/manager/testdata/cpwp_no_class.golden index 85a77afde2a5d2..d8835d894532da 100644 --- a/components/ws-manager/pkg/manager/testdata/cpwp_no_class.golden +++ b/components/ws-manager/pkg/manager/testdata/cpwp_no_class.golden @@ -3,7 +3,20 @@ "metadata": { "name": "ws-test", "namespace": "default", - "creationTimestamp": null + "creationTimestamp": null, + "labels": { + "app": "gitpod", + "component": "workspace", + "gitpod.io/workspaceClass": "default", + "gpwsman": "true", + "headless": "false", + "metaID": "foobar", + "owner": "tester", + "project": "", + "team": "", + "workspaceID": "test", + "workspaceType": "regular" + } }, "spec": { "accessModes": [ diff --git a/components/ws-manager/pkg/manager/testdata/cpwp_no_pvc.golden b/components/ws-manager/pkg/manager/testdata/cpwp_no_pvc.golden index 85a77afde2a5d2..c2be9eb9ce2fa7 100644 --- a/components/ws-manager/pkg/manager/testdata/cpwp_no_pvc.golden +++ b/components/ws-manager/pkg/manager/testdata/cpwp_no_pvc.golden @@ -3,7 +3,20 @@ "metadata": { "name": "ws-test", "namespace": "default", - "creationTimestamp": null + "creationTimestamp": null, + "labels": { + "app": "gitpod", + "component": "workspace", + "gitpod.io/workspaceClass": "gitpodio-pvc", + "gpwsman": "true", + "headless": "false", + "metaID": "foobar", + "owner": "tester", + "project": "", + "team": "", + "workspaceID": "test", + "workspaceType": "regular" + } }, "spec": { "accessModes": [