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

[ui] Supply service chart values when creating a service #300

Merged
merged 9 commits into from
Aug 21, 2023
Merged

[ui] Supply service chart values when creating a service #300

merged 9 commits into from
Aug 21, 2023

Conversation

torchiaf
Copy link
Contributor

@torchiaf torchiaf commented Aug 7, 2023

Summary

Fixes #338
Fixes #296

Technical Notes

Screenshots

View:
image

Create:
image

Edit:
image

@torchiaf torchiaf self-assigned this Aug 7, 2023
@torchiaf torchiaf removed their assignment Aug 8, 2023
Copy link
Member

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the shared epinio i've updated the mysql-dev service to include

    "ingress.enabled":
      type: "bool"
    "ingress.hostname":
      type: "string"
  • clicking the ingress.enabled checkbox doesn't check the box until text is entered in the ingress.hostname field
  • when saving this the service failed to be created (could be that it expects the settings to correlate with helm variables?)
    • Edit - this did eventually deploy. we might not be waiting long enough for the deployed state
  • the detail view (read only edit view) shows quotes for the text
    • image

dashboard/pkg/epinio/edit/services.vue Outdated Show resolved Hide resolved
dashboard/pkg/epinio/edit/services.vue Show resolved Hide resolved
dashboard/pkg/epinio/edit/services.vue Show resolved Hide resolved
dashboard/pkg/epinio/edit/services.vue Outdated Show resolved Hide resolved
@andreas-kupries
Copy link

in the shared epinio i've updated the mysql-dev service to include

    "ingress.enabled":
      type: "bool"
    "ingress.hostname":
      type: "string"
* clicking the ingress.enabled checkbox doesn't check the box until text is entered in the `ingress.hostname` field

* when saving this the service failed to be created (could be that it expects the settings to correlate with helm variables?)
  
  * Edit - this did eventually deploy. we might not be waiting long enough for the deployed state

* the detail view (read only edit view) shows quotes for the text
  
  * ![image](https://user-images.githubusercontent.com/18697775/259103587-8e5a64b9-c503-4ef0-90f9-df5e8bb84c73.png)

Note https://deploy-preview-265--epinio-docs-staging.netlify.app/next/howtos/using_custom_service_values
documenting how the various forms in a charts values.yaml, a service's settings, and the -v options correlate.

Note especially the array and map support.

@torchiaf
Copy link
Contributor Author

torchiaf commented Aug 10, 2023

  • clicking the ingress.enabled checkbox doesn't check the box until text is entered in the ingress.hostname field

I could verify this bug on Service charts, applications chart work fine. Needs investigation

  • when saving this the service failed to be created (could be that it expects the settings to correlate with helm variables?)
    • Edit - this did eventually deploy. we might not be waiting long enough for the deployed state

This is also happening testing main branch, I opened an issue for that: #298

  • the detail view (read only edit view) shows quotes for the text
    • image

The UI correctly sends string values without double quotes, then epinio returns back settings with quoted strings:

  • Request:
    image

  • Response:
    image

It seems to be a regression, needs to double check with the be team and open an issue, in case.

@torchiaf
Copy link
Contributor Author

torchiaf commented Aug 10, 2023

in the shared epinio i've updated the mysql-dev service to include

    "ingress.enabled":
      type: "bool"
    "ingress.hostname":
      type: "string"
* clicking the ingress.enabled checkbox doesn't check the box until text is entered in the `ingress.hostname` field

* when saving this the service failed to be created (could be that it expects the settings to correlate with helm variables?)
  
  * Edit - this did eventually deploy. we might not be waiting long enough for the deployed state

* the detail view (read only edit view) shows quotes for the text
  
  * ![image](https://user-images.githubusercontent.com/18697775/259103587-8e5a64b9-c503-4ef0-90f9-df5e8bb84c73.png)

Note https://deploy-preview-265--epinio-docs-staging.netlify.app/next/howtos/using_custom_service_values documenting how the various forms in a charts values.yaml, a service's settings, and the -v options correlate.

Note especially the array and map support.

I'm opening a new issue to support new array types: #302 .

@torchiaf
Copy link
Contributor Author

torchiaf commented Aug 10, 2023

Thanks @richard-cox , small issues from UI side are fixed. There are a few related pending issues :

Signed-off-by: Francesco Torchia <[email protected]>
Copy link
Member

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's some interesting things going on with the spec (added a comment to #302 (comment)). those don't block this pr though

dashboard/pkg/epinio/models/services.js Outdated Show resolved Hide resolved
};
},

mounted() {
if (this.mode !== 'create') {
this.value.details().then((details: any) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment for service model details.

This will make a http request to fetch the service that we're already viewing. If the user refreshes on the page it'll be the second request to fetch the same service.

If there are scenarios where the settings section is missing we should make the request optional given that scenario (and use epinio/find with force: true when fetching).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced with store function.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's still the issue of making an unneeded second request if the user refreshes on the view or edit service page.

image

Even when navigating here from the list page they will already have the resource.

How come we need to make this request, is there a scenario when information is missing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional find request is done because the custom settings is provided only by /namespaces/{Namespace}/services GET request.
Request to add custom settings to the services list API: epinio/epinio#2519

Copy link
Contributor Author

@torchiaf torchiaf Aug 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@richard-cox we verified that the settings are correctly provided by services list api, and are provided by CreateEditView underneath component: epinio/epinio#2519 (comment)
Given that, I removed the extra request.

@torchiaf torchiaf self-assigned this Aug 17, 2023
@richard-cox richard-cox added this to the v1.10.0 milestone Aug 21, 2023
Copy link
Member

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one comment, then we're good

@torchiaf torchiaf merged commit 834b47e into epinio:main Aug 21, 2023
3 checks passed
@richard-cox richard-cox changed the title [ui] Add/Edit service chart values [ui] Supply service chart values when creating an app Sep 4, 2023
@richard-cox richard-cox added the kind/enhancement New feature or request label Sep 4, 2023
@richard-cox richard-cox changed the title [ui] Supply service chart values when creating an app [ui] Supply service chart values when creating a service Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ui] Supply service chart values when creating a service [ui] Catalog Service is empty
3 participants