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

Update dockerfile #837

Closed

Conversation

KsaweryZietara
Copy link
Contributor

Description

Changes proposed in this pull request:

  • ...
  • ...
  • ...

Related issue(s)
See also #783

szwedm and others added 30 commits August 22, 2024 07:47
* Add interface for cluster object provider

* Interface segregation

* Add context param to interfaces

* Add NamespaceProvider

* Add SecretProvider

* Add ServiceInstanceProvider

* tweaks - use pointers, name changes

* Include ServiceInstanceProvider in SecretProvider

* Get secrets from secret ref in SI

* Fix provider interface

* Fix constructor

* Add NamespaceProvider unit tests

* Fix ServiceInstanceProvider constructor

* Fix secret reference filter

* Add unit tests for service instance provider

* Fix secrets fetching

* Log warning when SecretProvider does not find btp operator secrets

* Add SecretProvider unit tests

* Apply suggestions from code review
* Run components in separate goroutines

* Separate components

* Pass pointers of parsed config values to setupManager

* Add if to print secrets name and namspace when SecretList is not empty

* Check SI CRD existance before fetching secrets

* Add logs for debug
* Add SM client

* Get secret for SM http client

* Build HTTP client for Service Manager

* Add method to fetch service offerings

* Add method to fetch service offerings

* Add Common struct with fields common to all SM objects

* Add ServiceOffering struct

* Add method to extract ServiceOffering metadata fields values

* Adjustments for running in main

* nil checks and log improvements

* Add method for setting client for given secret

* Fix not found error return

* Fix tests after adding ServiceInstance CRD existence check

* go mod tidy and goimports

* Handle k8s not found error when default secret does not exist
Add unit test for Service Manager client and ServiceOfferings endpoint
…ect#714)

Fix not responding api after remove gorilla mux by go http
…-project#717)

* Add ServicePlan struct

* wip

* Service Offering with plans request

* Add struct tags for plans in Service Offering details

* Add fake service plans

* Add unit test for service offering details and plans for given service offering ID

* Fix typos

* Refactor URL query for Service Plans
add service offerings support
* Serve frontend from go

* Build UI static files

* Change metrics server port

* Add API config fields in deployment

* Fix serving API on 8080 port

* Add makefile rule to build ui

* Change the order of makefile rules

* eslint

* eslint

* Fix dockerfile copy

* Add doc describing how to deploy BTP Manager with UI

* Fix docs

* Add cleanup info, prerequisites info and fix formatting

* Typos

* Apply suggestions from doc review

Co-authored-by: Iwona Langer <iwona.langer@sap.com>

* Rename ui.md to 09-10-ui.md

---------

Co-authored-by: Iwona Langer <iwona.langer@sap.com>
* sm ui service offerings and plans
* rm internal/ from gitignore

* Add Operation struct

* Add ServiceInstance struct

* ServiceInstances path const

* Change the field name in collections of SM objects to Items

* GET Service Instances

* GET Service Instance by ID

* Add SI, Error structs for SM responses

* POST Service Instance

* Refactor http response body reading

* DELETE Service Instance

* PATCH Service Instance

* GET Service Instance params

* Add fake SI JSONs for tests

* GET Service Instances test

* GET Service Instance by ID test

* POST Service Instance test

* Refactor SM client unit test to use typed structs instead of generic maps

* PATCH Service Instance test

* DELETE Service Instance by ID test
…kyma-project#735)

* wip

* wip

* wip

* Rebase and sort imports

* wip

* Fix fetching structs fields

* Fix ServiceBinding struct

* GET Service Instances in API

* CRUD Service Bindings

* GET Service Plan by ID in SM client

* GET Service Instance by ID in API

* Revert temp changes

---------

Co-authored-by: Marcin Szwed <marcin.szwed@sap.com>
Co-authored-by: Ksawery Zietara <Ksawery.Zietara@sap.com>
…ct#746)

* Simple Instances Loading Based on Offerings

* Linter

* Testing Corrections

* Interfaces, Mocks, AttachRoutes Extraction

* ListInstances Test

* Add Missing Dependency

* Linter

* Code Duplication Removal

Removed code duplication pointed out in kyma-project#746 (comment).

* Corrected Want to Expected

Corrected want to expected as pointed out in kyma-project#746 (comment)

* Corrected Want to Expected

Corrected want to expected as pointed out in kyma-project#746 (comment)

* Missing Test

Added test suggested in kyma-project#746 (comment)

* Added Missing Interface Methods and Theirs Rename

* Removed Setting Client By Namespace and Name from the Path

* Linter & Compilation Corrections

* Duplicated Path

* Corrected Test Expectation

* Removed Unnecessary Mock Method

* Removed Unnecessary Import

* Code Review - Test Addition

Added a tests as requested in kyma-project#746 (comment)

* code Review - Added Const with testdata Path

Addressed kyma-project#746 (comment) discussion

* Code Review - Unnecessary IF

The remove if may result in false positives if someone invoked test with empty expected by accident and tested method returned expected as well - addresses kyma-project#746 (comment)
* Service Bindings API

* Extend Client interface
* Switching Between Test Data and API Call

* Extracted Test Data to Separate File
* Add CreateServiceInstance struct

* Refactor API calls for Service Instance with plan name

* POST Service Instance in API

* Remove unnecessary mocks and interfaces

* imports

* Add UpdateServiceInstance request struct

* PATCH Service Instance in API

* Delete Service Instance in API

* Add ClusterID field to CreateServiceInstanceRequest struct

* Comment API tests for refactor in next PR

* Reorganize packages and structs

* Add interface for cluster and namespace scoped provider

* Add before all setup in API tests

* GET Service Instances API test

* Add func to set appropriate dir for fake Service Manager data and remove redundant JSON files

* Extend assertions for GET Service Instances API test

* Add GET Service Instance by ID API test

* Add POST Service Instance API test

* Add DELETE Service Instance API test

* rm not used func from ui

