Skip to content
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

Replace Octant plugin with React web UI #4640

Closed
antoninbas opened this issue Feb 18, 2023 · 7 comments
Closed

Replace Octant plugin with React web UI #4640

antoninbas opened this issue Feb 18, 2023 · 7 comments
Assignees
Labels
kind/design Categorizes issue or PR as related to design.

Comments

@antoninbas
Copy link
Contributor

antoninbas commented Feb 18, 2023

Describe what you are trying to solve

Octant is no longer maintained. Therefore, we should stop investing any further effort into the Antrea Octant plugin, and we should look for an alternative.
On a side note, it seems that there could be a security risk associated with the way in which we run Octant (as a K8s Pod): vmware-archive/octant#3370

IMO, this is a good thing, as the Octant-based solution was never very useful:

  • not well-integrated / easy to run
  • the Octant API for plugins kept getting changed, leading to deployment issues in case of version mismatch between Octant and the Antrea Octant plugin (typically, the most recent version of Octant could not be used with the most recent version of Antrea)
  • messy dependency management in the plugin go.mod file: the plugin was its own Go module with a dependency on Antrea and a dependency on Octant, both of these modules having a dependency on some version of the K8s modules. It was hard to keep dependencies working and required replace directives in the go.mod
  • not extensible in a way that could provide additional user value: really the only useful capability was Traceflow, and it wasn't worth deploying Octant for (if you needed Traceflow, you could use the antctl CLI or the K8s APIs)

In the words of 1 Reddit user:

The only thing I'd b**** about is, it [Antrea] is meant to integrate with Octant - but Octant it absolutely f***ing useless, and offers zero value... The monitoring feature in Cilium is far more useful.

Describe the solution you have in mind

I suggest that we deprecate and remove the Octant plugin from Antrea, and replace it with a custom web UI.
Below is a screenshot of something I have built using React. Obviously it is just a start, and we could start small and improve over time. Unlike with Octant, it is easy to build functionality & value over time with a custom web UI:

Screenshot 2023-02-17 at 4 26 35 PM

Traceflow is just a place to start, we could expose metrics and flow visibility data:

image

We could also support executing NetworkPolicy recommendation jobs from the UI.

Describe how your solution impacts user flows

IMO, it should be built into Antrea and we should keep it as simple as possible.
We need an extra container which can server the frontend React App, and process API calls from the frontend. This container can be run as its own Deployment or can be included in the antrea-controller Pod.

For a typical user, the steps will be as follows:

  1. deploy the Antrea UI (if separate Deployment, otherwise it can be part of the antrea-controller Pod by default)
  2. run kubectl port-forward <svc name> 8080:<svc port> to expose the Antrea UI locally
  3. visit localhost:8080 in browser to access the UI

Describe the main design/architecture of your solution

antrea-ui

We need to define some authentication mechanism for Antrea UI APIs. Could be password-based (similar to Grafana) or use a K8s bearer token? If the latter, we need to provide a convenient way for users to retrieve a token.

Alternative solutions that you considered

From an API perspective, there are multiple options. The current solution is a custom HTTP API server (part of the Antrea UI container) which in the case of Traceflow will translate the API call into a Custom Resource. Theoretically, the frontend could also access K8s APIs directly, but accessing K8s APIs from the browser is not a common scenario (except when using kubectl proxy). Some UI features (e.g., Network Visibility) require a custom API anyway.

@antoninbas antoninbas added the kind/design Categorizes issue or PR as related to design. label Feb 18, 2023
@vicky-liu
Copy link

Thanks Antonin, + @xliuxu to evaluate the UI solutions.

@antoninbas
Copy link
Contributor Author

@vicky-liu @xliuxu to clarify, I have already implemented a PoC using React + Clarity, with support for Traceflow. I will be presenting it at the community meeting on Monday. I'd be happy to discuss possible UI alternatives at the meeting.

antoninbas added a commit to antoninbas/antrea-ui that referenced this issue Mar 14, 2023
The UI consists of a Golang backend (to server APIs) and a React
TypeScript frontend.

The only supported installation method for the Antrea UI is with
Helm. Until the first release (v0.1.0), installation will require
cloning the repository to access the chart.

See antrea-io/antrea#4640
antoninbas added a commit to antoninbas/antrea-ui that referenced this issue Mar 14, 2023
The UI consists of a Golang backend (to server APIs) and a React
TypeScript frontend.

The only supported installation method for the Antrea UI is with
Helm. Until the first release (v0.1.0), installation will require
cloning the repository to access the chart.

See antrea-io/antrea#4640

Signed-off-by: Antonin Bas <[email protected]>
antoninbas added a commit to antoninbas/antrea-ui that referenced this issue Mar 17, 2023
The UI consists of a Golang backend (to server APIs) and a React
TypeScript frontend.

The only supported installation method for the Antrea UI is with
Helm. Until the first release (v0.1.0), installation will require
cloning the repository to access the chart.

See antrea-io/antrea#4640

Signed-off-by: Antonin Bas <[email protected]>
@ahrkrak
Copy link

ahrkrak commented Mar 24, 2023

Just dropping a pointer to the Headlamp K8s UI project here: https://www.headlamp.dev/ - it has support for plugins, and has been submitted to CNCF for Sandbox. The team is in the #headlamp channel in Kubernetes slack if you want to connect.

antoninbas added a commit to antoninbas/antrea-ui that referenced this issue Mar 24, 2023
The UI consists of a Golang backend (to server APIs) and a React
TypeScript frontend.

The only supported installation method for the Antrea UI is with
Helm. Until the first release (v0.1.0), installation will require
cloning the repository to access the chart.

See antrea-io/antrea#4640

Signed-off-by: Antonin Bas <[email protected]>
@antoninbas
Copy link
Contributor Author

@ahrkrak I appreciate the pointer. I am a bit wary of the plugin model (bad experience with Octant), because breaking API changes can be very painful and it's hard to know ahead of time whether the plugin framework will cover all your use cases. I can see the Headlamp plugin framework as being valuable if you have some CRDs and for which you want to provide a web page, or if you want to customize an existing resource page. However, all the plugin examples are pretty simple, and we have some advanced needs for the Antrea UI. In particular, we need to have a custom backend that can call different APIs (K8s / Antrea APIs).

It's not clear to me that Headlamp supports customizing the backend, or non-K8s APIs.

@ahrkrak
Copy link

ahrkrak commented Mar 24, 2023

Makes sense. Just wanted to make sure you're aware of it.
I think you're right that plug-ins are FE only - you'd have to write a separate backend service currently.

antoninbas added a commit to antrea-io/antrea-ui that referenced this issue Apr 7, 2023
The UI consists of a Golang backend (to server APIs) and a React
TypeScript frontend.

The only supported installation method for the Antrea UI is with
Helm. Until the first release (v0.1.0), installation will require
cloning the repository to access the chart.

See antrea-io/antrea#4640

Signed-off-by: Antonin Bas <[email protected]>
antoninbas added a commit to antoninbas/antrea that referenced this issue Apr 7, 2023
We start updating the documentation to remove some references to Octant
and the plugin, add some pointers to the Antrea web UI, and add some
deprecation notices. The plugin code itself and all the build
infrastructure are preserved, until after the Antrea v1.12 release.

See antrea-io#4640

Signed-off-by: Antonin Bas <[email protected]>
antoninbas added a commit to antoninbas/antrea that referenced this issue Apr 7, 2023
We start updating the documentation to remove some references to Octant
and the plugin, add some pointers to the Antrea web UI, and add some
deprecation notices. The plugin code itself and all the build
infrastructure are preserved, until after the Antrea v1.12 release.

See antrea-io#4640

Signed-off-by: Antonin Bas <[email protected]>
antoninbas added a commit to antoninbas/antrea that referenced this issue Apr 7, 2023
We start updating the documentation to remove some references to Octant
and the plugin, add some pointers to the Antrea web UI, and add some
deprecation notices. The plugin code itself and all the build
infrastructure are preserved, until after the Antrea v1.12 release.

See antrea-io#4640

Signed-off-by: Antonin Bas <[email protected]>
antoninbas added a commit to antoninbas/antrea that referenced this issue Apr 7, 2023
We start updating the documentation to remove some references to Octant
and the plugin, add some pointers to the Antrea web UI, and add some
deprecation notices. The plugin code itself and all the build
infrastructure are preserved, until after the Antrea v1.12 release.

See antrea-io#4640

Signed-off-by: Antonin Bas <[email protected]>
antoninbas added a commit to antoninbas/antrea that referenced this issue Apr 7, 2023
We start updating the documentation to remove some references to Octant
and the plugin, add some pointers to the Antrea web UI, and add some
deprecation notices. The plugin code itself and all the build
infrastructure are preserved, until after the Antrea v1.12 release.

See antrea-io#4640

Signed-off-by: Antonin Bas <[email protected]>
antoninbas added a commit to antoninbas/antrea that referenced this issue Apr 13, 2023
We start updating the documentation to remove some references to Octant
and the plugin, add some pointers to the Antrea web UI, and add some
deprecation notices. The plugin code itself and all the build
infrastructure are preserved, until after the Antrea v1.12 release.

See antrea-io#4640

Signed-off-by: Antonin Bas <[email protected]>
antoninbas added a commit that referenced this issue Apr 25, 2023
We start updating the documentation to remove some references to Octant
and the plugin, add some pointers to the Antrea web UI, and add some
deprecation notices. The plugin code itself and all the build
infrastructure are preserved, until after the Antrea v1.12 release.

See #4640

Signed-off-by: Antonin Bas <[email protected]>
@antoninbas
Copy link
Contributor Author

Antrea UI v0.1.0 is out (https://github.com/antrea-io/antrea-ui/releases/tag/v0.1.0), and the Octant plugin is deprecated in Antrea v1.12. Only remaining item for this issue is to remove the Octant plugin altogether post v1.12.0 release.

@antoninbas antoninbas self-assigned this Apr 25, 2023
jainpulkit22 pushed a commit to urharshitha/antrea that referenced this issue Apr 28, 2023
We start updating the documentation to remove some references to Octant
and the plugin, add some pointers to the Antrea web UI, and add some
deprecation notices. The plugin code itself and all the build
infrastructure are preserved, until after the Antrea v1.12 release.

See antrea-io#4640

Signed-off-by: Antonin Bas <[email protected]>
antoninbas added a commit to antoninbas/antrea that referenced this issue May 26, 2023
The plugin was deprecated in Antrea v1.12 and replaced with the Antrea
UI. It is being removed as of Antrea v1.13.

We remove all references to Octant in the repo, except for a single
disclaimer in docs/octant-plugin-installation.md.

For antrea-io#4640

Signed-off-by: Antonin Bas <[email protected]>
antoninbas added a commit that referenced this issue May 30, 2023
The plugin was deprecated in Antrea v1.12 and replaced with the Antrea
UI. It is being removed as of Antrea v1.13.

We remove all references to Octant in the repo, except for a single
disclaimer in docs/octant-plugin-installation.md.

For #4640

Signed-off-by: Antonin Bas <[email protected]>
@antoninbas
Copy link
Contributor Author

Closing this issue. The Antrea Octant plugin has been removed from the code base.

ceclinux pushed a commit to ceclinux/antrea that referenced this issue Jun 5, 2023
We start updating the documentation to remove some references to Octant
and the plugin, add some pointers to the Antrea web UI, and add some
deprecation notices. The plugin code itself and all the build
infrastructure are preserved, until after the Antrea v1.12 release.

See antrea-io#4640

Signed-off-by: Antonin Bas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/design Categorizes issue or PR as related to design.
Projects
None yet
Development

No branches or pull requests

3 participants