Marc Brugger
2031134a28
quote image in error ( #7259 )
...
Signed-off-by: bakito <github@bakito.ch>
2023-05-23 16:47:47 +02:00
Charles-Edouard Brétéché
79a255a1e6
fix: use structured jsonpatch instead of byte arrays ( #7186 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-05-13 16:56:54 +08:00
Charles-Edouard Brétéché
68aeb9a954
chore: bump otel deps ( #7152 )
...
* chore: bump otel deps
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>
2023-05-11 10:16:48 +00:00
Mariam Fahmy
bb628e1fe6
Supporting ValidatingAdmissionPolicy in kyverno cli (apply and test command) ( #6656 )
...
* feat: add policy reporter to the dev lab
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* refactor: remove obsolete structs from CLI
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more
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>
* fix
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* codegen
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* Supporting ValidatingAdmissionPolicy in kyverno apply
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* chore: bump k8s from v0.26.3 to v0.27.0-rc.0
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* Support validating admission policy in kyverno apply
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* Support validating admission policy in kyverno test
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* refactoring
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* Adding kyverno apply tests for validating admission policy
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* fix
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* fix
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* running codegen-all
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* fix
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* Adding IsVap field in TestResults
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* chore: bump k8s from v0.27.0-rc.0 to v0.27.1
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* fix
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* fix
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* Fix vap in engine response
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* codegen
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2023-05-10 08:12:53 +00:00
Jim Bugwadia
f287e0a220
Conditions message ( #7113 )
...
* add message to conditions
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* extend tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
---------
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2023-05-08 15:34:23 +08:00
Charles-Edouard Brétéché
6a95b305c3
fix: remove excluded groups from matching ( #7083 )
...
* fix: remove excluded groups from matching
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>
2023-05-03 21:37:17 +08:00
Charles-Edouard Brétéché
f18f155816
refactor: engine response policy ( #7063 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-05-03 13:05:01 +08:00
Charles-Edouard Brétéché
e233f56b73
chore: use github.com/evanphx/json-patch/v5 ( #7015 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-04-27 11:14:20 +00:00
shuting
5a6b3c86f6
fix background variables validation ( #6978 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-04-23 16:22:29 +00:00
Charles-Edouard Brétéché
688d30bda1
fix: match on ephemeral containers ( #6963 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-04-17 15:17:45 +00:00
Charles-Edouard Brétéché
544fe04508
refactor: introduce jmespath interface ( #6882 )
...
* refactor: introduce jmespath interface
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>
* 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>
* 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>
2023-04-13 11:29:40 +00:00
Jim Bugwadia
a054f7c957
fix ns selector ( #6887 )
...
* fix ns selector
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* remove debug
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add kuttl tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
---------
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-04-13 08:17:28 +00:00
Charles-Edouard Brétéché
3f51e99109
refactor: configuration config map controller ( #6829 )
...
* refactor: configuration config map controller
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* rbac
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>
* clean
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* clean
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>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-04-11 12:05:20 +00:00
Charles-Edouard Brétéché
166122b0ea
refactor: engine response stats ( #6796 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-04-06 01:07:04 +08:00
Charles-Edouard Brétéché
5ec66918f6
feat: add subresource support to resource filters ( #6780 )
...
* feat: add subresource support to resource filters
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* filter
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* values
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-04-05 13:51:07 +00:00
Charles-Edouard Brétéché
784ca07419
refactor: engine rule response creation ( #6784 )
...
* refactor: engine rule response creation
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* private fields
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
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>
* fix unit tests
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-04-05 10:35:38 +00:00
Charles-Edouard Brétéché
2f1ac317f4
feat: add flag to skip resource filters in reports controller ( #6778 )
...
* feat: add flag to skip resource filters in reports controller
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* codegen
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-04-04 13:05:29 +00:00
Charles-Edouard Brétéché
c9bbf38191
refactor: remove more admission request pointers ( #6774 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-04-04 13:11:18 +08:00
Charles-Edouard Brétéché
18033a415b
refactor: remove admission request/response pointers ( #6769 )
...
* refactor: remove admission request/response pointers
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix tests
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-04-03 18:08:57 +00:00
Charles-Edouard Brétéché
4cf5903545
fix: allow empty image ( #6767 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-04-03 17:01:35 +00:00
Ved Ratan
367156f60b
[Chore] Bump to Go 1.20 ( #6683 )
...
* changed go version 1.19->1.20
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* updated go version in actions
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* bumped golangci-lint
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix conflicts
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fixed some linter issues
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fixed some linter issues
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* possible fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* small fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
---------
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
Signed-off-by: Ved Ratan <82467006+VedRatan@users.noreply.github.com>
2023-04-03 11:40:47 +00:00
Charles-Edouard Brétéché
eaaa8a0236
refactor: engine responses ( #6738 )
...
* refactor: engine responses
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>
* 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>
2023-03-30 11:59:32 +00:00
Charles-Edouard Brétéché
db29d8b2ba
fix: propagate error when parsing an image fails ( #6706 )
...
* fix: propagate error when parsing an image fails
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* Apply suggestions from code review
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-03-28 13:36:07 +00:00
Charles-Edouard Brétéché
391f1ae487
fix: allow image to be not present ( #6707 )
...
* fix: allow image to be not present
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* log
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-03-28 13:02:29 +00:00
Charles-Edouard Brétéché
1e30aacbd9
fix: replace more refect.DeepEqual ( #6674 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-03-24 10:01:49 +00:00
Charles-Edouard Brétéché
5a9befd847
fix: HasVerifyImages check ( #6668 )
...
* fix: HasVerifyImages check
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>
2023-03-24 08:52:26 +00:00
Charles-Edouard Brétéché
dd7ecff386
refactor: remove more pointers from engine api ( #6651 )
...
* refactor: remove more pointers from engine api
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>
* fix
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* debug
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>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-03-23 20:58:52 +08:00
Charles-Edouard Brétéché
9e5f19b899
fix: do not create UR for dryrun admission requests ( #6649 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-03-22 15:29:42 +00:00
Charles-Edouard Brétéché
aa6400269e
refactor: implement matching based on GVK/subresource ( #6633 )
...
* refactor: do not allow matching with subresource kind
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix kuttl
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix kuttl
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fixes
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>
* refactor: implement matching based on GVK/subresource
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>
* 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>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-03-22 18:18:11 +08:00
Charles-Edouard Brétéché
3c16c60912
refactor: admission reports aggregation ( #6568 )
...
* refactor: addmission reports aggregation
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>
* 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>
* fix kuttl
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-03-17 12:07:17 +00:00
Charles-Edouard Brétéché
fc453b1faa
fix: improve shutdown gracefulness ( #5107 )
...
* fix: improve shutdown gracefulness
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>
* 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>
* 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>
Co-authored-by: shuting <shuting@nirmata.com>
2023-03-17 18:48:48 +08:00
Charles-Edouard Brétéché
bedc6cbd27
fix: controller duration computation ( #6569 )
2023-03-15 15:11:00 +08:00
Charles-Edouard Brétéché
5160b63154
feat: use kind selectors ( #6514 )
...
* fix: compile regex globally
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>
* feat: use kind selectors
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* clean
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>
* cache
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>
* kuttl
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* kuttl
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* webhooks rules
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* kuttl
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>
2023-03-10 13:24:55 +00:00
Charles-Edouard Brétéché
1efcd40d04
fix: file name ( #6523 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-03-09 22:17:26 +00:00
Charles-Edouard Brétéché
caf10ba531
fix: compile regex globally ( #6510 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-03-08 15:20:39 -08:00
Charles-Edouard Brétéché
b8558df675
feat: upgrade otel ( #6383 )
...
* chore: bump a couple of deps
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* feat: upgrade otel
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>
2023-02-23 17:54:33 +00:00
Charles-Edouard Brétéché
d90f18f4ad
fix: remove dynamic config from match helpers ( #6381 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-02-23 15:28:52 +01:00
Charles-Edouard Brétéché
cdfd1fced8
fix: logger key value in wrong order ( #6365 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-02-21 13:18:39 +00:00
Charles-Edouard Brétéché
b743a8999c
fix: use client instead of discovery for sanity checks ( #6296 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2023-02-10 15:38:34 +00:00
Charles-Edouard Brétéché
43924e131c
refactor: original resource tracking in engine response ( #6293 )
...
* refactor: original resource tracking in engine response
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>
2023-02-10 14:04:41 +00:00
Charles-Edouard Brétéché
ed5cf2cdde
refactor: remove PolicySpec from engine api ( #6159 )
...
* refactor: introduce engine api package
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* status
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* refactor: clean engine api package
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* cleanup
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more tests
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* refactor: remove PolicySpec from engine api
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>
* 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>
* constructor
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>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2023-02-10 08:11:21 +00:00
Brian Dunnigan
d33e616d69
#6055 Add JMESPath support to imageExtractors ( #6183 )
...
Signed-off-by: Brian Dunnigan <bdunnigan@clarityinnovates.com>
Co-authored-by: bdunnigan <bdunnigan@clarityinnovates.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2023-02-08 11:54:59 +00:00
Fish-pro
fdfdcc058f
Remove dependency on github.com/pkg/errors ( #6165 )
...
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-02-01 14:38:04 +08:00
Charles-Edouard Brétéché
fb94f6ea75
refactor: introduce engine api package ( #6154 )
...
* refactor: introduce engine api package
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* status
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-01-30 11:41:09 +00:00
shuting
f183154d51
feat: add new updaterequest_controller entrypoint ( #6050 )
...
* add ur_controller entrypoint
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* remove commented code
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-01-20 15:53:27 +00:00
Eileen
0a19556a79
feat: support select namespace by label ( #4461 )
...
Signed-off-by: Eileen <eileenylj@gmail.com>
Reconstruct ValidationFailureActionOverrides
- Add `NamespaceSelector`
- Generate relative manifests
- Rewrite namespace matching logic in engineResponse
- Add test cases for validatetionFailureActionOverrides
- (WIP) Set Enforce as default
2023-01-18 10:21:34 +00:00
Vyom Yadav
c2dfd1d130
fix: policy match Kind case-senstive ( #6008 )
...
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
2023-01-16 16:01:05 +08:00
shuting
1997a291f3
fix: invoke cleanup process during shutdown ( #5974 )
...
* invoke cleanup process during shutdown
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix shutdown cleanup
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix shutdown panic
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* cleanup webhooks by the label
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2023-01-12 12:47:40 +08:00
Charles-Edouard Brétéché
2a22e8762a
refactor: match utils package ( #5961 )
...
* refactor: match utils package
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>
* test
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* test
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* test
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-01-10 12:16:59 -08:00
Charles-Edouard Brétéché
e8e3f66c8b
fix: missing user info matching ( #5931 )
...
* fix: missing user info matching
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* todo
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* todo
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-01-07 16:48:44 -08:00
Vyom Yadav
c0875f16e6
fix: Configure webhook to add ephemeralcontainers for policies matching on Pod ( #5886 )
...
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2023-01-06 13:40:35 +00:00
Charles-Edouard Brétéché
28c0f8f56a
feat: add violation details to report.results.properties for PSa policies ( #5908 )
...
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-01-06 10:40:06 +00:00
Charles-Edouard Brétéché
0244fe70b9
refactor: improve background scan reconciliation ( #5871 )
...
* fix: force background scan recomputation
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* refactor: improve background scan reconciliation
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>
* enqueue
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* enqueue resources
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2023-01-05 07:22:28 +00:00
Vyom Yadav
9d2deb0568
fix: Add subresources support to policy exceptions ( #5839 )
...
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2023-01-05 06:23:44 +00:00
Charles-Edouard Brétéché
23fef004bb
chore: move ConvertToUnstructured from engine utils to kube utils ( #5847 )
...
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-01-03 12:02:15 +00:00
Charles-Edouard Brétéché
baacf60156
refactor: move utils into sub packages ( #5828 )
...
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-01-03 09:33:09 +00:00
Charles-Edouard Brétéché
5313f0e46f
chore: add a couple unit tests ( #5834 )
...
* chore: add LabelSelectorContainsWildcard unit tests
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* tombstone tests
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* ConvertToUnstructured tests
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-01-03 09:56:57 +01:00
Njegos Railic
c429f845dd
Adding support for overriding the default registry ( #4715 )
...
Signed-off-by: Njegos Railic <railic.njegos@gmail.com>
Signed-off-by: Njegos Railic <railic.njegos@gmail.com>
2023-01-02 17:14:40 +00:00
Charles-Edouard Brétéché
490e799b77
chore: add data utils package unit tests ( #5802 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-12-29 14:30:36 +00:00
Charles-Edouard Brétéché
94abfaf13e
refactor: move util funcs in sub packages ( #5754 )
...
* refactor: move util func in sub packages
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>
* Update pkg/utils/kube/crd.go
Signed-off-by: shuting <shutting06@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: shuting <shutting06@gmail.com>
Co-authored-by: shuting <shutting06@gmail.com>
2022-12-22 06:39:54 +00:00
Charles-Edouard Brétéché
0f5a0d492f
test: add unit test for GetResourceName util ( #5752 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-12-22 05:50:39 +00:00
Charles-Edouard Brétéché
3975323362
chore: bump deps including k8s ones ( #5751 )
...
* chore: bump deps including k8s ones
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>
* fix linter
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-12-21 22:33:51 +00:00
Charles-Edouard Brétéché
ad19108d34
refactor: remove common package ( #5750 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-12-21 20:30:45 +00:00
Charles-Edouard Brétéché
54b7b65cfe
feat: propagate psa checks results ( #5719 )
...
* feat: propagate psa checks results
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* add to report
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-12-20 05:57:23 +00:00
Charles-Edouard Brétéché
dacb465e10
fix: interface conversion panic ( #5708 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-12-16 18:43:02 +01:00
Eileen
e0f0fdf242
feat: Implement PolicyException ( #5680 )
...
* feat: Handle Exception
Signed-off-by: Eileen Yu <eileenylj@gmail.com>
* fixes
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Eileen Yu <eileenylj@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2022-12-16 09:13:14 +00:00
Charles-Edouard Brétéché
4618dc39d0
feat: add policy exception validation webhook ( #5679 )
...
* feat: add policy exception validation webhook
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>
* handler
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* validation
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2022-12-15 08:34:44 +00:00
Jim Bugwadia
9d3b176def
Nested foreach ( #5589 )
...
* updated foreach logic and added tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* uncomment tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix vars and unit tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix vars and unit tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix some tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix more tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* format
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make codegen
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* linter
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* cleanup
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix linter issue
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* revert local launch
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* propagate context
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* uncomment tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix propagation of registry client
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-12-12 15:20:20 +00:00
Charles-Edouard Brétéché
5c62b90277
fix: grafana dashboard ( #5645 )
...
* fix: grafana dashboard
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* merge main
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-12-11 21:51:15 +00:00
Vyom Yadav
99d988e98c
feat: add support for subresources to validating and mutating policies ( #4916 )
...
* feat: add support for subresources to validating and mutating policies
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
* Add CLI test cases with subresources for validating policies
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
* Fix existing e2e tests for validating policies and remove tests migrated to kuttl
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
* Add kuttl e2e tests for validating policies with subresources
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
* Add kuttl e2e tests for mutating policies with subresources
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
* Add kuttl e2e tests for validating policy by-pass by manipulating preconditions
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
2022-12-10 00:45:23 +08:00
Charles-Edouard Brétéché
87ce4b85de
feat: introduce v2alpha1 ( #5625 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-12-08 11:45:47 +00:00
Charles-Edouard Brétéché
a6aaffded3
feat: add cleanup handler ( #5576 )
...
* feat: add cleanup handler
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* cleanup handler
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* cleanup
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* cleanup
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* service
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* cleanup
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>
* codegen
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-12-07 10:30:47 +00:00
Charles-Edouard Brétéché
6893842226
refactor: cli test command ( #5550 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-12-03 19:56:09 +01:00
Charles-Edouard Brétéché
83b088ecb9
chore: improve cleanup controller ( #5509 )
...
* chore: improve cleanup controller
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* chore: improve cleanup controller
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-11-30 16:23:12 +00:00
Charles-Edouard Brétéché
83bbf87ff6
feat: use admission review v1 ( #5464 )
...
* feat: use admission review v1
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>
* nit
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* logs
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* patch type
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix tests
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>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-11-30 23:37:42 +08:00
Charles-Edouard Brétéché
288c9091ec
chore: use builtin slices.Clone ( #5510 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-11-30 10:38:03 +00:00
Charles-Edouard Brétéché
be1d6fe094
feat: add controller metrics ( #5494 )
...
* feat: add controller metrics
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>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-11-29 12:16:15 +00:00
Charles-Edouard Brétéché
6f1bd5fff2
chore: replace utils.ContainsString with builtin slices.Contains ( #5496 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-11-29 08:04:49 +00:00
Charles-Edouard Brétéché
bf303f78ad
fix: add image extractor for ReplicationController ( #5497 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-11-29 12:34:33 +05:30
Charles-Edouard Brétéché
4984c5c878
feat: create a policy utils package ( #5473 )
...
* feat: create a policy utils package
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* added comment
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-11-25 13:46:02 +01:00
Charles-Edouard Brétéché
56aae9f505
fix: admission reports stacking up ( #5457 )
...
* fix: admission reports stacking up
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* utils
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* warmup
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* cleanup
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>
* fix
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix logger
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* nits
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-11-24 14:21:08 +01:00
Nikhil Sharma
0fb45ed53a
feat: add CleanupPolicy validation code to CleanupPolicyHandler ( #5338 )
...
* add validation code for cleanupPolicyHandler
Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.com>
* update
Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.com>
* fix
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* register kuttl tests for cleanup policy
Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.com>
Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-11-16 13:11:33 +00:00
Prateek Pandey
2b4ff1ef6d
fix: synchronize source resource update to clone list resource ( #5317 )
...
* fix: synchronize source resource update to clone list target resource
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
* add kuttl test to verify the clone list synchronized behavior
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
* refactor functions parameters
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
* fix the kuttl test description and behavior README
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
* Use entire content to compare
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
2022-11-11 19:30:54 +00:00
Marc Brugger
79d18d1ed6
allow list with policies in test ( #5227 )
...
Signed-off-by: bakito <github@bakito.ch>
Signed-off-by: bakito <github@bakito.ch>
Co-authored-by: shuting <shuting@nirmata.com>
2022-11-11 23:18:17 +08:00
Tobias Dahlberg
19f0e7ebfe
fix: add parsing of json pointers to support special chars ( #3578 #3616 ) ( #4767 )
...
* Added jsonpointer package that supports parsing of paths and JSON pointers that can yield either a JSON pointer string or JMESPath string.
* Replaced the use of `strings.Split` and `strings.Join` in places where paths are converted to JMESPaths.
Signed-off-by: Tobias Dahlberg <tobias.dahlberg@sinch.com>
Signed-off-by: Tobias Dahlberg <tobias.dahlberg@sinch.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-11-10 16:03:45 +00:00
Charles-Edouard Brétéché
060f7bb873
refactor: admission response utils ( #5234 )
...
- refactor: admission response utils
- unit tests
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-11-08 09:35:08 +00:00
Charles-Edouard Brétéché
a64475a6db
refactor: health check system ( #5176 )
...
* refactor: health check system
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* filter
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>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-11-03 11:19:38 +01:00
Charles-Edouard Brétéché
f52da91b72
fix: early return in policy validation ( #5200 )
...
* fix: early return in policy validation
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix test
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-11-03 09:05:23 +00:00
Charles-Edouard Brétéché
076f2c3c49
fix: deletion of reports not belonging to kyverno ( #5194 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-11-02 10:08:54 +00:00
Charles-Edouard Brétéché
05d90afe1b
fix: check resource version on update notification ( #5179 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-11-01 21:49:25 +01:00
Charles-Edouard Brétéché
d2658a1bc8
refactor: support Audit and Enforce validation failure actions ( #5152 )
...
* feat: remove policy mutation code
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>
* refactor: support Audit and Enforce failure actions
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* codegen
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>
* typo
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* update changelog
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-11-01 09:56:52 +00:00
yinka
822dbdc011
feat: enable/disable Debug mode which shows entire AdmissionReview payload ( #5024 )
...
* work in progress PR
Signed-off-by: damilola olayinka <holayinkajr@gmail.com>
* add custom request struct
Signed-off-by: damilola olayinka <holayinkajr@gmail.com>
* pass debug mode option through constructor and replace logger with klogr
Signed-off-by: damilola olayinka <holayinkajr@gmail.com>
* make changes
Signed-off-by: damilola olayinka <holayinkajr@gmail.com>
* cleanup
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix linter
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* add another test case
Signed-off-by: damilola olayinka <holayinkajr@gmail.com>
* removed unused function
Signed-off-by: damilola olayinka <holayinkajr@gmail.com>
* fix linter
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: damilola olayinka <holayinkajr@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-10-21 16:17:49 +00:00
Charles-Edouard Brétéché
eac23af077
fix: detection of kyverno going down ( #5055 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-10-19 10:06:48 +00:00
Charles-Edouard Brétéché
c4b3301ab0
fix: go routines not gracefully shut down in controllers ( #5022 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-10-19 08:54:48 +00:00
Charles-Edouard Brétéché
02e832a771
fix: update policy status ( #5006 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-10-17 09:28:33 +00:00
Charles-Edouard Brétéché
3ebb6284cc
refactor: add update status helper ( #4985 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-10-17 05:52:54 +00:00
Charles-Edouard Brétéché
aedaa412a0
fix: webhooks not registering when using name override ( #4992 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-10-17 01:21:43 +00:00
Charles-Edouard Brétéché
47780bf37f
fix: improve banned types management in reports ( #4953 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-10-14 23:20:30 +08:00
Charles-Edouard Brétéché
e749907302
fix: missing watchers in resource report controller ( #4967 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-10-14 13:55:50 +00:00
Charles-Edouard Brétéché
16aca2816f
fix: don't report ready until certs are valid ( #4934 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-10-14 04:23:42 +00:00
Charles-Edouard Brétéché
a62a0c1f9f
fix: probes should work in debug mode ( #4926 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-10-13 14:40:35 +00:00
Charles-Edouard Brétéché
4aed9359cb
refactor: manage webhooks with webhook controller ( #4846 )
...
* refactor: add config support to webhook controller
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* refactor: add client config to webhook controller
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* migrate verify webhook
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>
* v1
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* refactor: move policy webhooks management in webhook controller
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* policy validating webhook config
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* watch policies
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* refactor: migrate resource webhook management in webhook controller
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* mutating webhook
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* auto update
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* cleanup
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* auto update and wildcard policies
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* policy readiness
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix: can't use v1 admission
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* reduce reconcile
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* watchdog
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* cleanup
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>
* health check
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* runtime utils
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* runtime utils
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* cleanup
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* watchdog check
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* remove delete from mutating webhook
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* cleanup
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-10-12 06:52:42 +00:00
Charles-Edouard Brétéché
f7db09fcc2
fix: background scan labels ( #4865 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-10-11 19:54:22 +00:00
Charles-Edouard Brétéché
7bfcf7d7e2
refactor: add config support to webhook controller ( #4838 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-10-07 11:32:38 +00:00
Charles-Edouard Brétéché
1509fa6251
refactor: non leader controllers management ( #4831 )
2022-10-06 18:38:35 +08:00
ansalamdaniel
27de93a3d2
fix: add policy validation for ValidationFailureActionOverride field ( #4784 )
...
Signed-off-by: ansalamdaniel <ansalam.daniel@infracloud.io>
2022-10-06 06:16:12 +00:00
Charles-Edouard Brétéché
1f41c2b84a
fix: logger panic ( #4793 )
...
* fix: logger panic
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* makefile
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-10-03 15:42:52 +00:00
Charles-Edouard Brétéché
3971376814
refactor: introduce webhook controller ( #4749 )
...
* refactor: introduce webhook controller
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix linter issues
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix linter
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix imports
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* merge main
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* merge main
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix linter
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-10-03 11:23:02 +00:00
yinka
688b4fb8e3
add package logger in files ( #4766 )
...
* add package logger in files
Signed-off-by: damilola olayinka <holayinkajr@gmail.com>
* add package logger to initContainer and other files
Signed-off-by: damilola olayinka <holayinkajr@gmail.com>
* helm docs
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* helm default values
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* release notes
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: damilola olayinka <holayinkajr@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-10-02 19:45:03 +00:00
Charles-Edouard Brétéché
287eb84d07
refactor: use context in controllers instead of chan ( #4761 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-09-30 16:54:47 +05:30
Charles-Edouard Brétéché
205bb28b52
feat: add typed client support and metrics wrapper ( #4724 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-09-29 17:12:50 +05:30
Charles-Edouard Brétéché
e0ab72bb9a
feat: reports v2 implementation ( #4608 )
...
This PR refactors the reports generation code.
It removes RCR and CRCR crds and replaces them with AdmissionReport, ClusterAdmissionReport, BackgroundScanReport and ClusterBackgroundScanReport crds.
The new reports system is based on 4 controllers:
Admission reports controller is responsible for cleaning up admission reports and attaching admission reports to their corresponding resource in case of a creation
Background scan reports controller is responsible for creating background scan reports when a resource and/or policy changes
Aggregation controller takes care of aggregation per resource reports into higher level reports (per namespace)
Resources controller is responsible for watching reports that need background scan reports
I added two new flags to disable admission reports and/or background scan reports, the whole reporting system can be disabled if something goes wrong.
I also added a flag to split reports in chunks to avoid creating too large resources.
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
Co-authored-by: prateekpandey14 <prateek.pandey@nirmata.com>
2022-09-28 17:15:16 +05:30
shuting
34c6920129
Support PSa integration by controlName
only ( #4710 )
...
* Remove "restrictedField" and "values" from podSecurity.exclude
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Remove commented code
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Add unit tests for restricted_runAsNonRoot
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Add baseline unit tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Add unit tests for restricted controls
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Removes PSa tests at the engine level
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* - Update API docs; - Add unit tests for wildcard images
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Remove autogen conversion for PSa policies
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* copy pod with DeepCopy()
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-09-28 10:03:53 +00:00
Charles-Edouard Brétéché
8741c34081
fix: shutdown controllers workers gracefully ( #4681 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-09-26 15:24:57 +00:00
Vyankatesh Kudtarkar
23269b7f5c
Fix issue for wildcard versions ( #4670 )
...
* Fix wildcard issue
Co-Authored-By: vyankd <51167361+vyankd@users.noreply.github.com>
* Delete res.yaml
Co-Authored-By: vyankd <51167361+vyankd@users.noreply.github.com>
Co-authored-by: vyankd <51167361+vyankd@users.noreply.github.com>
2022-09-23 22:04:39 +08:00
Charles-Edouard Brétéché
6eea7c45f7
feat: add explicit key support to controller utils ( #4628 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-09-19 11:25:03 +00:00
Charles-Edouard Brétéché
d256735399
feat: add controller utils tools ( #4639 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-09-18 10:12:29 +01:00
Charles-Edouard Brétéché
bc4bf5ee27
chore: switch to github.com/IGLOU-EU/go-wildcard ( #4563 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2022-09-10 17:30:13 +00:00
Charles-Edouard Brétéché
f0fa50b27e
refactor: webhook block and unit tests ( #4531 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-09-08 08:36:31 +00:00
Charles-Edouard Brétéché
1947dafed6
fix: load policy and add tests ( #4515 )
...
* fix: load policy and add tests
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix callers
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-09-06 15:16:44 +00:00
Charles-Edouard Brétéché
a278123464
chore: add unit tests for pkg/utils/json ( #4516 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-09-06 14:18:48 +01:00
Charles-Edouard Brétéché
103ba4b947
chore: add unit tests for pkg/utils/yaml ( #4512 )
...
* chore: add unit tests for pkg/utils/yaml
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* testify
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-09-06 08:31:30 +00:00
Charles-Edouard Brétéché
429fe175bf
chore: add unit tests for pkg/utils/wildcard ( #4510 )
...
* chore: add unit tests for pkg/utils/wildcard
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* testify
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-09-06 08:02:41 +00:00
Charles-Edouard Brétéché
870462cc6d
chore: add unit tests for pkg/utils/os ( #4509 )
...
* chore: add unit tests for pkg/utils/os
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* review
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-09-06 07:19:29 +00:00
Charles-Edouard Brétéché
1eb67422ef
chore: add unit tests for pkg/utils/image ( #4508 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-09-05 20:46:57 +00:00
Charles-Edouard Brétéché
a86a76848f
chore: add wildcard unit test ( #4506 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-09-05 17:25:58 +05:30
shuting
99f6dedb20
fix logger format ( #4474 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-09-01 07:33:36 +00:00
shuting
3bf3dcc1af
Add the metric "kyverno_client_queries_total" ( #4359 )
...
* Add metric "kyverno_kube_client_queries_total"
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* publish metric for missing queries
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Refactor the way Kyverno registers QPS metric
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Move clientsets to a dedicated folder
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Wrap Kyverno client and policyreport client to register client query metric
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* address linter comments
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* address linter comments
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Switch to use wrapper clients
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-08-31 11:33:47 +05:30
Charles-Edouard Brétéché
fc1a4601a7
refactor: introduce wildcard utils package ( #4406 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-08-25 05:23:01 +00:00
Charles-Edouard Brétéché
144985ee5a
chore: fix golangcilint timeout ( #4388 )
...
* chore: fix golangcilint timeout
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix commit sha
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* add .gitattributes
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-08-24 21:08:24 +08:00
Anutosh Bhat
d92e16526f
Added appropriate logging levels to log.Info() calls wherever necessary ( #4341 )
...
* Added appropriate logging levels to log.Info() calls wherever necessary
Signed-off-by: anutosh491 <andersonbhat491@gmail.com>
* Changed logging levels to 2
Signed-off-by: anutosh491 <andersonbhat491@gmail.com>
Signed-off-by: anutosh491 <andersonbhat491@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-08-18 13:24:59 +00:00
Jim Bugwadia
943c3a1929
use failurePolicy to block or allow requests, on policy errors ( #4183 )
...
* use failurePolicy to block or allow requests, on policy errors
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add warnings
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* codegen
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix linter issues
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add unit tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* handle network errors
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix linter issues
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix test
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix title conversion
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix path in generated file
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix test
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix fake metrics
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add check for klog flag initialization
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* check for flag reinitialization
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* check for flag reinitialization
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix spelling
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix flag init
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2022-08-02 20:24:02 +05:30
Jim Bugwadia
4aa0767728
add applyRules to control whether one or all rules are applied ( #4196 )
...
* add ruleSelector
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix selector logic for skipped rules
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* change names
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix generated paths
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix linter issues
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add image variable to context when rule processing starts
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix messages
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* update generate rules
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-07-29 15:02:26 +08:00
Tathagata Paul
3e2894b6fa
feat: Opentelemetry support for metrics and traces ( #3910 )
...
* integrating opentelemetry
Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>
* fix multiple imports
Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>
* fixed cli help statement
Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>
* added init file for metrics
Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-07-11 17:49:47 +00:00
Jim Bugwadia
58337716c8
Fix merging JSON patches ( #4202 )
...
* fix merge of image verify and mutate patches
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* update json patch merge logic
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2022-07-11 09:26:31 +05:30
Vyankatesh Kudtarkar
12693e1a9c
fix external.metrics.k8s.io/v1beta1 issue ( #4139 )
...
* fix external.metrics.k8s.io/v1beta1 issue
* update find resource discovery method
* revert validate.go
* revert chnages
* update discovery method
* fix error handler issue
* add logger support
2022-07-01 03:00:05 +00:00
shuting
cd2d89bf55
Wait for informers' cache to be synced before starting controllers ( #4155 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-06-28 04:55:52 +00:00
Charles-Edouard Brétéché
dd4fd943b1
feat: add controller utils package ( #3952 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-05-23 13:45:04 +00:00
Charles-Edouard Brétéché
5243763674
chore: make dclient import aliases consistent ( #3951 )
...
* chore: make kyverno api import aliases consistent
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* chore: make apimachinery api import aliases consistent
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* chore: make dclient api import aliases consistent
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-17 14:40:51 +00:00
Charles-Edouard Brétéché
5aaf2d8770
chore: make kyverno api import aliases consistent ( #3939 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-17 13:12:43 +02:00
Charles-Edouard Brétéché
0099ef54ad
chore: enable gofmt and gofumpt linters ( #3931 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-17 06:19:03 +00:00
Charles-Edouard Brétéché
c12f94d6d4
chore: enble gci linter ( #3930 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-05-17 07:56:48 +02:00
Charles-Edouard Brétéché
97e5e64fd4
chore: enable whitespace linter ( #3864 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-10 17:01:29 +00:00
Jim Bugwadia
bc07943c81
handle subresources ( #3841 )
...
* handle subresources
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make fmt
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix logger name
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix webhook and logs
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make fmt
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-05-09 18:50:50 -07:00
Charles-Edouard Brétéché
0a783bdc7d
chore: remove useless util NewKubeClient ( #3795 )
2022-05-04 13:14:17 +01:00
Charles-Edouard Brétéché
32789d1c0d
fix: add missing tombstone calls ( #3784 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-05-03 16:58:20 +00:00
Charles-Edouard Brétéché
f70ef051dc
refactor: move ImageExtractorConfigs in api package ( #3781 )
2022-05-03 08:45:08 +00:00
Charles-Edouard Brétéché
c79223393b
refactor: dclient package ( #3775 )
...
* refactor: replace clientset by inteface
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: dclient package
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-03 13:30:04 +08:00
Jim Bugwadia
0771ffd474
Add error handling and log for image extractor errors ( #3724 )
...
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-05-01 23:44:51 +00:00
Charles-Edouard Brétéché
a6924a11ab
refactor: use typed k8s client in tls package ( #3678 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-04-26 20:18:14 +00:00