Skip to content

Commit

Permalink
Merge pull request #70 from guettli/patch-2
Browse files Browse the repository at this point in the history
typo "come" --> "some"
  • Loading branch information
FabianKramm authored Dec 12, 2023
2 parents 054a622 + 70d55d9 commit 31c90a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/pages/using-policies/basics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Policies are very powerful and can block/deny `kubectl` requests for example, so


## `JsPolicy` YAML files
If someone shares a standalone `JsPolicy` object as a YAML file with you (or you created the file yourself), then you will likely find the `spec.javascript` field showing come JavaScript code embedded inside the YAML. Optionally, there may also be the `spec.dependencies` field filled with a list of `npm` packages that are used within this policy.
If someone shares a standalone `JsPolicy` object as a YAML file with you (or you created the file yourself), then you will likely find the `spec.javascript` field showing some JavaScript code embedded inside the YAML. Optionally, there may also be the `spec.dependencies` field filled with a list of `npm` packages that are used within this policy.

To apply such a policy in your cluster, simply create the `JsPolicy` object in your cluster:
```bash
Expand Down Expand Up @@ -84,4 +84,4 @@ To instantiate this policy, just apply it to your cluster:
```bash
kubectl apply -f policy.yaml
```
As with any `JsPolicy` object that provides the `spec.javascript` field, jsPolicy will generate a corresponding `JsPolicyBundle`. This bundle will also contain the code for the `disallowNamespaces` function since this function is imported in our policy code and will be directly embedded so that jsPolicy does not need to download any packages later on when executing this policy. This makes the execution of policies extremly fast even if they are using external packages.
As with any `JsPolicy` object that provides the `spec.javascript` field, jsPolicy will generate a corresponding `JsPolicyBundle`. This bundle will also contain the code for the `disallowNamespaces` function since this function is imported in our policy code and will be directly embedded so that jsPolicy does not need to download any packages later on when executing this policy. This makes the execution of policies extremly fast even if they are using external packages.

0 comments on commit 31c90a6

Please sign in to comment.