diff --git a/controllers/controllers/workloads/spaces/controller.go b/controllers/controllers/workloads/spaces/controller.go index 3ab7580f4..7c4ee4540 100644 --- a/controllers/controllers/workloads/spaces/controller.go +++ b/controllers/controllers/workloads/spaces/controller.go @@ -296,6 +296,7 @@ func (c *cfSpaceMetadataCompiler) CompileLabels(cfSpace *korifiv1alpha1.CFSpace) return c.labelCompiler.Compile(map[string]string{ korifiv1alpha1.SpaceNameKey: korifiv1alpha1.OrgSpaceDeprecatedName, korifiv1alpha1.SpaceGUIDKey: cfSpace.Name, + korifiv1alpha1.OrgGUIDKey: cfSpace.Namespace, }) } diff --git a/controllers/controllers/workloads/spaces/controller_test.go b/controllers/controllers/workloads/spaces/controller_test.go index 6af14d667..3e54f63fb 100644 --- a/controllers/controllers/workloads/spaces/controller_test.go +++ b/controllers/controllers/workloads/spaces/controller_test.go @@ -45,6 +45,7 @@ var _ = Describe("CFSpaceReconciler Integration Tests", func() { g.Expect(ns.Labels).To(SatisfyAll( HaveKeyWithValue(korifiv1alpha1.SpaceNameKey, korifiv1alpha1.OrgSpaceDeprecatedName), HaveKeyWithValue(korifiv1alpha1.SpaceGUIDKey, cfSpace.Name), + HaveKeyWithValue(korifiv1alpha1.OrgGUIDKey, cfSpace.Namespace), HaveKeyWithValue(api.EnforceLevelLabel, string(api.LevelRestricted)), )) g.Expect(ns.Annotations).To(HaveKeyWithValue(korifiv1alpha1.SpaceNameKey, cfSpace.Spec.DisplayName))