diff --git a/docs/user/jp/functions.md b/docs/user/jp/functions.md index 133be589..9b790b89 100644 --- a/docs/user/jp/functions.md +++ b/docs/user/jp/functions.md @@ -1,4 +1,4 @@ -# jp docs +# Functions ## built-in functions diff --git a/hack/docs/jp/main.go b/hack/docs/jp/main.go index 1cecd6fe..50ce7515 100644 --- a/hack/docs/jp/main.go +++ b/hack/docs/jp/main.go @@ -9,7 +9,7 @@ import ( ) func main() { - fmt.Println("# jp docs") + fmt.Println("# Functions") fmt.Println() fmt.Println("## built-in functions") fmt.Println() diff --git a/website/docs/jp.md b/website/docs/jp.md new file mode 100644 index 00000000..28ac9f46 --- /dev/null +++ b/website/docs/jp.md @@ -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. diff --git a/website/docs/jp/functions.md b/website/docs/jp/functions.md index 133be589..9b790b89 100644 --- a/website/docs/jp/functions.md +++ b/website/docs/jp/functions.md @@ -1,4 +1,4 @@ -# jp docs +# Functions ## built-in functions diff --git a/website/mkdocs.yaml b/website/mkdocs.yaml index a0158af5..c505d771 100644 --- a/website/mkdocs.yaml +++ b/website/mkdocs.yaml @@ -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 @@ -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: