cli, etcd, lib: Add an etcd client over ssh world backend

This provides a new kind of "world" backend, one that runs etcd over an
SSH connection. This is useful for situations where you want to run an
etcd cluster somewhere for clients across the net, but where you don't
want to expose the ports publicly.

If SSH authentication is setup correctly (using public keys) this will
tunnel over SSH for etcd to connect.

This patch does not yet support deploys over SSH, but that should be
fixed in the future as the world code gets cleaned up more.
This commit is contained in:
James Shubin
2025-03-19 05:33:07 -04:00
parent a7a5237b07
commit 02fca6409a
4 changed files with 404 additions and 3 deletions

View File

@@ -52,7 +52,9 @@ import (
// World is an etcd backed implementation of the World interface.
type World struct {
Hostname string // uuid for the consumer of these
// NOTE: Update the etcd/ssh/ World struct if this one changes.
Hostname string // uuid for the consumer of these
// XXX: build your own etcd client...
Client interfaces.Client
MetadataPrefix string // expected metadata prefix
StoragePrefix string // storage prefix for etcdfs storage