shuting
2d601a0830
feat: allow generate pattern changes ( #11202 )
...
* chore: remove duplicate test steps
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: remove validation checks upon generate policy changes
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: return nil
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: chainsaw tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: restrict rule spec changes except for generate pattern
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: rename tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: unit tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: upadte e2e matrix
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-09-24 14:11:14 +00:00
Charles-Edouard Brétéché
b463ee40d2
feat: use pointer in rule (validate field) ( #11095 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-11 09:12:53 +00:00
Charles-Edouard Brétéché
e7e2f0a07f
feat: use pointer in rule (mutation field) ( #11078 )
...
* feat: use pointer in rule (mutation field)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-11 04:32:10 +03:00
Ammar Yasser
b78c501b1b
test: Uncomment tests for the policy validation feature and modify signatures ( #10784 )
...
* test: Uncomment tests for the policy validation feature and modify signatures
Update the tests to call the method in the right convention it currently uses.
And removing dependency on the github.com/kyverno/kyverno/pkg/openapi package which is no longer
required for calling Validate.
As well as updating the expected errors for the Test_ValidateJSON6902.
Signed-off-by: aerosouund <aerosound161@gmail.com>
* fix: Configure Test_ValidateNamespace to use ValidationFailureActionOverrides as an argument instead of the whole policy spec
Signed-off-by: aerosouund <aerosound161@gmail.com>
* refactor: Use newest method signatures with Validate by passing two empty usernames
Signed-off-by: aerosouund <aerosound161@gmail.com>
* test: Use stretchr testify and bring the test that was written in main to the suite
Signed-off-by: aerosouund <aerosound161@gmail.com>
---------
Signed-off-by: aerosouund <aerosound161@gmail.com>
Signed-off-by: Ammar Yasser <aerosound161@gmail.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-04 21:38:03 +00:00
asr2003
8f418a90fc
fix: variable substitution error handling in policy validation ( #10936 )
...
* fix variable substitution error handling in policy validation and add tests
Signed-off-by: Ambati Sahithi <162500856+asr2003@users.noreply.github.com>
* cleanup
Signed-off-by: Ambati Sahithi <162500856+asr2003@users.noreply.github.com>
* fix variable substitution error handling in policy validation and add tests
Signed-off-by: Ambati Sahithi <162500856+asr2003@users.noreply.github.com>
* cleanup
Signed-off-by: Ambati Sahithi <162500856+asr2003@users.noreply.github.com>
* add review comment
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: asr2003 <162500856+asr2003@users.noreply.github.com>
* Update pkg/validation/policy/validate.go
The rule and policy will be appended to the top level message, so no need to repeat here.
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fmt
Signed-off-by: Ambati Sahithi <162500856+asr2003@users.noreply.github.com>
* Update pkg/validation/policy/validate.go
update for unit tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
---------
Signed-off-by: Ambati Sahithi <162500856+asr2003@users.noreply.github.com>
Signed-off-by: asr2003 <162500856+asr2003@users.noreply.github.com>
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2024-08-29 23:49:45 +00:00
Charles-Edouard Brétéché
482c243517
refactor: remove openapi package ( #8538 )
...
* refactor: openapi package
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* kubectl validate
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* rm
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* go mod
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix vscode
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-09-27 16:21:47 +00:00
Charles-Edouard Brétéché
4058b0794e
fix: crash when applying unquoted null ( #8081 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-08-22 12:05:08 +00:00
Vishal Choudhary
d8c905a7f9
feat: add images
to allowed variables in substitution ( #7787 )
2023-07-09 14:22:15 +02:00
shuting
5ce80c4e68
fix: target scope validation for the generate rule ( #7479 )
...
* fix target scope validation for generate
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add kuttl tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-06-13 10:26:56 +00:00
shuting
f87b0204e6
fix: generate policy validation to prevent endless loop ( #7026 )
...
* refactor policy validation
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add loop check for generate
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add kuttl tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* linter fixes
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* linter fixes
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-04-28 13:54:17 +00:00