-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add --watch support for resource watching #113
base: main
Are you sure you want to change the base?
Conversation
8287bf9
to
a3aeacc
Compare
@eguzki spent a little time on this today, and learned some stuff about goroutines. Would appreciate your thoughts (not done yet). |
69daba0
to
671c604
Compare
early draft of this working with the web ui: Kuadrant/react-policy-topology#7 next: add the --web flag. At some point, we'll update |
Wondering about options to run a web-app container:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, loving this idea.
Let me discuss the implementation at high level with few questions.
Have you considered running the web server from within another goroutine that is listening to some channel for updates? The service would serve a react application that would open websockets locally waiting for topology updates. Hopefully this makes some sense.
The term websocket is an implementation detail IMO. The user only needs to know that the tool can display the topology in a SVG viewer (whatever the OS has a default viewer for .svg files) or run a local webserver and use your browser to display the topology.
We can always go with docker approach, but that looks like heavier approach, starting with the user is required to have docker installed.
Last, the code looks good and by no means I am asking for a big refactor. At the same time, I would like to say that there is room for improvement and have more encapsulated code. I see like two main functionalities, mutually exclusive, that can be encapsulated separately. One is when the user wants to display the topology using SVG viewer and the other one is running some local server (again websockets is the implementation detail for me) and display using the web browser.
Couple of changes TODO (will find time this week):
we'll separately look at a deployable service for kube to do similar to the WS stuff (Basically: have an installable service for a topology service on kube/podman/docker) |
671c604
to
03cbec6
Compare
d7f4a1d
to
42a0f70
Compare
42a0f70
to
59d84ea
Compare
…ebSocket support Signed-off-by: Jason Madigan <[email protected]>
59d84ea
to
11e7ee0
Compare
@eguzki think this is ready for another pass, have paired this back to just adding |
Started working on #111
But then ended up straying into: #110 as well
Summary:
--watch
flag that setups a watcher for a topologyConfigMap
--output / -o
to--svg / -s
(made more sense in my head,output
seemed vague?)--ws
/--svg
/--dot
. If these are combined with--watch
, updates are watched for and the SVG / DOT files are updated until sigintVerifying:
Checkout locally, and
go build
.Example commands: