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

Add link buttons from dashboard deployment to epinio app #276

Merged
merged 3 commits into from
Aug 17, 2023
Merged

Add link buttons from dashboard deployment to epinio app #276

merged 3 commits into from
Aug 17, 2023

Conversation

torchiaf
Copy link
Contributor

@torchiaf torchiaf commented Jul 14, 2023

Summary

Fixes #271

List of annotations for Epinio pods:

  • app.kubernetes.io/part-of: epinio
  • app.kubernetes.io/component: epinio
  • epinio.io/created-by
  • epinio.io/app-container

Known issues

rancher/dashboard#9330 fixed in the shell pkg.

@torchiaf torchiaf self-assigned this Jul 14, 2023
@richard-cox richard-cox added this to the v1.10.0 milestone Aug 1, 2023
*
* Backend should provide a reliable list of epinio annotations
*/
return !!Object.keys(ctx.metadata.annotations).find((k) => k.startsWith('epinio.io'));
Copy link
Member

Choose a reason for hiding this comment

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

epinio.io/app-container
epinio.io/created-by

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
@torchiaf
Copy link
Contributor Author

torchiaf commented Aug 2, 2023

@andreas-kupries @mmartin24 This PR will add links from Rancher Manager dashboard to Epinio applications, filtering those pods/jobs created by Epinio.
As per our offline discussion, there are some annotations that can be used to identify epinio object (see also the description).
Could we add other annotations for Epinio services ? I couldn't find any annotations to identify them.

@torchiaf torchiaf marked this pull request as ready for review August 2, 2023 16:02
dashboard/pkg/epinio/index.ts Outdated Show resolved Hide resolved
dashboard/pkg/epinio/index.ts Show resolved Hide resolved
},
invoke(_: ActionOpts, values: any[]) {
const obj = values[0];
const component = this as any;
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to rework this

  • We shouldn't take the user to the standalone epinio UI but to the embedded epinio page. We're trying to add value for the embedded use case, which is avoided if we don't use it
  • At this point we can go on the assumption that the current cluster is an epinio cluster and avoid checking if the ingress exists

So given above we don't need to assume the this context is a component, and avoid using the $store.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, I was pointing to the standalone instance. Fixed


const url = `${ baseUrl }/epinio/c/default/applications/${ epinioNamespace }/${ epinioAppName }`;

window.open(url, '_blank');
Copy link
Member

Choose a reason for hiding this comment

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

Given above this can now take the user to the embedded pages via $route

{
resource: [
// put other epinio application's objects
'apps.deployment',
Copy link
Member

Choose a reason for hiding this comment

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

we can only link from a deployment, pod, or a workload if it is a deployment or pod.

we might be able to do service as well, which goes to a service instance

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will disable services for the moment, even if we could put the link from a service bounded to an application to the application view on Epinio.

Copy link
Member

Choose a reason for hiding this comment

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

'batch.job' can be removed as well

…to Epinio dashboard

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
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.

@@ -284,6 +284,8 @@ epinio:
label: Download Manifest
editFromCommit:
label: Redeploy
goToEpinio:
label: App Details
Copy link
Member

Choose a reason for hiding this comment

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

Didn't spot this before. This should be labelled Epinio App, possibly Epinio Details? Either way, think it should be clearer where the user ends up

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm in favor of Epinio App. Epinio Details i think is too long.

{
resource: [
// put other epinio application's objects
'apps.deployment',
Copy link
Member

Choose a reason for hiding this comment

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

'batch.job' can be removed as well

…able apps

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
@torchiaf torchiaf merged commit 0fcff8c into epinio:main Aug 17, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ui] add link from dashboard deployment to epinio app
2 participants