You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update provider docs and improve error handling
- Add documentation for check modes, built-in CEL functions, and
standard
extensions in checks README
- Clarify default health behavior in HTTP provider docs
- Update Helm and Satellite provider docs for accuracy and new options
- Improve error context in TLS and HTTP providers
- Make config loading thread-safe and expose validation errors via
method
- Use maps.Copy and slices utilities for safer map/slice operations
- Add input validation in Kubernetes resource fetcher
- Avoid panics on provider instantiation errors
- Minor test and code cleanup
Copy file name to clipboardExpand all lines: pkg/checks/README.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,45 @@ ph context my-app -o yaml
21
21
22
22
CEL expressions must evaluate to a boolean (`true` for healthy, `false` for unhealthy). Expressions have access to provider-specific context variables (e.g., `response` for HTTP, `resource` for Kubernetes).
23
23
24
+
### Check Modes
25
+
26
+
Each check can optionally specify a `mode` field:
27
+
28
+
-**default** (no `mode` field): The expression is evaluated once against the full provider context.
29
+
-**`mode: "each"`**: The expression is evaluated per-item for providers that return collections (e.g., Kubernetes with label selectors). Each item is evaluated independently, and failures reference the specific item.
- **Math**: Math functions (`math.greatest`, `math.least`)
60
+
- **Sets**: Set operations (`sets.contains`, `sets.intersects`, `sets.equivalent`)
61
+
- **Bindings**: Variable binding via `cel.bind()`
62
+
24
63
## Common CEL Patterns
25
64
26
65
> **Note:** The examples below use `data` as a generic illustrative placeholder variable. Actual CEL context variables are provider-specific — for example, `response` for [HTTP](../provider/http), `resource` for [Kubernetes](../provider/kubernetes), `tls` for [TLS](../provider/tls), `health` for [Vault](../provider/vault), and `release`/`chart` for [Helm](../provider/helm). See each provider's README for its available CEL variables, or use `ph context` to inspect the evaluation context.
0 commit comments