leader-elector

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2021 License: Apache-2.0

README

Leader Elector

A simple leader election sidecar container for Kubernetes based on the recent client-go library. It aims to provide an alternative to the widely used but outdated election component of kubernetes/contrib.

Configuration Flags

The following arguments can be passed on the command line, or by setting the environment variable named in brackets.

  • election - name of the election and the corresponding lock resource (ELECTION_NAME).
  • namespace - the Kubernetes namespace to run the election in (ELECTION_NAMESPACE).
  • locktype - the leaselock resource type to use for this deployment (ELECTION_TYPE). Supported lock types are:
    • configmaps - default
    • leases
    • endpoints
  • port - the port on which the election sidecar can be queried (ELECTION_PORT).

Example

A working example deployment can be found under example/deployment.yaml

Work in Progress

  • Configurable lock type (LeaseLock, ConfigMap, Endpoint)
  • Make configuration fail safe

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL