Skip to content

Commit 899b16e

Browse files
committed
Cleanup
1 parent 820f283 commit 899b16e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

components/ws-daemon/pkg/content/hooks.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import (
2323
)
2424

2525
// WorkspaceLifecycleHooks configures the lifecycle hooks for all workspaces
26-
func WorkspaceLifecycleHooks(cfg Config, workspaceExistenceCheck WorkspaceExistenceCheck, uidmapper *iws.Uidmapper, xfs *quota.XFS, cgroupMountPoint string) map[session.WorkspaceState][]session.WorkspaceLivecycleHook {
26+
func WorkspaceLifecycleHooks(cfg Config, workspaceNetworkCIDR string, workspaceExistenceCheck WorkspaceExistenceCheck, uidmapper *iws.Uidmapper, xfs *quota.XFS, cgroupMountPoint string) map[session.WorkspaceState][]session.WorkspaceLivecycleHook {
2727
// startIWS starts the in-workspace service for a workspace. This lifecycle hook is idempotent, hence can - and must -
2828
// be called on initialization and ready. The on-ready hook exists only to support ws-daemon restarts.
29-
startIWS := iws.ServeWorkspace(uidmapper, api.FSShiftMethod(cfg.UserNamespaces.FSShift), cgroupMountPoint, cfg.WorkspaceCIDR)
29+
startIWS := iws.ServeWorkspace(uidmapper, api.FSShiftMethod(cfg.UserNamespaces.FSShift), cgroupMountPoint, workspaceNetworkCIDR)
3030

3131
return map[session.WorkspaceState][]session.WorkspaceLivecycleHook{
3232
session.WorkspaceInitializing: {

components/ws-daemon/pkg/daemon/daemon.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ func NewDaemon(config Config) (*Daemon, error) {
194194

195195
hooks := content.WorkspaceLifecycleHooks(
196196
contentCfg,
197+
config.Runtime.WorkspaceNetworkCIDR,
197198
func(instanceID string) bool { return true },
198199
&iws.Uidmapper{Config: config.Uidmapper, Runtime: containerRuntime},
199200
xfs,

0 commit comments

Comments
 (0)