Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tlkamp/opa-examples
A repository where I play around with OPA
https://github.com/tlkamp/opa-examples
Last synced: 11 days ago
JSON representation
A repository where I play around with OPA
- Host: GitHub
- URL: https://github.com/tlkamp/opa-examples
- Owner: tlkamp
- Created: 2023-10-08T03:12:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-08T03:55:55.000Z (about 1 year ago)
- Last Synced: 2024-02-15T02:20:24.228Z (9 months ago)
- Language: Open Policy Agent
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# opa-examples
A repository where I play around with OPA## Project Layout
All policies are contained in subdirectories under `policies/`.```
.
├── data.yaml
├── main.rego
├── Makefile
├── policies
│ └── numbers
│ ├── evens.rego
│ └── odds.rego
└── README.md
```## Config
The configuration is nested under a `config` object at the root of `data.yaml`.The `policies` list denotes which policies under the `policies/` directory are in scope for evaluation.
Custom data necessary for policy execution can be provided under the `inputs` map, which can accept
arbitrary data.## Evaluation
Policy evaluation is driven via the `eval` Make target.```console
$ make eval
```## Policies
Most of the policies in this repo are contrived examples and have little actual value.| Policy | Description | Input |
|-----------|--------------------------------------------|-----------------------|
| `numbers` | Perform mathematical checks on numbers | `numbers` (list) |