From a13981d3ea7c317a1eb5fe3e9e34c5812deae625 Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Tue, 19 Mar 2024 20:24:56 +0200 Subject: [PATCH] fixup! fixup! Update controllers/workspace/eventhandlers.go --- controllers/workspace/eventhandlers.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/controllers/workspace/eventhandlers.go b/controllers/workspace/eventhandlers.go index f807ca3f2..d0bb00a41 100644 --- a/controllers/workspace/eventhandlers.go +++ b/controllers/workspace/eventhandlers.go @@ -69,9 +69,9 @@ func (r *DevWorkspaceReconciler) dwPVCHandler(obj client.Object) []reconcile.Req } pvcLabel := obj.GetLabels()[constants.DevWorkspacePVCTypeLabel] - // No need to reconcile if PVC is being deleted, or it doesn't have a PVC type label. - // However, since it is possible for PVCs to not have such label, - // we will handle this PVC if it has a name that correspons with PVC name in global config + // No need to reconcile if PVC is being deleted, or it doesn't have a PVC type label. + // However, since it is possible for PVCs to not have such label, + // we will handle this PVC if it has a name that correspons with PVC name in global config // see comments to https://github.com/devfile/devworkspace-operator/pull/1233/files if pvcLabel != "" { if obj.GetName() != wkspConfig.GetGlobalConfig().Workspace.PVCName { @@ -97,10 +97,10 @@ func (r *DevWorkspaceReconciler) dwPVCHandler(obj client.Object) []reconcile.Req r.Log.Info("Couldn't fetch external config for workspace %s, using PVC Name from global config instead", err.Error()) } storageType := workspace.Spec.Template.Attributes.GetString(constants.DevWorkspaceStorageTypeAttribute, nil) - if (storageType == constants.CommonStorageClassType || storageType == constants.PerUserStorageClassType) { + if storageType == constants.CommonStorageClassType || storageType == constants.PerUserStorageClassType { workspacePVCName = externalConfig.Workspace.PVCName } - + } if obj.GetName() == workspacePVCName { reconciles = append(reconciles, reconcile.Request{