* Add missing labels in create service instance test
…jects (kyma-project#769)

Rename fields and tags in API structs according to SM objects
* UI Unification

* UI Corrections

* API Fields Corrections
* UI Unification

* UI Corrections

* Initial Bindings List

* Correted Query Constrocution

* Temporarly Ignore Not Used Variables

* Temporarly Ignore Not Used Variables

* Added Missing Dependency

* Default Method for Listing Bindings without Filters

* Default Method for Listing Bindings without Filters

* Linter
…ct#772)

* Add interfaces for k8s obj create, delete

* Extend Provider and Deleter interfaces

* Rename providers methods

* mv labels from SI to common

* Add values extract from SB context

* Refactor converter to SB

* Add secrets operations related to SBs in API

* Separate interfaces

* Enhance SecretProvider to implement Manager interface

* Add GetAllByLabels method in NamespaceProvider

* Add GetAllByLabels method in ServiceInstanceProvider

* Add labels to logs

* Implement Manager interface in FakeSecretManager

* Fix expected namespaces number in assertion

* Fix SecretManager obj occurrences and provide more unit tests

* Fix references to SecretManager

* Add GET Service Bindings API test

* Add GET Service Binding by ID API test

* Add POST Service Binding API test

* Add DELETE Service Binding by ID API test

* Restore defaults in fake Service Manager after tests which change the data
* React Router

* Renamed Layout File

* Router Dependencies & Webcomponents Update
* Create Binding Form

* Missing Imports

* Status Message Component

* Test Data Update
…kyma-project#782)

* Create Instance Form - Labels and Parameters

* Busy Indicators
ralikio and others added 21 commits August 22, 2024 07:47
* Corrected Doc Order

* Review Corrections

* Update docs/contributor/09-10-ui.md

Co-authored-by: Iwona Langer <iwona.langer@sap.com>

* Update docs/contributor/09-10-ui.md

Co-authored-by: Iwona Langer <iwona.langer@sap.com>

* Update docs/contributor/09-10-ui.md

Co-authored-by: Iwona Langer <iwona.langer@sap.com>

* Update docs/contributor/09-10-ui.md

Co-authored-by: Iwona Langer <iwona.langer@sap.com>

---------

Co-authored-by: Iwona Langer <iwona.langer@sap.com>
…ma-project#794)

* Add secret's name and namespace fields into CreateServiceBinding request

* Set secret's name and namespace based on the request

* Add unit test for POST Service Binding with JSON object in credentials
Mechanics Corection for Dialog and Status Messages
* Add cluster id label to secret if it has value in SB

* Add Secret's name and namespace in the response for SB

* Get secret for given service binding ID from the cluster

* Add unit tests for GET Service Binding(s) with available secret

* Revert timeouts in tests

* Fix service instance ID in unit test

* Remove unused objs

* Adjust NumItems field for returned ServiceBindings in test
…nd Fixes for List Addition/Removal (kyma-project#803)

* Review Remarks

* Renamed API Fields

* Corrected Status Message Placement

* Renamed Properties to Match API Data

---------

Co-authored-by: Marcin Szwed <marcin.szwed@sap.com>
…ct#812)

* Fix fetching secrets in GET Service Bindings

* Fix secret creation in POST Service Binding

* Fix assertion in test
* Load secrets onClick

* Switch secret

* When pressing button only fetch

* Dynamic instance list
* Setting Page Title from Within Route Component

Added title attribute to Layout component to show information about which view is currently active.

* Removing Unnecessary Imports

* CSS Update for Object Page

Forced display property to be set to inline instead of grid to allow title `block` placement before the `Secrets` view.

Added a 1rem padding to put some space between the title and the top of an ObjectPage.
* Conditional Rendering of Navigation and Router Outlet

If secrets was not loaded correctly use empty string to showcase it and hide Layout components to block any user action.

* Prevent Infinite Loader

setLoading was not invoked correctly with false value when props contained incorrect values. Such implementation resulted in infinite loading indicator.

* Removed Unnecessary Comments

* Move Error Message Outside of the renderData Method

If mentioned IllustratedMessage is put inside of renderData method then ui5.Menu complains about calling `length` on undefined.

* Moved loadSecrets to useEffect Method

* Expand Error Message to Occupy Full Parent Height
Corrected Placement and Size of NoEntries Message

Previously the message was displayed inside of a table resulting in its unatural placement with "Auto" size making it too big. Now the message is smaller and centered in the view.
* Minimum Delay on Busy Indicator

Setting delay attribute's value to 1 to minimize time needed for Busy indicator to appear.

* Clearing Instance Between Dialog Reloads

Previously, when opening dialog for am instance with bindings before doing the same for an instance without bindings dialog kept data for the former one. Clearing instances and bindings list data prevents this behaviour.

* Corrected Loading State

Removed unnecessary `setLoading(false)` invocations not to turn BusyIndicator off too soon.

* Correct CSS for Object Page and Busy Indicator

Display ObjectPageContent with additional top padding. Center busy indicator by setting its display property to `block`.
* Block SB creation when secret exists

* Add unit test for POST SB when secret exists

* go mod tidy
* Show secret connection status to SM

* Add check if secret was not deleted during loading

* Fix linter
* Added Generic UI Mapping

The following solution is adaption of https://stackoverflow.com/a/64687181 to provide default route to ui app if the file server does not contain given path. The file server returns 404 path if requested path does not correspond to any files in its filesystem. Because of that while routing request to our single page app (e.g. path "/instances/{id}") the request was handled by file server and not by the app itself (which corresponds to `index.html`). The solution routes existing paths, like "/static/*", to the file server and non existing, like "/instances/{id}", to the app frontend.

* Linter
@KsaweryZietara KsaweryZietara added the kind/enhancement Categorizes issue or PR as related to modifying or improving an existing feature label Aug 22, 2024
@KsaweryZietara KsaweryZietara self-assigned this Aug 22, 2024
@KsaweryZietara KsaweryZietara requested review from a team as code owners August 22, 2024 10:51
@kyma-bot kyma-bot added the area/documentation Issues or PRs related to documentation label Aug 22, 2024
@kyma-bot kyma-bot added the cla: yes Indicates the PR's author has signed the CLA. label Aug 22, 2024
Copy link

Add one of following labels

- kind/feature -> Use it when you want to submit a new feature

- kind/enhancement -> Use it when you modify or improve an existing feature

- kind/bug -> Use it when you fix a bug

@kyma-bot kyma-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Issues or PRs related to documentation cla: yes Indicates the PR's author has signed the CLA. kind/enhancement Categorizes issue or PR as related to modifying or improving an existing feature size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants