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

Feat/longhorn replicas #648

Merged
merged 22 commits into from
Mar 24, 2023
Merged

Feat/longhorn replicas #648

merged 22 commits into from
Mar 24, 2023

Conversation

MiroslavRepka
Copy link
Contributor

This PR fixes #564 by implementing the algorithm, run upon node deletion, which tries to create a new replica for the longhorn volume, if any replicas will be lost due to node deletion.

It also fixes a small bug, when deleting master nodes (case when the API endpoint was not defined).

An additional feature is the introduction of variadic functions for the kubectl package.

@MiroslavRepka MiroslavRepka self-assigned this Mar 20, 2023
@MiroslavRepka MiroslavRepka added bug Something isn't working go Pull requests that update Go code labels Mar 20, 2023
Copy link
Contributor

@MarioUhrik MarioUhrik left a comment

Choose a reason for hiding this comment

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

LGTM, if you've sufficiently tested that the new behavior is as you expect

@MiroslavRepka
Copy link
Contributor Author

I tested it by deploying a cluster, creating a PV and

  • deleting a single node, which holds a replica -> end state was correct
  • deleting multiple nodes, each holding a replica -> end state was correct

I can run some additional tests if you would like @MarioUhrik

@MarioUhrik
Copy link
Contributor

The tests you've done sound sufficient Miro, LGTM

Copy link
Contributor

Choose a reason for hiding this comment

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

had a look, looks great, had some questions/suggestions.

internal/kubectl/kubectl.go Show resolved Hide resolved
services/kuber/server/nodes/nodes.go Outdated Show resolved Hide resolved
services/kuber/server/nodes/nodes.go Outdated Show resolved Hide resolved
Copy link
Contributor

@cloudziu cloudziu left a comment

Choose a reason for hiding this comment

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

LGMT!

Copy link
Contributor

Choose a reason for hiding this comment

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

great stuff, LGTM, thanks @MiroslavRepka! 🚀

services/kuber/server/nodes/nodes.go Outdated Show resolved Hide resolved
@MiroslavRepka MiroslavRepka added this pull request to the merge queue Mar 24, 2023
Merged via the queue into master with commit 6213a9a Mar 24, 2023
@MiroslavRepka MiroslavRepka deleted the feat/longhorn-replicas branch March 24, 2023 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Automatically manage number of longhorn replicas upon node deletion.
4 participants