Skip to content

Commit a80ee4a

Browse files
Furistoroboquat
authored andcommitted
[ws-manager] Delete workspace CR on stop
1 parent 9d2cba6 commit a80ee4a

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
package v1
66

77
import (
8-
"github.com/gitpod-io/gitpod/common-go/log"
98
corev1 "k8s.io/api/core/v1"
109
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1110
)
@@ -267,11 +266,3 @@ type WorkspaceList struct {
267266
func init() {
268267
SchemeBuilder.Register(&Workspace{}, &WorkspaceList{})
269268
}
270-
271-
func (ws *Workspace) OWI() log.Fields {
272-
return log.Fields{
273-
OwnerField: ws.Spec.Ownership.Owner,
274-
WorkspaceField: ws.Spec.Ownership.WorkspaceID,
275-
InstanceField: ws.ObjectMeta.Name,
276-
}
277-
}

components/ws-manager-mk2/controllers/workspace_controller.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ func (r *WorkspaceReconciler) actOnStatus(ctx context.Context, workspace *worksp
187187
return ctrl.Result{RequeueAfter: 10 * time.Second}, nil
188188
}
189189

190-
// err = r.Client.Delete(ctx, workspace)
191-
// if err != nil {
192-
// return ctrl.Result{Requeue: true}, err
193-
// }
190+
err = r.Client.Delete(ctx, workspace)
191+
if err != nil {
192+
return ctrl.Result{Requeue: true}, err
193+
}
194194
}
195195

196196
return ctrl.Result{}, nil

0 commit comments

Comments
 (0)