The endpoint
commands should either work with --discovery-srv
or should indicate that they ignore the flag
#17886
Labels
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
The text was updated successfully, but these errors were encountered: