Skip to content

Health check plugin#247

Open
paigerube14 wants to merge 2 commits intokrkn-chaos:mainfrom
paigerube14:health_check_plugin
Open

Health check plugin#247
paigerube14 wants to merge 2 commits intokrkn-chaos:mainfrom
paigerube14:health_check_plugin

Conversation

@paigerube14
Copy link
Copy Markdown
Contributor

Documentation Update

Related Feature:

Please include the branch name where you have made changes or added new features/scenario that we need on the website (e.g., krkn/new_scenario) in the title of this PR.

Changes:
Documenting krkn-chaos/krkn#1176

Signed-off-by: Paige Patton <[email protected]>
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 23, 2026

Deploy Preview for krkn-chaos ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 6ee3fb8
🔍 Latest deploy log https://app.netlify.com/projects/krkn-chaos/deploys/69c195947a03a400086937c9
😎 Deploy Preview https://deploy-preview-247--krkn-chaos.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Add health check plugins documentation and developer guide

📝 Documentation ✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add comprehensive health check plugins documentation for developers
• Document HTTP and KubeVirt health check plugin configurations
• Provide step-by-step guide for creating custom health check plugins
• Add cross-references between health check and developer guide pages
Diagram
flowchart LR
  A["Developers Guide Index"] -->|"links to"| B["Health Check Plugins Guide"]
  B -->|"documents"| C["HTTP Health Check Plugin"]
  B -->|"documents"| D["KubeVirt Health Check Plugin"]
  B -->|"guides creation of"| E["Custom Health Check Plugins"]
  C -->|"cross-references"| F["HTTP Health Checks Page"]
  D -->|"cross-references"| G["KubeVirt Checks Page"]
  F -->|"links to"| B
  G -->|"links to"| B
Loading

Grey Divider

File Changes

1. content/en/docs/developers-guide/_index.md 📝 Documentation +2/-1

Add health check plugins to developer guide index

• Add new entry for health check plugins documentation
• Reorder developer guide sections to include health check plugins before testing
• Update section numbering from 3 to 4 for testing changes

content/en/docs/developers-guide/_index.md


2. content/en/docs/developers-guide/health-check-plugins.md 📝 Documentation +262/-0

Create health check plugins developer documentation

• Create comprehensive guide for health check plugin system architecture
• Document built-in HTTP and KubeVirt health check plugins with configuration examples
• Provide step-by-step tutorial for creating custom health check plugins
• Include naming conventions, API reference, and factory auto-discovery mechanism
• Add code examples for plugin implementation and configuration

content/en/docs/developers-guide/health-check-plugins.md


3. content/en/docs/krkn/health-checks.md 📝 Documentation +16/-4

Update health checks documentation with plugin architecture

• Clarify that health checks run continuously in background during chaos
• Document plugin-based architecture supporting multiple health check types
• Add references to KubeVirt checks and custom plugin development
• Improve explanation of http_health_check plugin scope
• Add "See Also" section with cross-references

content/en/docs/krkn/health-checks.md


View more (1)
4. content/en/docs/krkn/virt-checks.md 📝 Documentation +6/-1

Add cross-references to health check documentation

• Add "See Also" section with cross-references to HTTP health checks and plugin guide
• Link to health check plugins developer documentation

content/en/docs/krkn/virt-checks.md


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review bot commented Mar 23, 2026

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0) 📐 Spec deviations (0)

Grey Divider


Action required

1. KubeVirt config nesting mismatch 🐞 Bug ✓ Correctness
Description
The new Health Check Plugins page documents kubevirt_checks configuration nested under a config:
key and uses field names that conflict with existing virt-check docs, so users copying the example
will produce a config that doesn’t match the documented kubevirt_checks shape elsewhere in this
site.
Code

content/en/docs/developers-guide/health-check-plugins.md[R78-90]

+kubevirt_checks:
+  interval: 5
+  config:
+    namespace: "my-namespace"
+    node_name: "worker-1"        # optional: filter VMIs by node
+    exit_on_failure: false
+    disconnected_mode: false     # track VMs that become unreachable
+    only_failures: true          # only record failed checks in telemetry
+    batch_size: 10               # VMIs to check concurrently (0 = no limit)
+    ssh_port: 22
+    ssh_user: "cloud-user"
+    ssh_private_key: "/path/to/key"
+```
Evidence
The new page shows kubevirt_checks.config.namespace/node_name/..., but the existing Kube Virt
Checks page and the central config reference document kubevirt_checks fields at the top level
(e.g., namespace, name, disconnected, ssh_node, node_names, only_failures). This is a
structural mismatch within the docs set, making the new example misleading/incompatible with the
currently documented configuration shape.

content/en/docs/developers-guide/health-check-plugins.md[77-90]
content/en/docs/krkn/virt-checks.md[39-50]
content/en/docs/krkn/config.md[337-351]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`health-check-plugins.md` documents `kubevirt_checks` in a nested `config:` structure with different field names than the existing `virt-checks.md` and `config.md` pages, which will cause users to build incorrect configs.
## Issue Context
This repo is the docs site; consistency across docs is required to prevent misconfiguration.
## Fix Focus Areas
- content/en/docs/developers-guide/health-check-plugins.md[71-90]
- content/en/docs/krkn/virt-checks.md[39-50]
- content/en/docs/krkn/config.md[337-351]
## What to change
- Update the KubeVirt example to match the documented `kubevirt_checks` shape (top-level fields), and use the same field names (`disconnected` vs `disconnected_mode`, `node_names` vs `node_name`, etc.).
- If the nested `config:` shape is actually the intended new schema, then update *all* related docs pages (`virt-checks.md`, `config.md`) accordingly and clarify migration.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Plugin name inconsistent🐞 Bug ⚙ Maintainability
Description
The new page labels the built-in HTTP plugin as health_checks, but the updated Health Checks page
names the type http_health_check, creating contradictory terminology for what to put in
configuration and what the plugin is called.
Code

content/en/docs/developers-guide/health-check-plugins.md[R36-37]

+### [HTTP Health Check](../krkn/health-checks.md) (`health_checks`)
+
Evidence
Within this docs site, the new plugin guide calls the HTTP plugin health_checks, while
health-checks.md describes the plugin type as http_health_check and separately says
configuration lives under the health_checks key. This conflates the config section name
(health_checks) with a plugin/type name (http_health_check), which will confuse readers and
encourages incorrect config keys/type strings.

content/en/docs/developers-guide/health-check-plugins.md[34-38]
content/en/docs/krkn/health-checks.md[11-19]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The docs currently use `health_checks` to mean both a config block name and (incorrectly) a plugin name/type, while another page calls the plugin `http_health_check`.
## Issue Context
Users copy/paste examples; inconsistent naming causes configuration errors.
## Fix Focus Areas
- content/en/docs/developers-guide/health-check-plugins.md[34-38]
- content/en/docs/krkn/health-checks.md[11-19]
## What to change
- In `health-check-plugins.md`, rename the parenthetical plugin identifier from `health_checks` to the same identifier used elsewhere (likely `http_health_check`), and explicitly distinguish:
- config key: `health_checks:`
- plugin/type name: `http_health_check`
- Ensure the KubeVirt identifier is also consistent across pages (`virt_health_check` vs other names if any).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Health_checks type schema conflict🐞 Bug ✓ Correctness
Description
The new page introduces health_checks.type: my_service_health_check, but existing site docs define
health_checks as {interval, config: [ ... ]} with no type field, so the new example conflicts
with the documented schema and will mislead users.
Code

content/en/docs/developers-guide/health-check-plugins.md[R212-218]

+health_checks:
+  type: my_service_health_check
+  interval: 5
+  config:
+    endpoint: "http://my-service:8080"
+    exit_on_failure: true
+```
Evidence
health-check-plugins.md shows a type selector under health_checks, but both the main config
reference and the HTTP health checks page show health_checks consisting of interval and a
list-valued config only. This is an internal docs inconsistency that will cause users to build
configs that do not match the schema documented elsewhere on this site.

