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 <moritz.rohrich@suse.com>
smallteeths and others added 12 commits November 6, 2023 16:08
Signed-off-by: Siye Wang <siye@rancher.com>
Signed-off-by: Siye Wang <siye@rancher.com>
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 <james.lu@suse.com>
Mostly removed unnecessary spaces before question marks.

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Volker Theile <votdev@gmx.de>
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
…h spec.image

Fixes: longhorn/longhorn#6685
Fixes: longhorn/longhorn#6841

Signed-off-by: Volker Theile <vtheile@suse.com>
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 <vtheile@suse.com>
Add an "Object Storage" tab for managing object endpoints.

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
Fill out the object endpoint list view with the data received.

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
Fill data into the list and add trivial filter.

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
Make updates of the object endpoint list via websockets actually work.

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
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 <moritz.rohrich@suse.com>
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 <moritz.rohrich@suse.com>
- Rename "object endpoint" to "object store"
- Adjust creation dialogue to match the newest iteration of the
  ObjectStore CRD

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
- 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 <vtheile@suse.com>
- 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 <vtheile@suse.com>
- 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 <moritz.rohrich@suse.com>
- Add colors for states Terminating and Stopped
- Fix websocket: typo in models/objectStore.js

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
Signed-off-by: Volker Theile <vtheile@suse.com>
- 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 <vtheile@suse.com>
Signed-off-by: Volker Theile <vtheile@suse.com>
Signed-off-by: Volker Theile <vtheile@suse.com>
…eleted

Signed-off-by: Volker Theile <vtheile@suse.com>
Signed-off-by: Volker Theile <vtheile@suse.com>
Signed-off-by: Volker Theile <vtheile@suse.com>
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 <moritz.rohrich@suse.com>
- 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 <moritz.rohrich@suse.com>
Add endpoint creation to the object store creation dialogue

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
Signed-off-by: Volker Theile <vtheile@suse.com>
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 <moritz.rohrich@suse.com>
Make the endpoint input component work correctly by letting it propagate
the user input to the parent component

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
- Add sorter
- Init pagination correctly
- Cleanup store handling in objectStorage

Signed-off-by: Volker Theile <vtheile@suse.com>
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 <moritz.rohrich@suse.com>
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 <moritz.rohrich@suse.com>
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 <moritz.rohrich@suse.com>
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 <moritz.rohrich@suse.com>
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 <moritz.rohrich@suse.com>
Fix flickering access/secret keys in create object store dialogue

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
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 <moritz.rohrich@suse.com>
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 <moritz.rohrich@suse.com>
@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 <moritz.rohrich@suse.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: In Review 👀
6 participants