@@ -154,7 +154,7 @@ func NewDaemon(config Config, reg prometheus.Registerer) (*Daemon, error) {
154
154
155
155
var mgr manager.Manager
156
156
if config .WorkspaceController .Enabled {
157
- mgr , err : = ctrl .NewManager (restCfg , ctrl.Options {
157
+ mgr , err = ctrl .NewManager (restCfg , ctrl.Options {
158
158
Scheme : scheme ,
159
159
Port : 9443 ,
160
160
Namespace : config .Runtime .KubernetesNamespace ,
@@ -175,6 +175,7 @@ func NewDaemon(config Config, reg prometheus.Registerer) (*Daemon, error) {
175
175
UIDMapperConfig : config .Uidmapper ,
176
176
ContainerRuntime : containerRuntime ,
177
177
CGroupMountPoint : config .CPULimit .CGroupBasePath ,
178
+ MetricsRegistry : reg ,
178
179
})
179
180
if err != nil {
180
181
return nil , err
@@ -203,30 +204,6 @@ func NewDaemon(config Config, reg prometheus.Registerer) (*Daemon, error) {
203
204
return nil , xerrors .Errorf ("cannot create content service: %w" , err )
204
205
}
205
206
206
- if config .WorkspaceController .Enabled {
207
- log .Info ("enabling workspace CRD controller" )
208
-
209
- contentCfg := config .Content
210
- contentCfg .WorkingArea += config .WorkspaceController .WorkingAreaSuffix
211
- contentCfg .WorkingAreaNode += config .WorkspaceController .WorkingAreaSuffix
212
-
213
- wsctrl , err := controller .NewWorkspaceController (mgr .GetClient (), controller.WorkspaceControllerOpts {
214
- NodeName : nodename ,
215
- ContentConfig : contentCfg ,
216
- UIDMapperConfig : config .Uidmapper ,
217
- ContainerRuntime : containerRuntime ,
218
- CGroupMountPoint : config .CPULimit .CGroupBasePath ,
219
- MetricsRegistry : reg ,
220
- })
221
- if err != nil {
222
- return nil , err
223
- }
224
- err = wsctrl .SetupWithManager (mgr )
225
- if err != nil {
226
- return nil , err
227
- }
228
- }
229
-
230
207
dsk := diskguard .FromConfig (config .DiskSpaceGuard , clientset , nodename )
231
208
232
209
hsts , err := hosts .FromConfig (config .Hosts , clientset , config .Runtime .KubernetesNamespace )
@@ -235,8 +212,7 @@ func NewDaemon(config Config, reg prometheus.Registerer) (*Daemon, error) {
235
212
}
236
213
237
214
return & Daemon {
238
- Config : config ,
239
-
215
+ Config : config ,
240
216
dispatch : dsptch ,
241
217
content : contentService ,
242
218
diskGuards : dsk ,
0 commit comments