Open chrislalos opened 4 months ago
Btw I closed this issue mistakenly -- I noticed I'd posted to the etcd
repo, which I thought was a mistake and that it belonged in an etcdctl
specific repo. But it appears everything's under one repo. Sorry for any confusion!
What would you like to be added?
Many etcdctl commands, eg get, put, etc, allow for service discovery via the
--discovery-srv
flag, which indicates the command should lookup the endpoints via DNS SRV records.endpoint health
etc do not work this way. They ignore the flag entirely.--discovery-srv
is a global flag in etcdctl, and perfectly valid for theendpoint
commands, but it is silently ignored, even though the intent of the user to use--discovery-srv
is clear.At the least, I'd like a warning that I need to explicitly specify endpoints with the
--endpoints
flag.What I'd really like is for the
endpoint
commands to actually use--discovery-srv
consistently with other commands. From looking at the code, this is non-trivial. Most commands usemustClientFromCmd()
which abstract the SRV lookup so it happens transparently to the command implementation. Theendpoint
commands don't do this, which makes sense since they are checking the health of API endpoints, not calling the API itself. But an implementation should still be possible, and perhaps it wouldn't be too challenging.Why is this needed?
Because ... Consistency is Nice