-
Notifications
You must be signed in to change notification settings - Fork 459
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
not send the spec in UpdateStatus #1506
Conversation
What an elegant solution 🧐 |
b69096e
to
132be72
Compare
@@ -39,6 +39,7 @@ func (c *Controller) updateTenantStatusWithRetry(ctx context.Context, tenant *mi | |||
// You can use DeepCopy() to make a deep copy of original object and modify this copy | |||
// Or create a copy manually for better performance | |||
tenantCopy := tenant.DeepCopy() | |||
tenantCopy.Spec = miniov2.TenantSpec{} |
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.
would nil work or do we need an instance of TenantSpec later in the code?
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.
I think nil
will not work, cannot assign nil
to a field of type TenantSpec
(Tenant.Spec).
but yeah, we don't need Spec
later in the code, that is why we are reseting it's value, c.minioClientSet.MinioV2().Tenants(tenant.Namespace).UpdateStatus(ctx, tenantCopy, opts)
only needs the values in the Tenant.Status
struct and ignores all of the other values in the Tenant.Spec
struct.
cheers to @dvaldivia
Partially fixes #1388, the error logs on Console are shown because we (somehow) included the creationTimestamp field under volumeClaimTemplates fields, no more!