• Name: etcd
  • Category: Key-value store

Configuration

Configu needs to be authorized to access your etcd store. You may pass options into the etcd client constructor to configure how the client connects to etcd.

Usage

.configu store declaration

stores:
  my-store:
    type: etcd
    configuration:
      hosts:
        - http://localhost:2379
        - http://localhost:2380
      username: <your-username> # Optional
      password: <your-password> # Optional

CLI examples

Upsert command

configu upsert --store "my-store" --set "test" --schema "./start.cfgu.json" \
    -c "APP_MODE=production" \
    -c "RETRY_COUNT=5"

Eval and export commands

configu eval --store "my-store" --set "test" --schema "./start.cfgu.json" \
 | configu export

Common errors and solutions

  1. Connection timeout

    • Solution: Ensure the hosts URLs are reachable from your application. Increase the timeout value if the network latency is high.
  2. Authentication failure

    • Solution: If authentication is enabled, verify the provided username and password. Test with:
      etcdctl --user <username>:<password> endpoint status
      
  3. Cluster unavailability

    • Solution: Ensure that all nodes in the etcd cluster are healthy. Use the following command to check cluster health:
      etcdctl endpoint health
      
  4. Key collision issues

    • Solution: Use unique keys or prefixes for different configuration sets to avoid conflicts.

References