MCPcopy Index your code
hub / github.com/Quentin-M/etcd-cloud-operator

github.com/Quentin-M/etcd-cloud-operator @v3.6.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.6.4 ↗ · + Follow
203 symbols 548 edges 28 files 27 documented · 13%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

etcd-cloud-operator

Docker Repository on Quay

Maintained by a former CoreOS engineer and inspired from the etcd-operator designed for Kubernetes, the etcd-cloud-operator automatically bootstraps, monitors, snapshots and recovers etcd clusters on cloud providers.

Used in place of the etcd binary and with minimal configuration, the operator handles the configuration and lifecycle of etcd, based on data gathered from the cloud provider and the status of the etcd cluster itself.

In other words, the operator operator is meant to help human operators sleep at night, while their mysterious etcd data store keeps running safely, even in the event of process, instance, network, or even availability-zone wide failures.

Features

  • Resize: By abstracting cluster management, resizing the cluster becomes straightforward as the underlying auto-scaling group can simply be scaled as desired.

  • Snapshots: Periodically, snapshots of the entire key-value space are captured, from each of the etcd members and uploaded to an encrypted external storage, allowing the etcd (or human) operator to restore the store at a later time, in any etcd cluster or instance.

  • Failure recovery: Upon failure of a minority of the etcd members, the managed members automatically restarts and rejoins the cluster without breaking quorum or causing visible downtime - First by simply trying to rejoin with their existing data set, otherwise trying to join as a new member with a clean state, or by replacing the entire instance if necessary.

  • Disaster recovery: In the event of a quorum loss, consequence of the simultaneous failure of a majority of the members, the operator coordinates to snapshot any live members and cleanly stop then, before seeding a new cluster from the latest data revision available once the expected amount of instances are ready to start again.

  • ACL support: A user can configure the ACL of etcd by providing an init-acl config in the config file. See init-acl.md for more information.

  • JWT auth token support: JWT auth token can be enabled by specifying the jwt-auth-token-config in the config file, similar to the etcd -auth-token flag. The JWT auth token is HIGHLY recommended for production deployment, especially when the init-acl config is also enabled, the JWT auth token can help avoid the potential invalid auth token issue.

The operator and etcd cluster can be easily configured using a YAML file. The configuration notably includes clients/peers TLS encryption/authentication, with the ability to automatically generate self-signed certificates if encryption is desired but authentication is not.

How to try it?

Running a managed etcd cluster using the operator is simply a matter of running the operator binary in a supported auto-scaling group (as of today, AWS and Kubernetes only).

  • Docker: Head over to docs/docker-testing for a single-line local 3-nodes deployment.

  • AWS: A Terraform module is available to easily bring up production-grade etcd clusters managed by the operator within AWS.

  • Kubernetes: A basic Helm chart is available to quickly get started with a 3-nodes StatefulSet.

Extension points exported contracts — how you extend this code

Instance (Interface)
(no doc) [3 implementers]
pkg/providers/asg/asg.go
Provider (Interface)
(no doc)
pkg/providers/asg/asg.go
Provider (Interface)
(no doc)
pkg/providers/snapshot/snapshot.go

Core symbols most depended-on inside this repo

Name
called by 17
pkg/providers/asg/asg.go
URL2Address
called by 13
pkg/etcd/misc.go
Info
called by 12
pkg/providers/snapshot/snapshot.go
TLSEnabled
called by 12
pkg/etcd/misc.go
ForEachMember
called by 11
pkg/etcd/client.go
Join
called by 9
pkg/etcd/server.go
Lock
called by 9
pkg/etcd/client.go
execRemote
called by 8
pkg/tester/client.go

Shape

Method 97
Function 63
Struct 38
Interface 3
FuncType 1
TypeAlias 1

Languages

Go100%

Modules by API surface

pkg/etcd/misc.go21 symbols
pkg/etcd/server.go16 symbols
pkg/tester/stresser.go15 symbols
pkg/etcd/client.go12 symbols
pkg/tester/test_cases.go11 symbols
pkg/providers/asg/asg.go11 symbols
pkg/providers/snapshot/snapshot.go10 symbols
pkg/providers/asg/sts/sts.go9 symbols
pkg/providers/asg/aws/aws.go9 symbols
pkg/providers/snapshot/s3/s3.go8 symbols
pkg/providers/snapshot/metadata.go8 symbols
pkg/providers/snapshot/file/file.go8 symbols

For agents

$ claude mcp add etcd-cloud-operator \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact