Skip to content

Commit

Permalink
docs: add docs about tutorials (#506)
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly authored Sep 22, 2023
1 parent b7c8eaf commit 4cb4ab7
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
* [Release docs](./RELEASE.md)
* [Cluster connected docs](./CLUSTER.md)
* [Image tagging docs](./TAGGING.md)
* [Tutorials docs](./TUTORIALS.md)
62 changes: 62 additions & 0 deletions docs/TUTORIALS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Tutorials docs

This docs contains informations related to the tutorials system used in the Playground

## tutorials.json

All tutorials are referenced in the [tutorials.json](../frontend/public/tutorials/tutorials.json) file.

This file contains an array of objects and defined the hierarchy and of the tutorials menu.

All properties can be inherited from the parent/overriden in the children.

| Property | Description |
|---|---|
| name | Menu item name |
| url | URL where referenced files are looked up (can be an internet URL or local path) |
| color | Menu item color |
| subgroups | Grouped children menu items |
| policies | Children menu items |
| path | File path |
| title | Menu item title |
| contextPath | Path to context file |
| oldResourceFile | Path to old resource file |
| clusterResourcesFile | Path to cluster resources file |
| exceptionsFile | Path to exception file |

Example:

```json
{
"name": "Other",
"url": "https://raw.githubusercontent.com/kyverno/policies/main/other",
"policies": [
{
"path": "a/add-certificates-volume",
"title": "Add Certificates as a Volume"
},
{
"path": "a/add-default-resources",
"title": "Add Default Resources"
},
{
"path": "a/add-labels",
"title": "Add Labels"
},
{
"path": "a/allowed-annotations",
"title": "Allowed Annotations"
},
{
"path": "b-d/check-env-vars",
"title": "Check Environment Variables"
},
{
"path": "rec-req/require-base-image",
"title": "Check Image Base"
}
]
}
```

Local files should be stored in the [tutorials folder](../frontend/public/tutorials/).

0 comments on commit 4cb4ab7

Please sign in to comment.