Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove code duplication in CFOrg/CFSpace controllers #2871

Merged
merged 2 commits into from
Sep 18, 2023

Conversation

danail-branekov
Copy link
Member

@danail-branekov danail-branekov commented Sep 15, 2023

Is there a related GitHub Issue?

#1184

What is this change about?

Introduce reusable namespace related (ns lifecycle, propagating
secrets, rolebindings, etc.) components and wire them into the controllers
themselves

Does this PR introduce a breaking change?

No

Acceptance Steps

No functional change

Depending on the object type `Delete` would delete the object and then
a) if the object is namespace - await its `DeletionTimestamp` to get set
- test env does not actually deletes namespaces
b) if the object is CFOrg or CFSpace with existing underlying namespace
- await their `DeletionTimestamps` to be set as they cannot be deleted
  while the namespace is around (due to testenv)
c) otherwise - await `Get` to start returning a not
found error

There are few cases when synchronous deletion is not desired though, for
example, a test verifying that a webhook would allow deletion. The
object webhook is installed by a defaulter, but in the webhook test
suite there is no object controller to eventually remove the finalizer,
thus the object remains. In those cases a standard client is used.

Co-authored-by: Danail Branekov <[email protected]>
@danail-branekov danail-branekov force-pushed the issues/1184-refactor-orgspace-controllers branch from c57e648 to 586203b Compare September 18, 2023 10:10
@danail-branekov danail-branekov enabled auto-merge (rebase) September 18, 2023 10:11
Introduce reusable namespace related (ns lifecycle, propagating
  secrets, rolebindings, etc.) and wire them into the controllers
  themselves

fixes #1184

Co-authored-by: Georgi Sabev <[email protected]>
Co-authored-by: Danail Branekov <[email protected]>
@danail-branekov danail-branekov merged commit a76a286 into main Sep 18, 2023
7 checks passed
@danail-branekov danail-branekov deleted the issues/1184-refactor-orgspace-controllers branch September 18, 2023 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants