gitmyhub

confd

Go ★ 8.4k updated 1y ago

Manage local application configuration files using templates and data from etcd or consul

confd is a small Go tool that keeps server config files automatically up to date by reading values from a central store like etcd, Consul, or Vault and rewriting the files whenever values change.

GoetcdConsulRedisVaultZooKeeperAmazon DynamoDBAWS SSMsetup: moderatecomplexity 3/5

confd is a small Go tool that keeps configuration files on a server up to date by reading values from a central data store and writing them into files using templates. When a value in the data store changes, confd notices and rewrites the affected config files, then optionally restarts or reloads the application that depends on those files.

The supported data sources include etcd, Consul, Redis, Vault, ZooKeeper, Amazon DynamoDB, AWS SSM Parameter Store, and plain environment variables. This gives teams flexibility in choosing where they store configuration values, while confd handles the job of translating those values into whatever file format the application expects.

The template system works by writing a template file that refers to keys in the data store, similar to how a web template refers to variables. confd watches the keys, and whenever they change it renders the template with the new values and writes the result to the target file path.

The README is short and points to separate documentation files for installation and a quick-start walkthrough. The project is actively being updated to support newer versions of Go and to clean up older backend code. The etcd v2 backend is being removed in favor of etcd v3, and a few template helper functions that relied on an unmaintained encryption library have been dropped in recent updates.

Building from source requires Go 1.10 or newer. Prebuilt binaries and installation instructions are available in the project's documentation directory. The README notes a community IRC channel on Freenode and a Google Groups mailing list for users who have questions.

Where it fits