Charles-Edouard Brétéché
cf86887d55
refactor: remove some api unnecessary pointers ( #3704 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-04-28 12:41:10 +08:00
Jim Bugwadia
ab5171cee5
Verify digest ( #3679 )
...
* add verifyDigest to check all tags are converted to digests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add required to check for image verification annotation
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make fmt
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* generate CRD
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* adding imageverify true/false patch
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* patch addition logic
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* image verify CLI tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fixes and unit tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix digest mutate
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fmt
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make codegen
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix policy cache
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: anushkamittal20 <anumittal4641@gmail.com>
2022-04-27 15:09:52 +00:00
Sambhav Kothari
25badfe4fb
Fix regression in wildcard matches in In/AnyIn operators ( #3686 )
...
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-04-26 18:03:05 +00:00
Vyankatesh Kudtarkar
79be6379b2
fix test cli CI failures from main ( #3682 )
2022-04-26 20:00:46 +08:00
Vyankatesh Kudtarkar
56c90fd087
Support context variables when using foreach CLI ( #3637 )
...
* Support context variables when using foreach CLI
* add testcases
2022-04-25 16:36:31 +00:00
shuting
2a656f6de0
feat: mutate existing resources ( #3669 )
...
* feat: mutate existing, replace GR by UR in webhook server (#3601 )
* add attributes for post mutation
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add UR informer to webhook server
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* - replace gr with ur in the webhook server; - create ur for mutateExsiting policies
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* replace gr by ur across entire packages
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add YAMLs
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update api docs & fix unit tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add UR deletion handler
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add api docs for v1beta1
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix clientset method
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix v1beta1 client registration
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: mutate existing - generates UR for admission requests (#3623 )
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* replace with UR in policy controller generate rules (#3635 )
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
* - enable mutate engine to process mutateExisting rules; - add unit tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* implemented ur background reconciliation for mutateExisting policies
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix webhook update error
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* temporary comment out new unit tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: mutate existing, replace GR by UR in webhook server (#3601 )
* add attributes for post mutation
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add UR informer to webhook server
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* - replace gr with ur in the webhook server; - create ur for mutateExsiting policies
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* replace gr by ur across entire packages
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix missing policy.kyverno.io/policy-name label (#3599 )
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
* refactor cli code from pkg to cmd (#3591 )
* refactor cli code from pkg to cmd
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* fixes in imports
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* fixes tests
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* fixed conflicts
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* moved non-commands to utils
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
* add YAMLs
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update api docs & fix unit tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add UR deletion handler
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add api docs for v1beta1
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix clientset method
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add-kms-libraries for cosign (#3603 )
* add-kms-libraries
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* Shifted providers to cosign package
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Add support for custom image extractors (#3596 )
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
* Update vulnerable dependencies (#3577 )
Signed-off-by: Shubham Gupta <shubham.gupta2956@gmail.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix v1beta1 client registration
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: mutate existing - generates UR for admission requests (#3623 )
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* updating version in Chart.yaml (#3618 )
* updatimg version in Chart.yaml
Signed-off-by: Prateeknandle <prateeknandle@gmail.com>
* changes from, make gen-helm
Signed-off-by: Prateeknandle <prateeknandle@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Allow kyverno-policies to have preconditions defined (#3606 )
* Allow kyverno-policies to have preconditions defined
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
* Fix docs
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* replace with UR in policy controller generate rules (#3635 )
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* - enable mutate engine to process mutateExisting rules; - add unit tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* implemented ur background reconciliation for mutateExisting policies
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix webhook update error
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* temporary comment out new unit tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Image verify attestors (#3614 )
* fix logs
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix logs
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* support multiple attestors
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* rm CLI tests (not currently supported)
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* apply attestor repo
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix linter issues
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix entryError assignment
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* format
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add intermediary certs
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* Allow defining imagePullSecrets (#3633 )
* Allow defining imagePullSecrets
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
* Use dict for imagePullSecrets
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
* Simplify how imagePullSecrets is defined
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Fix race condition in pCache (#3632 )
* fix race condition in pCache
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* refact: remove unused Run function from generate (#3638 )
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
* Remove helm mode setting (#3628 )
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* refactor: image utils (#3630 )
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* -resolve lift comments; -fix informer sync issue
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* refact the update request cleanup controller
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
* - fix delete request for mutateExisting; - fix context variable substitution; - improve logging
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* - enable events; - add last applied annotation
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* enable mutate existing on policy creation
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update autogen code
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* merge main
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add unit tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* address list comments
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update api docs
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix "Implicit memory aliasing in for loop"
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* remove unused definitions
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update api docs
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
Co-authored-by: Mritunjay Kumar Sharma <mritunjaysharma394@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
Co-authored-by: Anushka Mittal <55237170+anushkamittal20@users.noreply.github.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
Co-authored-by: Shubham Gupta <shubham.gupta2956@gmail.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Prateek Nandle <56027872+Prateeknandle@users.noreply.github.com>
Co-authored-by: treydock <tdockendorf@osc.edu>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-04-25 12:20:40 +00:00
Charles-Edouard Brétéché
cbf93ff004
fix: pass logger by value ( #3666 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2022-04-25 11:51:49 +00:00
Sambhav Kothari
44b5bf0b57
Allow definition of inline variables in context ( #3658 )
...
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
2022-04-25 19:06:07 +08:00
Naman Lakhwani
9f3fc941ef
[imageVerify]: adding digestMutate
to simplify tag-to-digest mutation ( #3531 )
...
* added digestMutate
Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
* rebase
Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
* setting always to true
Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
* small nit
Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
* make codegen
Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
* crds & failing rule if mutation fails
Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
* adding new func to fetch digest and changing naming to mutateDigest
Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
* small nits
Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
* generating crds
Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
* minor nit
Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
* correcting error format
Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2022-04-22 01:08:49 -07:00
Jim Bugwadia
9fde4fd6a1
Multiple keys ( #3636 )
...
* fix autogen check
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* allow multiple keys and fix root/intermediate certs
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix test
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make issuer/subject optional
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* enable CTLog options
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix split
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make fmt
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make codegen
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* rename CTLog -> Rekor
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make fmt
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* api/kyverno/v1/image_verification_test.go
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-04-22 07:10:02 +00:00
Charles-Edouard Brétéché
2e1a87d149
refactor: image utils ( #3630 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-04-20 15:01:02 +00:00
Jim Bugwadia
3b1a1acd9a
Image verify attestors ( #3614 )
...
* fix logs
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix logs
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* support multiple attestors
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* rm CLI tests (not currently supported)
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* apply attestor repo
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix linter issues
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix entryError assignment
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* format
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add intermediary certs
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2022-04-19 08:35:12 -07:00
Sambhav Kothari
ec4e4ba452
Add support for custom image extractors ( #3596 )
...
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
2022-04-14 09:08:30 -07:00
Mritunjay Kumar Sharma
b815caef5d
refactor cli code from pkg to cmd ( #3591 )
...
* refactor cli code from pkg to cmd
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* fixes in imports
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* fixes tests
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* fixed conflicts
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* moved non-commands to utils
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-04-14 12:20:18 +00:00
Jim Bugwadia
0f186afb3e
update imageVerify schema ( #3574 )
...
* update imageVerify schema
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add optional
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* codegen
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* codegen
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* codegen
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* change nested/recursive types to apiextv1.JSON
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make fmt
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make codegen
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix message
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2022-04-11 16:47:27 +01:00
Sambhav Kothari
6f7bd7451b
Refactor image extraction to allow extracting custom resources ( #3572 )
...
* refactor: image extraction
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* Refactor image extraction to allow extracting custom resources
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-04-11 09:30:38 +00:00
Soumya Singh
84aa2e3fbb
Add returnType for regexMatch in kyverno jp output ( #3575 )
...
Signed-off-by: tend2infinity <somu12.ss@gmail.coom>
Co-authored-by: tend2infinity <somu12.ss@gmail.coom>
2022-04-11 08:34:14 +01:00
Charles-Edouard Brétéché
3d554ce53b
refactor: engine context ( #3563 )
...
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-04-09 11:52:50 +00:00
Charles-Edouard Brétéché
06c2b2bb79
refactor: switch to admission v1 ( #3526 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-04-06 20:43:07 +00:00
Charles-Edouard Brétéché
c8275b7c00
refactor: make response type (RuleType) typed ( #3556 )
...
* refactor: move common utils
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: make response type (RuleType) typed
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix: merge
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-04-06 19:04:08 +00:00
Charles-Edouard Brétéché
975f6ba7c8
test: pass lock by value ( #3481 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-04-05 15:52:13 +00:00
Charles-Edouard Brétéché
29d7010e25
refactor: move common utils ( #3553 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-04-05 13:02:43 +00:00
Charles-Edouard Brétéché
bd953cf4fa
fix: checkEngineResponse in webhooks ( #3551 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-04-05 10:41:08 +00:00
Abhi Kapoor
18d4dadab6
Do not generate preconditions not met warning for audit policies ( #3487 )
...
* Do not generate preconditions not met warning for audit policies
Signed-off-by: abhi-kapoor <43758739+abhi-kapoor@users.noreply.github.com>
* Update PR template to reeference the closing keyword
Signed-off-by: abhi-kapoor <43758739+abhi-kapoor@users.noreply.github.com>
* Update pkg/engine/validation.go
Co-authored-by: Prateek Pandey <prateekpandey14@gmail.com>
* Update pkg/engine/validation.go
Co-authored-by: Prateek Pandey <prateekpandey14@gmail.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
Co-authored-by: shuting <shutting06@gmail.com>
Co-authored-by: Prateek Pandey <prateekpandey14@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-04-05 10:08:01 +00:00
Charles-Edouard Brétéché
a93ac45586
refactor: move some helpers in utils package ( #3539 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-04-04 18:58:22 +00:00
Charles-Edouard Brétéché
cb6f55cdcd
refactor: use GetValidationFailureAction method ( #3546 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-04-04 16:33:12 +00:00
silenceper
d97258654f
fix wildcards in value arrays ( #3486 )
...
Signed-off-by: silenceper <silenceper@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-04-01 10:42:07 +00:00
Charles-Edouard Brétéché
663ad49dca
refactor: add a json patch util and use it in autogen package ( #3524 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-04-01 13:26:47 +08:00
Charles-Edouard Brétéché
9fc65fa5a7
refactor: use policy interface and introduce admission utils package ( #3512 )
...
* refactor: use more policy interface
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: migrate to policy interface
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-31 20:25:54 +08:00
Charles-Edouard Brétéché
83343697b9
refactor: make use of policy interface ( #3499 )
...
- refactor: make use of policy interface
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-30 18:34:30 +05:30
Prateek Pandey
bdb675b9c0
feat: generate support for namespace policy ( #3472 )
...
* feat: generate support for namespace policy
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
* use policy spec instead
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
* refactor the changes
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
* add synced flag for Namespace policies
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
2022-03-29 13:04:33 +00:00
Charles-Edouard Brétéché
20069c13c3
feat: stop mutating rules ( #3410 )
...
* feat: stop adding autogen annotation
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* feat: stop mutating rules
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* feat: stop mutating rules
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix: use toggle
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix: review comments
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-28 22:01:27 +08:00
Vyankatesh Kudtarkar
58b1fd6210
fix ordering of mutate element ( #3468 )
...
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-25 15:15:31 +00:00
shuting
d1bf3d4742
clean up dependencies ( #3469 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-03-25 08:40:25 +00:00
Charles-Edouard Brétéché
f34d3c342d
refactor: add ValidationFailureAction to the api ( #3451 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-03-23 08:59:41 +00:00
Vyankatesh Kudtarkar
e268be9e88
support for deprecated API's ( #3439 )
...
* support for deprecated API's
* add testcase
* update condition
* fix logic
2022-03-22 18:25:35 +00:00
Charles-Edouard Brétéché
11bbb4f83e
refactor: replace ExcludeResources by MatchResources ( #3444 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-22 14:24:40 +00:00
Charles-Edouard Brétéché
0c8e8c1212
feat: move GetRules() at the policy level ( #3420 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-18 15:18:32 +00:00
Charles-Edouard Brétéché
865eef248d
feat: stop adding autogen annotation ( #3379 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-18 11:30:49 +00:00
Christian Kotzbauer
860253d6aa
[ImageVerify] Verify additional certificate-extensions ( #3404 )
...
* feat: add additionalExtensions to keyless imageVerify
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
* feat: regenerate code
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-03-17 08:42:12 +00:00
Sambhav Kothari
6498425937
Add a registry flag to allow direct access to container registries in the CLI ( #3396 )
...
* Add a registry flag to allow direct access to container registries in the CLI
Signed-off-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-03-16 09:56:47 +05:30
Charles-Edouard Brétéché
ce5f648f30
refactor: introduce rules getters and setters ( #3350 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Prateek Pandey <prateekpandey14@gmail.com>
2022-03-09 15:28:31 +00:00
Charles-Edouard Brétéché
ea977b259c
refactor: move controller autogen annotation in api package ( #3364 )
...
* fix: configmap resource filters generated by helm does not account for namespace
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refator: move controller autogen annotation in api package
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-09 21:48:04 +08:00
Charles-Edouard Brétéché
90d0badda4
fix: CRD generation ( #3334 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-06 11:07:51 -08:00
Vyankatesh Kudtarkar
0a5aad39cf
Fix foreach validations precondition issue ( #3228 )
...
* fix foreach validations precondition issue
* added test-cases
2022-02-18 09:11:41 +00:00
Jim Bugwadia
421a81ce63
Fix old object validation check ( #3248 )
...
* fix validation check on UPDATE
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* prevent policy bypass using preconditions
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* separate replace
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add error handling
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2022-02-17 09:18:49 -08:00
Tathagata Paul
b91ff5a7f2
Bug fix: negation of string kernel version caused Cluster Policy to fail ( #3229 )
...
* fixed bug where negation of kernel version caused cpolr to fail
Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>
* small fix in function validateString
Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>
* Added necessary tests
Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>
Added one more test
Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>
* Add more tests and added a policy to the test folder
Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>
* added policy for test cli
Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2022-02-17 09:33:30 +05:30
Mritunjay Kumar Sharma
5a541567de
Fix image parsing for image referenced as digests ( #3196 )
...
* fixes image break with sha256
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* fixes priority to digest
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-02-15 08:35:53 +00:00
Jim Bugwadia
bd1a145678
Fix keyless attest ( #3219 )
...
* allow root cert for keyless attestations checks
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add logs and improve var names
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make fmt
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* handle err in sig loading
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-02-13 20:35:11 -08:00
Sambhav Kothari
4445780c7c
Add a kyverno jp command to test jmespath expressions ( #3169 )
...
* Add a kyverno jp command to test jmespath expressions
Signed-off-by: Sambhav Kothari <sambhavs.email@gmail.com>
* Auto-generate custom function docs
Signed-off-by: Sambhav Kothari <sambhavs.email@gmail.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2022-02-04 05:23:12 +00:00