Commit a4a8b60
authored
constraint: Update Rego driver to support rego.v1 (#517)
* constraint: Rego v1 poc
This is an initial PoC to show what rego.v1 support might look.
Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>
* constraint: Rego v1 tests for AddTemplate too
The addTemplate operation had not been tested in my updates to other
tests.
Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>
* Update attemptVersions to always be v1 first
This makes it consistent with the compilation versions.
Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>
* driver/rego: Make v1 support opt-in with field
Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>
* constrainttemplate_types_test: Add version field
Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>
* rego-driver: Revert to v0 hook module
https://github.com/open-policy-agent/frameworks/pull/517/files#r2004431952
Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>
* rego-driver: Add GetSource test
Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>
* rego-driver: revise switch case
https://github.com/open-policy-agent/frameworks/pull/517/files/dc39c8d9ba4422d4229d5d72fec977bb715e8d59#r2008355303
Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>
---------
Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>
Co-authored-by: Charlie Egan <charlieegan3@users.noreply.github.com>1 parent 79a9477 commit a4a8b60
File tree
32 files changed
+1517
-570
lines changed- constraint/pkg
- apis/templates
- v1alpha1
- v1beta1
- v1
- client
- clienttest/cts
- drivers
- fake
- rego
- schema
- externaldata
- handler/handlertest
- regorewriter
- testv1
32 files changed
+1517
-570
lines changedLines changed: 23 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| |||
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
214 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
215 | 219 | | |
216 | 220 | | |
217 | 221 | | |
| |||
331 | 335 | | |
332 | 336 | | |
333 | 337 | | |
334 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
335 | 342 | | |
336 | 343 | | |
337 | 344 | | |
| |||
450 | 457 | | |
451 | 458 | | |
452 | 459 | | |
453 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
454 | 464 | | |
455 | 465 | | |
456 | 466 | | |
| |||
514 | 524 | | |
515 | 525 | | |
516 | 526 | | |
517 | | - | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
518 | 531 | | |
519 | 532 | | |
520 | 533 | | |
| |||
575 | 588 | | |
576 | 589 | | |
577 | 590 | | |
578 | | - | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
579 | 595 | | |
580 | 596 | | |
581 | 597 | | |
| |||
Lines changed: 23 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| |||
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
214 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
215 | 219 | | |
216 | 220 | | |
217 | 221 | | |
| |||
331 | 335 | | |
332 | 336 | | |
333 | 337 | | |
334 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
335 | 342 | | |
336 | 343 | | |
337 | 344 | | |
| |||
450 | 457 | | |
451 | 458 | | |
452 | 459 | | |
453 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
454 | 464 | | |
455 | 465 | | |
456 | 466 | | |
| |||
514 | 524 | | |
515 | 525 | | |
516 | 526 | | |
517 | | - | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
518 | 531 | | |
519 | 532 | | |
520 | 533 | | |
| |||
575 | 588 | | |
576 | 589 | | |
577 | 590 | | |
578 | | - | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
579 | 595 | | |
580 | 596 | | |
581 | 597 | | |
| |||
Lines changed: 23 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| |||
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
214 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
215 | 219 | | |
216 | 220 | | |
217 | 221 | | |
| |||
331 | 335 | | |
332 | 336 | | |
333 | 337 | | |
334 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
335 | 342 | | |
336 | 343 | | |
337 | 344 | | |
| |||
450 | 457 | | |
451 | 458 | | |
452 | 459 | | |
453 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
454 | 464 | | |
455 | 465 | | |
456 | 466 | | |
| |||
514 | 524 | | |
515 | 525 | | |
516 | 526 | | |
517 | | - | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
518 | 531 | | |
519 | 532 | | |
520 | 533 | | |
| |||
575 | 588 | | |
576 | 589 | | |
577 | 590 | | |
578 | | - | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
579 | 595 | | |
580 | 596 | | |
581 | 597 | | |
| |||
0 commit comments