tg123/sshpiper

Show current upstream config?

pwFoo opened this issue · 7 comments

pwFoo commented

Hi,
I would use sshpiper with docker (swarm). Used an older sshpiper with workdir before. So all configs found in the filesystem. Is it possible to show all configured upstreams by command or filesystem?

tg123 commented

find <path_to_working_dir> -name sshpiper_upstream -exec cat {} \;?

pwFoo commented

I started the new container with docker plugin. Can't find a workingdir used to save the docker upstreams?

tg123 commented

docker plugin does not use any dir
it use container label https://github.com/tg123/sshpiper/tree/master/plugin/docker#container-labels-for-plugin

pwFoo commented

HI @tg123 ,
I know the container labels. And how to show a list of configured (by labels) upstreams :)

tg123 commented

docker ps --format json | jq ?

pwFoo commented

Sorry, I think we talk about different things?
Not list compose / docker labels, output current sshpiperd configuration of upstreams to verify if all containers added to sshpiper.

tg123 commented

docker plugin loads running containers every time when a client is attempting to connect
so you can just ensure container does have labels

if you really want to list them
maybe add a log to dump pipes here

pipes, err := p.listPipes()