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

Added Jobs Resource to Linkerd Dashboard along with grafana. #2439

Merged
merged 4 commits into from
Mar 7, 2019
Merged

Added Jobs Resource to Linkerd Dashboard along with grafana. #2439

merged 4 commits into from
Mar 7, 2019

Conversation

Pothulapati
Copy link
Contributor

@Pothulapati Pothulapati commented Mar 3, 2019

#2416 Added Support for jobs resource in the cli parts of linkerd i.e stat, top, routes, etc. This PR adds support for jobs resource in the dashboard along with grafana dashboard for Jobs Resources.

This PR used the emojivoto-job yaml i.e BuoyantIO/emojivoto#63 to create the job resources.

Linkerd Dashboard Home Page

home

home_with_job

Jobs Page

jobspage

TAP

tap

Top Routes

top_routes

Grafana Jobs Dashboard

webjob

outboundjobs

cc @siggy @grampelberg

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
siggy added a commit that referenced this pull request Mar 4, 2019
Signed-off-by: Andrew Seigner <siggy@buoyant.io>
Copy link
Member

@siggy siggy left a comment

Choose a reason for hiding this comment

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

Looking good @Pothulapati ! Needs one fix in the Go code...

web/srv/server.go Show resolved Hide resolved
Copy link
Contributor

@ihcsim ihcsim left a comment

Choose a reason for hiding this comment

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

Looks good. Just one comment and one nit:

The Job parent type isn't showing up in the filter drop-down in the Tap and Top pages.

screenshot_20190304_144706

You can fix it with:

diff --git a/web/app/js/components/util/TapUtils.jsx b/web/app/js/components/util/TapUtils.jsx
index 3b95cdec..5a602979 100644
--- a/web/app/js/components/util/TapUtils.jsx
+++ b/web/app/js/components/util/TapUtils.jsx
@@ -36,7 +36,8 @@ export const tapResourceTypes = [
   "daemonset",
   "pod",
   "replicationcontroller",
-  "statefulset"
+  "statefulset",
+  "job"
 ];

 // use a generator to get this object, to prevent it from being overwritten

As for the nit, would you mind converting grafana/dashboards/job.json to 2-space indentation, to be consistent with all the other dashboard json? Thanks.

@grampelberg
Copy link
Contributor

This looks great! The screenshots are super useful =)

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
@ihcsim
Copy link
Contributor

ihcsim commented Mar 6, 2019

LGTM 👍

@siggy Final thoughts?

siggy added a commit that referenced this pull request Mar 6, 2019
Signed-off-by: Andrew Seigner <siggy@buoyant.io>
Copy link
Member

@siggy siggy left a comment

Choose a reason for hiding this comment

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

Had a couple comments, apologies for not catching them the first time around.

There's a subtle bug in web/app/js/components/util/Utils.js where isResource relies on shortNameLookup to determine whether a string is a resource. This means you'll need to add "job": "job", to shortNameLookup, even though it doesn't actually need a short name.

To validate the fix, observe that the breadcrumb at the top correctly renders as Jobs rather than jobs:

screen shot 2019-03-06 at 10 54 57 am

screen shot 2019-03-06 at 10 32 40 am

web/app/js/index.js Outdated Show resolved Hide resolved
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
siggy added a commit that referenced this pull request Mar 7, 2019
Signed-off-by: Andrew Seigner <siggy@buoyant.io>
Copy link
Member

@siggy siggy left a comment

Choose a reason for hiding this comment

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

Awesome work @Pothulapati!

@siggy siggy merged commit 8f6c63d into linkerd:master Mar 7, 2019
@Pothulapati Pothulapati deleted the jobsdashboard branch March 7, 2019 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants