fix: clean up member alarms and resources during deletion #506
Before we remove the cluster finalizer, we need to clean up the certificates/secrets if not yet.
nice to move it into TestScale.
The implementation of this test seems a little complicated and worse readability.
Please consider simplifying it if possible.
Please also rebase this PR. I just merged https://github.com/etcd-io/etcd-operator/pull/505
Please also rebase this PR. I just merged #505
All resolved, PTAL.
There is one potential bug here. If previous the controller crashes or interrupted for some reason after previous step removeEtcdNode, but before this step, then it will never be able to disalarmed, because you won't be able to fine the etcdNode anymore.
Two solutions:
No matter which way, we need to ensure the EtcdMember.Status is updated in one centralized place in a generic way, probably in a deferred function in reconcileEtcdMember . Let's get this resovled first in a followup first, and then evaluate how to resolve the above issue.
LGTM with one comment, let's resolve it in a followup PR.
thx
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: <a href="https://github.com/etcd-io/etcd-operator/pull/506#pullrequestreview-5142987057" title="Approved">ahrtr</a>, <a href="https://github.com/etcd-io/etcd-operator/pull/506#" title="Author self-approved">silentred</a>
The full list of commands accepted by this bot can be found here.
The pull request process is described here
<details >
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
</details>
<!-- META={"approvers":[]} -->
Good catch!
ahrtr
silentred
Changes as per https://github.com/etcd-io/etcd-operator/issues/471#issuecomment-5573767115:
TestNormalMemberProvisioningand add cases toTestScaling/cc @ahrtr