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

Support HA with LeaderElection #23

Closed
kerthcet opened this issue Jul 16, 2024 · 5 comments
Closed

Support HA with LeaderElection #23

kerthcet opened this issue Jul 16, 2024 · 5 comments
Labels
feature Categorizes issue or PR as related to a new feature. help wanted Extra attention is needed needs-kind Indicates a PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. needs-triage Indicates an issue or PR lacks a label and requires one.

Comments

@kerthcet
Copy link
Member

We only have one replica for controller right now.

@kerthcet
Copy link
Member Author

/kind feature
/help

@InftyAI-Agent InftyAI-Agent added feature Categorizes issue or PR as related to a new feature. help wanted Extra attention is needed needs-triage Indicates an issue or PR lacks a label and requires one. needs-kind Indicates a PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. labels Jul 16, 2024
@qinguoyi
Copy link
Contributor

llmaz/cmd/main.go

Lines 77 to 94 in b6141a4

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
Metrics: metricsserver.Options{BindAddress: metricsAddr},
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
LeaderElectionID: "fbb36db9.llmaz.io",
// LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily
// when the Manager ends. This requires the binary to immediately end when the
// Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
// speeds up voluntary leader transitions as the new leader don't have to wait
// LeaseDuration time first.
//
// In the default scaffold provided, the program ends immediately after
// the manager stops, so would be fine to enable this option. However,
// if you are doing or is intended to do any operation such as perform cleanups
// after the manager stops then its usage might be unsafe.
// LeaderElectionReleaseOnCancel: true,
})

hi, from the code point of view, LeaderElection is currently supported to support HA. Are there any other requirements? would you mean to add more replica nums?

@kerthcet
Copy link
Member Author

Thanks @qinguoyi for pointing it out, that's true. Then what we left is just make it configurable with helm chart, as well as the Replicas of the controller, here's the values.yaml: https://github.com/InftyAI/llmaz/blob/main/chart/values.global.yaml

Would you like to finish the work? That would be really appreciate, I think it wouldn't take a lot of time.

@qinguoyi
Copy link
Contributor

Thanks @qinguoyi for pointing it out, that's true. Then what we left is just make it configurable with helm chart, as well as the Replicas of the controller, here's the values.yaml: https://github.com/InftyAI/llmaz/blob/main/chart/values.global.yaml

Would you like to finish the work? That would be really appreciate, I think it wouldn't take a lot of time.

tks, i push a PR here,#168

@kerthcet
Copy link
Member Author

Solved by #168

/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Categorizes issue or PR as related to a new feature. help wanted Extra attention is needed needs-kind Indicates a PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. needs-triage Indicates an issue or PR lacks a label and requires one.
Projects
None yet
Development

No branches or pull requests

3 participants