infinyon / fluvio

Lean and mean distributed stream processing system written in rust and web assembly.
https://www.fluvio.io/
Apache License 2.0
2.77k stars 198 forks source link

CLI: customize command to add publicEndpointLocal to SPU #4086

Open sehz opened 4 days ago

sehz commented 4 days ago

publicEndpointLocal is properties attached to SPU metadata. This allow SPU to be look up with different host name. This is useful if SPU can't be reached using default host name. However, currently there is no way to add them.

Proposed new CLI syntax:

$ fluvio cluster spu update-local <id> <host> --port <port> --encryption <encryption>

This will add add new publicEndpointLocal. host properties is mandatory while port and encryption is optional. If not defined, port and encryption is same as publicEndPoint.

Example that well you connect fluvio inside docker container.

$ fluvio cluster spu update-local 5001 host.docker.internal

The fluvio list command then should also publicEndpointLocal as well:

$ fluvio cluster spu list

$> fluvio cluster spu list
  ID       NAME                      STATUS  TYPE         RACK  PUBLIC               PRIVATE               LOCAL           
  5001  custom-spu-5001  Online     "custom"   -          localhost:9010  localhost:9011     host.docker.internal:9010