-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: move the tenant system namespace inside the tenant #5
Conversation
@@ -90,7 +90,7 @@ var _ = Describe("Creating a new ServiceAccount", func() { | |||
}) | |||
}) | |||
Context("set as owner of the Tenant", func() { | |||
BeforeEach(func() { | |||
BeforeAll(func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that the Tenant system NS is part of the Tenant, every time the Tenant is deleted also the system NS is going to be. Repeting creation and deletion of Tenant for every spec is not good and also, not needed.
bd487c9
to
7206185
Compare
Need to lint 🫠 |
Wait for #7 to be merged and need to rebase on new mainline. |
@prometherion the PR Is now rebased and ready for review 🚀 |
|
||
// Set the Tenant owner reference on the Namespace specified. | ||
func (r *ServiceAccountReconciler) setNamespaceOwnerRef(ctx context.Context, ns *corev1.Namespace, tnt *capsulev1beta2.Tenant) error { | ||
scheme := runtime.NewScheme() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can extract the Scheme from the controller runtime client already injected, if these ones are already registered in the manager setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! TIL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Applied @prometherion PTAL
Signed-off-by: Massimiliano Giovagnoli <[email protected]>
Signed-off-by: Massimiliano Giovagnoli <[email protected]>
Fixes #3