kcp-dev / kcp

Kubernetes-like control planes for form-factors and use-cases beyond Kubernetes and container workloads.
https://kcp.io
Apache License 2.0
2.38k stars 383 forks source link

:bug: Terminate kcp process if controller installation fails #3196

Closed embik closed 3 weeks ago

embik commented 1 month ago

Summary

As per discussions on Slack (https://kubernetes.slack.com/archives/C021U8WSAFK/p1730131234224829), it makes sense to let the kcp process crash when it wins a leader election but then fails to install controllers. If this happens, it might hold onto the leader election lock but no controllers are actually running to reconcile objects. By making it crash, we make a new leader election possible.

The leader election package unfortunately doesn't have a "native" way to handle such failures.

Related issue(s)

Fixes #

Release Notes

Purposefully crash if leader election was won but controllers failed to install, allowing another instance to take leadership
kcp-ci-bot commented 1 month ago

LGTM label has been added.

Git tree hash: 2133e7903324a64eb017f8c67f1ad4b6661bfbe9

mjudeikis commented 3 weeks ago

/lgtm /approve

kcp-ci-bot commented 3 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mjudeikis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kcp-dev/kcp/blob/main/OWNERS)~~ [mjudeikis] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment