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
Separate UI #1469
Separate UI #1469
Conversation
gitops.dockerfile
Outdated
COPY Makefile /app/ | ||
COPY tools /app/tools | ||
WORKDIR /app | ||
RUN make dependencies |
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.
Do we really need to add make dependencies here? This is the one that starts using sudo inside your 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.
fixed
92e81ee
to
69e7db2
Compare
This will be moved to a standalone binary
We want to remove the `ui run` command and create a separate binary which will run the gitops ui. This (very brutishly) copies the existing ui run code over the gitops-server code to be used as a separate binary. The gitops-server is being over-written as it was apparently created as a convenience for developing the UI. As part of this work that should become obsolete as a pattern and be replaced by the actual UI binary
To separate out the UI components from the cli tool we need to update the makefile to generate the dist/ui files in the `gitops-server` rather than `gitops` directories. This additionally changes to using a pattern-rule target to generate the go binaries so that the same command can be used shared.
The `ui` command will display information on how to access the gitops server and/or establish port-forwarding for it. This placeholder preserves this extension point
We will need a docker image of the server component in order to deploy it to k8s. It's less clear that a docker image of the cli component is needed but is likely useful in some circumstances (e.g. local testing without installation). This creates two docker files, one for the cli and another for the server.
Main change is the removal of browser and isatty becoming indirect.
This may be removed soon but until then it's needed for the cli tool to run
@JamWils @katya-makarevich @dlopro not sure who else I should ask to review this |
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.
just a very minor comment, LGTM
What changed?
Remove the
ui run
command and replace with a separate server binaryWhy?
How did you test it?
The binaries build and successfully host the UI/operate on the CLI.
Release notes
This is a breaking change that removes the
ui run
command (theui
command has been replaced with a placeholder that can be extended to help access the ui).Main questions/decisions to focus on for review
I've mostly left the Go code intact as I'm not so confident there and it feels like more of that will be wanted by the observability folks.
This means the focus of a lot of this has been around dockerfiles and the makefile. The later especially as the next bit of work I have is to tidy it up further. To that end I have some questions about how comfortable folks are with various usages of makefiles:
cmd/gitops/ui/run/dist/
,cmd/gitops/ui/run/dist/index.html
andcmd/gitops/ui/run/dist/index.js
targets?bin/%: cmd/%/main.go
) to reduce repetition or are they more overhead than is worth it?