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

[bitnami/etcd] Add pre-upgrade hook #31161

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

[bitnami/etcd] Add pre-upgrade hook #31161

wants to merge 19 commits into from

Conversation

pckhoi
Copy link
Contributor

@pckhoi pckhoi commented Dec 26, 2024

Description of the change

Benefits

Benefits are described more extensively in bitnami/containers#75906 but here are the main points:

  • Removing members in pre-upgrade hook is more reliable and with fewer edge cases than in pre-stop hook
  • It is far safer to query other members to know whether the cluster is new than to rely on initialClusterState parameter

Possible drawbacks

  • If during initialization, the member cannot connect to other members because of a network outage then it will think that it is starting a new cluster. However, I don't think there is any good solution there except manual recovery.

Applicable issues

Additional information

⚠️ It's needed to cut a new bitnami/common release and use it in this chart, see #31164

Checklist

  • Chart version bumped in Chart.yaml according to semver. This is not necessary when the changes only affect README.md files.
  • Variables are documented in the values.yaml and added to the README.md using readme-generator-for-helm
  • Title of the pull request follows this pattern [bitnami/<name_of_the_chart>] Descriptive title
  • All commits signed off and in agreement of Developer Certificate of Origin (DCO)

@github-actions github-actions bot added the triage Triage is needed label Dec 26, 2024
@github-actions github-actions bot requested a review from carrodher December 26, 2024 04:49
Signed-off-by: Khoi Pham <pckhoi@gmail.com>
@carrodher
Copy link
Member

Thanks for your contribution!! Just so you know, to run our test suite, separate PRs per chart must be created. In this case, two different PRs are required: one for common and another one for etcd.

@pckhoi
Copy link
Contributor Author

pckhoi commented Dec 26, 2024

Sure, I have just created this one: #31164

Carlos Rodríguez Hernández added 2 commits December 27, 2024 08:33
Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>
Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
@juan131
Copy link
Contributor

juan131 commented Dec 30, 2024

Thanks so much for this great contribution! I added some comments in the associated PR for the container.

pckhoi and others added 5 commits January 4, 2025 18:55
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
…ade hook

Signed-off-by: Khoi Pham <pckhoi@gmail.com>
Signed-off-by: Khoi Pham <pckhoi@gmail.com>
Signed-off-by: Khoi Pham <pckhoi@gmail.com>
Copy link
Contributor

@juan131 juan131 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Please check my comments

bitnami/etcd/templates/preupgrade-hook-job.yaml Outdated Show resolved Hide resolved
bitnami/etcd/templates/preupgrade-hook-job.yaml Outdated Show resolved Hide resolved
bitnami/etcd/templates/preupgrade-hook-job.yaml Outdated Show resolved Hide resolved
bitnami/etcd/templates/preupgrade-hook-job.yaml Outdated Show resolved Hide resolved
bitnami/etcd/templates/preupgrade-hook-job.yaml Outdated Show resolved Hide resolved
bitnami/etcd/templates/preupgrade-hook-job.yaml Outdated Show resolved Hide resolved
bitnami/etcd/templates/preupgrade-hook-job.yaml Outdated Show resolved Hide resolved
bitnami/etcd/README.md Show resolved Hide resolved
pckhoi and others added 5 commits January 14, 2025 19:53
Copy link
Contributor

@juan131 juan131 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few extra minor comments. I'll start doing some tests to double-check we're ready to merge both PRs

bitnami/etcd/templates/preupgrade-hook-job.yaml Outdated Show resolved Hide resolved
bitnami/etcd/templates/preupgrade-hook-job.yaml Outdated Show resolved Hide resolved
bitnami/etcd/templates/preupgrade-hook-job.yaml Outdated Show resolved Hide resolved
pckhoi and others added 2 commits January 16, 2025 09:26
Signed-off-by: Khoi Pham <pckhoi@gmail.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Copy link
Contributor

@juan131 juan131 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks so much for applying the feedback.

We won't merge this PR until we release a new container revision including the changes at bitnami/containers#75906 and we update image.tag in the values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
etcd in-progress verify Execute verification workflow for these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bitnami/etcd] etcd pods are unable to join existing cluster on node drain
5 participants