Skip to content

Replace Static "Not Installed" Message with Installation Diagnostics Panel - #58

Open
atharrva01 wants to merge 4 commits into
inspektor-gadget:mainfrom
atharrva01:feat/installation-diagnostics
Open

Replace Static "Not Installed" Message with Installation Diagnostics Panel#58
atharrva01 wants to merge 4 commits into
inspektor-gadget:mainfrom
atharrva01:feat/installation-diagnostics

Conversation

@atharrva01

Copy link
Copy Markdown
Contributor

Summary

Right now, if any pod check fails, we just show "Inspektor Gadget is not installed" with a docs link. This is unhelpful because pods could be crashing, stuck in CrashLoopBackOff, or partially deployed, but the UI just says "not installed." Users have to jump to kubectl to figure out what's actually wrong.

What I Changed

Added a basic diagnostics panel that checks:

  • Namespace exists (gadget)
  • DaemonSet status (desired vs ready replicas)
  • Pod health (crash loops, image pull errors, pending)
  • Node coverage (are gadget pods on all schedulable nodes?)

Each check shows pass/warn/fail with details you can expand. Way more useful than a static error message.

Why This Helps

Instead of guessing, users can now see if IG is actually missing vs just misconfigured or failing to start.

Testing

Built locally, ran tsc --noEmit and npm run lint. All good.

image

@atharrva01

Copy link
Copy Markdown
Contributor Author

hi @ashu8912 this PR replaces the static “Inspektor Gadget is not installed” message with an installation diagnostics panel that performs checks (namespace, DaemonSet, pod health, node coverage) and surfaces actionable troubleshooting information directly in the Headlamp UI.

@atharrva01 atharrva01 changed the title feat: add installation diagnostics with prerequisite checks Replace Static "Not Installed" Message with Installation Diagnostics Panel Mar 8, 2026
@ashu8912
ashu8912 requested a review from Copilot March 18, 2026 17:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces the generic “Inspektor Gadget is not installed” screen with an installation diagnostics panel that surfaces specific cluster/deployment health checks (namespace, DaemonSet, pods, node coverage) to help users understand what’s actually wrong.

Changes:

  • Replaced the static “not installed” message with a new InstallationStatus diagnostics UI.
  • Added Kubernetes checks for namespace existence, DaemonSet readiness, pod health, and node coverage.
  • Added “Copy Diagnostics” and “Re-run Checks” actions to help share troubleshooting context.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
src/common/NotFound/index.tsx Swaps the old static not-installed message for the new diagnostics component.
src/common/InstallationStatus/index.tsx Implements the diagnostics panel UI and wiring to K8s useList data sources.
src/common/InstallationStatus/checks.ts Implements the underlying diagnostic checks and formatting logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/common/InstallationStatus/checks.ts Outdated
Comment thread src/common/InstallationStatus/checks.ts
Comment thread src/common/InstallationStatus/checks.ts Outdated
Comment thread src/common/InstallationStatus/index.tsx Outdated
Comment thread src/common/InstallationStatus/index.tsx Outdated
Comment thread src/common/InstallationStatus/index.tsx Outdated
@atharrva01

Copy link
Copy Markdown
Contributor Author

hey @ashu8912 looking at the co-pilot's review, I have fixed the DaemonSet selection (.find() with k8s-app=gadget instead of [0]), scoped Pod.useList() to IG_NAMESPACE which also fixes the namespace leak in checkPodHealth and checkNodeCoverage, added .catch() on clipboard, and tightened StatusIcon to CheckResult['status'].

Skipped prop-hoisting for now, this only renders when IG isn't installed so not a hot path, happy to do it as a follow-up.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces the generic “Inspektor Gadget is not installed” message with an Installation Diagnostics panel that surfaces likely deployment/health issues (namespace/DaemonSet/pods/node coverage) directly in the UI, reducing the need to switch to kubectl.

Changes:

  • Replaced the IGNotFound static message with the new InstallationStatus diagnostics view.
  • Added a new diagnostics UI (overall banner + expandable per-check results + copy-to-clipboard + retry).
  • Implemented installation/health check functions for namespace, DaemonSet readiness, pod health, and node coverage.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/common/NotFound/index.tsx Switches “not installed” fallback to render InstallationStatus.
src/common/InstallationStatus/index.tsx Adds the diagnostics panel UI, check rendering, copy diagnostics, and retry action.
src/common/InstallationStatus/checks.ts Adds the underlying diagnostics checks and formatting utilities.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/common/InstallationStatus/index.tsx Outdated
Comment thread src/common/InstallationStatus/index.tsx
Comment thread src/common/InstallationStatus/checks.ts Outdated
Comment thread src/common/InstallationStatus/checks.ts Outdated
@atharrva01

Copy link
Copy Markdown
Contributor Author

hi @ashu8912 , @illume! addressed the remaining copilot suggestions from the second review:

  • Clipboard guard : added an availability check before calling the API, shows an error snackbar if it fails
  • Recalculate button : renamed from "Re-run Checks" since the hooks are live watchers, not fresh fetches
  • Cordoned nodes : checkNodeCoverage now catches spec.unschedulable === true too, so kubectl cordon nodes are properly excluded
  • Pod crash reason : tightened .find() to only match the same states as isCrashing, so ContainerCreating can't sneak in as a crash cause

@atharrva01
atharrva01 force-pushed the feat/installation-diagnostics branch from b5e2776 to 1ff8cec Compare April 8, 2026 04:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/common/InstallationStatus/index.tsx Outdated
Comment thread src/common/InstallationStatus/checks.ts Outdated
Comment thread src/common/InstallationStatus/checks.ts Outdated
Comment thread src/common/InstallationStatus/checks.ts Outdated
Comment thread src/common/InstallationStatus/index.tsx Outdated
Comment thread src/common/InstallationStatus/checks.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/common/InstallationStatus/index.tsx Outdated
Comment thread src/common/NotFound/index.tsx
Comment thread src/common/InstallationStatus/checks.ts
Comment thread src/common/InstallationStatus/checks.ts

@illume illume left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @atharrva01

Much appreciated 🎉

Would you mind having a look at the copilot suggestions?

@atharrva01
atharrva01 requested a review from illume April 8, 2026 15:22
@atharrva01

Copy link
Copy Markdown
Contributor Author

@illume , i've addressed the co-pilot's suggestion....

@illume illume left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks! 🎉

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.

3 participants