content/en/docs/developers-guide/health-check-plugins.md[207-221]
content/en/docs/krkn/config.md[337-343]
content/en/docs/krkn/health-checks.md[26-46]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Docs conflict on whether `health_checks.type` exists/should be used.
## Issue Context
This is a docs site; conflicting schema examples break user configs.
## Fix Focus Areas
- content/en/docs/developers-guide/health-check-plugins.md[207-221]
- content/en/docs/krkn/config.md[337-343]
- content/en/docs/krkn/health-checks.md[26-46]
## What to change
- Decide on one documented schema:
- If `type` is required/allowed: update `config.md` + `health-checks.md` examples and explain how `type` interacts with the existing list-based `config`.
- If `type` is not supported: remove/replace the `type:` example from `health-check-plugins.md` and explain how custom plugins are selected/activated using the existing schema.
- Add a short note about backward compatibility/migration if both forms exist.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

4. Auth field format mismatch 🐞 Bug ⚙ Maintainability
Description
The new page documents HTTP auth as a comma-delimited string, but other docs pages show auth as
a tuple-like value, so users won’t know what format to use.
Code

content/en/docs/developers-guide/health-check-plugins.md[R54-56]

+    - url: "http://internal-service"
+      auth: "username,password"    # HTTP basic auth
+      verify_url: false
Evidence
health-check-plugins.md uses auth: "username,password" while health-checks.md and config.md
describe auth as tuple-form credentials. This inconsistency in the same documentation set will
cause copy/paste misconfiguration for basic auth endpoints.

content/en/docs/developers-guide/health-check-plugins.md[54-67]
content/en/docs/krkn/health-checks.md[31-40]
content/en/docs/krkn/config.md[339-343]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Docs disagree on the `auth` value format for HTTP health checks.
## Issue Context
Users will paste one of the formats; inconsistent formats increase setup failures.
## Fix Focus Areas
- content/en/docs/developers-guide/health-check-plugins.md[54-67]
- content/en/docs/krkn/health-checks.md[31-40]
- content/en/docs/krkn/config.md[339-343]
## What to change
- Pick one documented representation and use it across all pages.
- If both are accepted by the real implementation, document both explicitly (and show the preferred form).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment on lines +78 to +90
kubevirt_checks:
interval: 5
config:
namespace: "my-namespace"
node_name: "worker-1" # optional: filter VMIs by node
exit_on_failure: false
disconnected_mode: false # track VMs that become unreachable
only_failures: true # only record failed checks in telemetry
batch_size: 10 # VMIs to check concurrently (0 = no limit)
ssh_port: 22
ssh_user: "cloud-user"
ssh_private_key: "/path/to/key"
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Kubevirt config nesting mismatch 🐞 Bug ✓ Correctness

The new Health Check Plugins page documents kubevirt_checks configuration nested under a config:
key and uses field names that conflict with existing virt-check docs, so users copying the example
will produce a config that doesn’t match the documented kubevirt_checks shape elsewhere in this
site.
Agent Prompt
## Issue description
`health-check-plugins.md` documents `kubevirt_checks` in a nested `config:` structure with different field names than the existing `virt-checks.md` and `config.md` pages, which will cause users to build incorrect configs.

## Issue Context
This repo is the docs site; consistency across docs is required to prevent misconfiguration.

## Fix Focus Areas
- content/en/docs/developers-guide/health-check-plugins.md[71-90]
- content/en/docs/krkn/virt-checks.md[39-50]
- content/en/docs/krkn/config.md[337-351]

## What to change
- Update the KubeVirt example to match the documented `kubevirt_checks` shape (top-level fields), and use the same field names (`disconnected` vs `disconnected_mode`, `node_names` vs `node_name`, etc.).
- If the nested `config:` shape is actually the intended new schema, then update *all* related docs pages (`virt-checks.md`, `config.md`) accordingly and clarify migration.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

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.

1 participant