Skip to content

Commit

Permalink
Label CFSpace namespace with cloudfoundry.org/org-guid label
Browse files Browse the repository at this point in the history
issue #3439
  • Loading branch information
danail-branekov committed Aug 27, 2024
1 parent d3725aa commit 11e30c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions controllers/controllers/workloads/spaces/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 11e30c5

Please sign in to comment.