-
Notifications
You must be signed in to change notification settings - Fork 47
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
Fix etcd resource limits for existing clusters #342
Fix etcd resource limits for existing clusters #342
Conversation
@@ -629,7 +629,8 @@ func (r *EtcdReconciler) syncStatefulSetSpec(ctx context.Context, logger logr.Lo | |||
if !ok { | |||
return nil, fmt.Errorf("container with name %s could not be fetched from statefulset %s", c.Name, decoded.Name) | |||
} | |||
decoded.Spec.Template.Spec.Containers[i].Resources = container.Resources | |||
// only copy requested resources from the existing stateful set to avoid copying already removed (from the etcd resource) resource limits | |||
decoded.Spec.Template.Spec.Containers[i].Resources.Requests = container.Resources.Requests |
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.
Do we still need this piece of code at all? Is this different from what's done when we're reconciling the etcd resource based on current settings in the STS's containers?
It feels weird to have two places responsible for dealing with the Resources, probably Druid should just take what's in the etcd resource and put it into the STS.
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.
From my POV etcd-druid is a separate project that is used in Gardener, but could also be used without it.
Hence, when we reconcile the etcd resource outside of a Gardener reconciliation, we also want to make sure that we do not override resource reservations already set on the stateful set.
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.
Can we move ahead with this PR? The etcd-druid maintainers can still decide to drop the whole code (get recent stfl set, copy resources)
cc @gardener/etcd-druid-maintainers
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'm fine keeping this code in etcd-druid if we think that people using this outside of gardener is a valid and supported usecase. Does this mean we could remove this piece of code in g/g then? It seems to do the exact same thing: copying over existing resource
values from the STS. Currently, this code doesn't do anything, because the values get overwritten by the code above, correct?
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.
yes, there are stakeholders which are/will be using etcd-druid
without gardener
Hi @danielfoehrKn, |
I think merging this will trigger a rollout of the STS – is it safe to include this in a patch release? We probably should release this as a new minor version, but I'm not sure what your general policy here is? |
I have released druid patch |
In general we should try to minimize etcd restarts if possible on our live landscapes (until we have multi-node etcd). |
yes, etcd-druid
I don’t think so that’s why I asked hours before releasing druid. #342 (comment) |
But then we still could bring it in as druid |
so you want another patch release of druid with this PR @dguendisch ? |
I think it makes sense, this hit us last week, if we don't bring it in with another patch release in time, we add another etcd restart afterwards, so I'd say yes, please bring it in now with another patch release. |
cc @shafeeqes (g/g release responsible) @ashwani2k @plkokanov do you also want to fix that owner check edge case which we discuss for seed migration ... we can have a backup-restore patch release as well ? |
@ishan16696 If we can add it into a hotfix that would be great. But I will probably be able to fix it tomorrow. |
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.
/approve
@voelzmo Command |
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.
/lgtm
How to categorize this PR?
/kind bug
What this PR does / why we need it:
Makes sure that only that the resource limits of an existing etcd stateful set are not re-used when reconciling the etcd resource.
This makes sure that if the etcd resource specifies no resource limits, that etcd-druid does not add resource limits because the existing etcd statefulset has limits.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note: