Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

[WIP] object endpoint #1

Open
wants to merge 45 commits into
base: object-endpoint
Choose a base branch
from

Conversation

m-ildefons
Copy link

@m-ildefons m-ildefons commented Jul 31, 2023

Longhorn UI: Feature Object Endpoint Management

Create a new section for object endpoint management in the Longhorn UI. In this section, object endpoints (i.e. instances of the s3gw) can be created, managed and deleted.

Related: https://github.com/aquarist-labs/s3gw/issues/541

Bildschirmfoto vom 2023-09-19 13-57-56

Bildschirmfoto vom 2023-09-19 14-18-38

Bildschirmfoto vom 2023-09-19 14-20-37

Bildschirmfoto vom 2023-09-19 14-19-17

Add an "Object Storage" tab for managing object endpoints.

Signed-off-by: Moritz Röhrich <[email protected]>
@m-ildefons m-ildefons requested a review from votdev July 31, 2023 09:28
@m-ildefons m-ildefons self-assigned this Jul 31, 2023
@votdev votdev force-pushed the wip/object-endpoint branch 5 times, most recently from 1aef73b to e6195ba Compare September 13, 2023 07:47
@votdev votdev force-pushed the wip/object-endpoint branch 6 times, most recently from 5f276d9 to ccc9090 Compare November 3, 2023 16:23
smallteeths and others added 12 commits November 6, 2023 16:08
It has a permission denied when running UI image to create tempfs
directory, copy nginx config files to tempfs directory and touch
pid file and change pid file owner.

Ref: 6430

Signed-off-by: James Lu <[email protected]>
Mostly removed unnecessary spaces before question marks.

Signed-off-by: Yarden Shoham <[email protected]>
Co-authored-by: Volker Theile <[email protected]>
Signed-off-by: Yarden Shoham <[email protected]>
According to the nginx docs (http://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_types) the MIME type `text/html` does not need to be mentioned.

Fixes: longhorn/longhorn#7002
Signed-off-by: Volker Theile <[email protected]>
Add an "Object Storage" tab for managing object endpoints.

Signed-off-by: Moritz Röhrich <[email protected]>
Fill out the object endpoint list view with the data received.

Signed-off-by: Moritz Röhrich <[email protected]>
Fill data into the list and add trivial filter.

Signed-off-by: Moritz Röhrich <[email protected]>
Make updates of the object endpoint list via websockets actually work.

Signed-off-by: Moritz Röhrich <[email protected]>
Separate out the size input elements from the create volume dialogue and
re-use them in the create object endpoint dialogue.

Signed-off-by: Moritz Röhrich <[email protected]>
m-ildefons and others added 20 commits November 6, 2023 16:09
Create a stub dialogue for editing object endpoints.

Signed-off-by: Moritz Röhrich <[email protected]>
- Rename "object endpoint" to "object store"
- Adjust creation dialogue to match the newest iteration of the
  ObjectStore CRD

Signed-off-by: Moritz Röhrich <[email protected]>
- Change icon to something that looks like the AWS S3 logo (https://www.google.com/search?tbm=isch&as_q=aws+S3+icon), but the Ant icon library (https://ant.design/components/icon) is very limited in that regard.
- Ignore IDE specific files

Signed-off-by: Volker Theile <[email protected]>
- Rename files and variables
- Simplify code
- Add more validators for access and secret key in the "Create Object Store" dialog
- Use <Input.Password> for secret key

Signed-off-by: Volker Theile <[email protected]>
- Add more options to object store creation dialogue
- Organize advanced options in "data locality" and other "advanced
  configuration" to make the dialogue easier to understand
- Propagate default number of replicas from settings

Signed-off-by: Moritz Röhrich <[email protected]>
- Add colors for states Terminating and Stopped
- Fix websocket: typo in models/objectStore.js

Signed-off-by: Moritz Röhrich <[email protected]>
Signed-off-by: Volker Theile <[email protected]>
- Reload list after creating a new ObjectStore
- Add new `Administrate` menu which will redirect to the s3gw-ui
- Disable action menus if necessary

Signed-off-by: Volker Theile <[email protected]>
Signed-off-by: Volker Theile <[email protected]>
Signed-off-by: Volker Theile <[email protected]>
Serve Longhorn UI from /longhorn sub path. This avoids conflicts with
s3gw instances and allows redirecting the browser to the S3 management
UI

Signed-off-by: Moritz Röhrich <[email protected]>
- Fix model function `get` --> `put`
- Fix divider in action menu not having a key and thus throwing a
  warning

Signed-off-by: Moritz Röhrich <[email protected]>
Add endpoint creation to the object store creation dialogue

Signed-off-by: Moritz Röhrich <[email protected]>
Signed-off-by: Volker Theile <[email protected]>
Serve Longhorn UI from /longhorn sub path. This avoids conflicts with
s3gw instances and allows redirecting the browser to the S3 management
UI

Signed-off-by: Moritz Röhrich <[email protected]>
Make the endpoint input component work correctly by letting it propagate
the user input to the parent component

Signed-off-by: Moritz Röhrich <[email protected]>
- Add sorter
- Init pagination correctly
- Cleanup store handling in objectStorage

Signed-off-by: Volker Theile <[email protected]>
Proxy object store UI in the nginx of the Longhorn UI. This allows for
port-forwarding of the Longhorn UI to also access the administrative
interface of the s3gw UI instances

Signed-off-by: Moritz Röhrich <[email protected]>
Disable request body size limit for the object store UI location in the
nginx config. This allows uploading large files through the s3gw UI to
the object store.

Signed-off-by: Moritz Röhrich <[email protected]>
Fix websocket connections in the object store page:
  - Name secrets, settings and objectstores in the data dependency model
  - Fix secrets model by adding state update functions for the websocket
  - Fix footer component
  - Ensure all resource names, types, namespaces etc. match what is
    exposed by the websocket API of the longhorn manager

Signed-off-by: Moritz Röhrich <[email protected]>
Add action menu entry and plumbing for stopping/restarting an object
store. This is useful to allow for certain kinds of volume maintenance
operations, since it stops the workload on the volume backing the object
store.

Signed-off-by: Moritz Röhrich <[email protected]>
Display size and free space of the volume associated with an object
store in the object store view. This makes it easy for users to view the
amount of free space in an object store.

Fix filters in object store view: Allow object stores to be filtered by
their state and endpoints in addition to their name. This makes it easy
for users to find stopped object stores if they have too many to display
on a single page. It also makes it easy to find the object store
associated with a domain name, which otherwise would be hard if the name
of an object store has no relation to the domain name in use.

Signed-off-by: Moritz Röhrich <[email protected]>
Fix flickering access/secret keys in create object store dialogue

Signed-off-by: Moritz Röhrich <[email protected]>
Fix volume expansion:
- don't allow a user to edit the size of an object store and make it
  smaller
- propagate the size from the edit menu to the backend, so the volume
  can be expanded

Fix from backup:
- add an input field to allow populating a new object store with data
  from a previous backup

Signed-off-by: Moritz Röhrich <[email protected]>
remove superfluous getObjectStore function and code path. It is not
needed as there is no detailed view of object stores and the list view
contains all available information

Signed-off-by: Moritz Röhrich <[email protected]>
@vmoutoussamy
Copy link

@votdev please do a review and merge this please.

When deploying an object store, there can be situations where the json
object sent to the API is incorrectly constructed with null values. To
avoid this, construct valid json objects regardless of the setting for
the tls secret and domain name.

Signed-off-by: Moritz Röhrich <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: In Review 👀
Development

Successfully merging this pull request may close these issues.

6 participants