Skip to content

Commit 1f87eb9

Browse files
committed
remove duplicate import in DWO controller
Signed-off-by: Andrew Obuchowicz <[email protected]>
1 parent b5a2b00 commit 1f87eb9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

controllers/workspace/devworkspace_controller.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import (
2727
"github.com/devfile/devworkspace-operator/controllers/workspace/metrics"
2828
"github.com/devfile/devworkspace-operator/pkg/common"
2929
"github.com/devfile/devworkspace-operator/pkg/conditions"
30-
"github.com/devfile/devworkspace-operator/pkg/config"
3130
wkspConfig "github.com/devfile/devworkspace-operator/pkg/config"
3231
"github.com/devfile/devworkspace-operator/pkg/constants"
3332
"github.com/devfile/devworkspace-operator/pkg/library/annotate"
@@ -691,7 +690,7 @@ func (r *DevWorkspaceReconciler) dwPVCHandler(obj client.Object) []reconcile.Req
691690

692691
// TODO: Label PVCs used for workspace storage so that they can be cleaned up if non-default name is used.
693692
// Otherwise, check if common PVC is deleted to make sure all DevWorkspaces see it happen
694-
if obj.GetName() != config.GetGlobalConfig().Workspace.PVCName || obj.GetDeletionTimestamp() == nil {
693+
if obj.GetName() != wkspConfig.GetGlobalConfig().Workspace.PVCName || obj.GetDeletionTimestamp() == nil {
695694
// We're looking for a deleted common PVC
696695
return []reconcile.Request{}
697696
}
@@ -717,7 +716,7 @@ func (r *DevWorkspaceReconciler) dwPVCHandler(obj client.Object) []reconcile.Req
717716
func (r *DevWorkspaceReconciler) SetupWithManager(mgr ctrl.Manager) error {
718717
setupHttpClients()
719718

720-
maxConcurrentReconciles, err := config.GetMaxConcurrentReconciles()
719+
maxConcurrentReconciles, err := wkspConfig.GetMaxConcurrentReconciles()
721720
if err != nil {
722721
return err
723722
}
@@ -726,7 +725,7 @@ func (r *DevWorkspaceReconciler) SetupWithManager(mgr ctrl.Manager) error {
726725
return []reconcile.Request{}
727726
}
728727

729-
var configWatcher builder.WatchesOption = builder.WithPredicates(config.Predicates())
728+
var configWatcher builder.WatchesOption = builder.WithPredicates(wkspConfig.Predicates())
730729

731730
// TODO: Set up indexing https://book.kubebuilder.io/cronjob-tutorial/controller-implementation.html#setup
732731
return ctrl.NewControllerManagedBy(mgr).

0 commit comments

Comments
 (0)