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

chore: add jp docs #76

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/user/jp/functions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# jp docs
# Functions

## built-in functions

Expand Down
2 changes: 1 addition & 1 deletion hack/docs/jp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func main() {
fmt.Println("# jp docs")
fmt.Println("# Functions")
fmt.Println()
fmt.Println("## built-in functions")
fmt.Println()
Expand Down
13 changes: 13 additions & 0 deletions website/docs/jp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Overview

`kyverno-json` uses [JMESPath community edition](https://jmespath.site/), a modern JMESPath implementation with lexical scopes support.

The current resource, policy and rule are always available using the following builtin bindings:

| Binding | Usage |
|---|---|
| `$resource` | Current resource being analysed |
| `$policy` | Current policy being executed |
| `$rule` | Current rule being evaluated |

No protection is made to prevent you from overriding those bindings though.
2 changes: 1 addition & 1 deletion website/docs/jp/functions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# jp docs
# Functions

## built-in functions

Expand Down
9 changes: 5 additions & 4 deletions website/mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ nav:
- quick-start.md
- Writing policies:
- policies/index.md
- APIs:
- v1alpha1: apis/kyverno-json.v1alpha1.md
- Command Line Usage:
- commands/kyverno-json.md
- commands/kyverno-json_completion.md
Expand All @@ -95,8 +93,11 @@ nav:
- commands/kyverno-json_jp_query.md
- commands/kyverno-json_scan.md
- commands/kyverno-json_version.md
- JMESPath functions:
- jp/functions.md
- JMESPath:
- Overview: jp.md
- Functions: jp/functions.md
- APIs:
- v1alpha1: apis/kyverno-json.v1alpha1.md
- Policy catalog:
- catalog/index.md
- Playground:
Expand Down