1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-15 17:51:20 +00:00
Commit graph

2958 commits

Author SHA1 Message Date
Jim Bugwadia
14d82cbf6d
Require predicate type (#5713)
* fix digest and verify logic

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* allow attestations with no attestors

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* require predicateType

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* fix typo

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-19 10:15:07 +00:00
shuting
b5625f340c
fix logger panic (#5715)
Signed-off-by: ShutingZhao <shuting@nirmata.com>

Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-12-19 09:40:17 +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
shuting
4679766879
fix missing assignment (#5710)
Signed-off-by: ShutingZhao <shuting@nirmata.com>

Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-12-16 15:58:30 +00:00
shuting
810b1335b6
initialize configmap resolver in background components (#5705)
Signed-off-by: ShutingZhao <shuting@nirmata.com>

Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-12-16 10:26:48 +00: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
Jim Bugwadia
85bb5f32be
fix digest and verify logic (#5703)
* fix digest and verify logic

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* allow attestations with no attestors

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2022-12-16 08:44:49 +00:00
Charles-Edouard Brétéché
a34bbaa586
fix: block policy admission if kyverno is down (#5677)
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-16 07:05:06 +00:00
cleverhu
8fd841a912
fix info kind error (#5701)
Signed-off-by: cleverhu <shouping.hu@daocloud.io>

Signed-off-by: cleverhu <shouping.hu@daocloud.io>
2022-12-15 16:00:50 +01:00
Charles-Edouard Brétéché
66ba0fc5ec
fix: exception validation follow up (#5697)
* fix: exception validation follow up

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>
2022-12-15 17:53:22 +08: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
Charles-Edouard Brétéché
84a5b0d0bc
fix: bump log level for autogen debug logs (#5687)
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-14 13:06:24 +00:00
Charles-Edouard Brétéché
d100f4647d
chore: remove secrets client from webhook controller (#5682)
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-14 01:00:29 +00:00
Charles-Edouard Brétéché
3bd1f82d2e
fix: case where deny message is not a string (#5678)
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-13 20:30:36 +00:00
Eileen
3eede76fc4
feat: Introduce PolicyException CRD (#5662)
* feat: Introduce PolicyException CRD

Signed-off-by: Eileen Yu <eileenylj@gmail.com>

* Apply suggestions from code review

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>
2022-12-13 11:02:54 -08:00
cleverhu
62cc95e721
fix AllNotIn operator (#5636)
Signed-off-by: cleverhu <shouping.hu@daocloud.io>

Signed-off-by: cleverhu <shouping.hu@daocloud.io>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-12-13 09:52:16 +00:00
Charles-Edouard Brétéché
2fea112a60
feat: add engine traces (#5463)
* feat: make traces better

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* feat: add tracing in engine validation

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* refactor

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* audit

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>

* 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>

* chart 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>

* trace

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fixes and image verification

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* mutate

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* mutate

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>

* remove chart deps

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* remove tempo

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* bump deps

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* makefile

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* makefile

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* makefile

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* makefile

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* prometheus

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* child span

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>

* more spans

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* audit

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix cosign spans

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix cosign spans

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>

* mutation

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>

* mutation tracing

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-12 20:32:11 +00:00
Jim Bugwadia
af4c8ed886
use camel case for ForEach naming (#5660)
Signed-off-by: Jim Bugwadia <jim@nirmata.com>

Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2022-12-12 19:24:13 +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
Charles-Edouard Brétéché
718f80c5a1
refactor: tracing package (#5643)
* refactor: tracing package

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* child span

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:39:37 +01:00
Charles-Edouard Brétéché
d16bdba1d4
feat: improve cleanup policies controller and chart (#5628)
* feat: improve cleanup policies controller

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* helm improvements

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>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-12-09 17:12:37 +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é
ff728d5f2b
feat: propagate context through engine (#5639)
* feat: propagate context through engine

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* feat: propagate context through engine

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* feat: propagate context through engine

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* feat: propagate context through engine

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-09 21:45:11 +08:00
Charles-Edouard Brétéché
9dc001e758
feat: add conditions matching to cleanup controller (#5626)
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-09 10:24:04 +00:00
Charles-Edouard Brétéché
7db2307574
fix: setup tracing and minor cleanup in tracing and metrics code (#5629)
* fix: setup tracing and minor cleanup in tracing and metrics 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>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-12-09 09:49:45 +00:00
Charles-Edouard Brétéché
39b72eefb9
feat: add http clients tracing (#5630)
* feat: add http clients tracing

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* check we are in a span before creating one and and context to metrics recording calls

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-09 09:09:11 +00:00
Charles-Edouard Brétéché
8376bf8b6b
feat: use lister in registry client (#5620) 2022-12-09 00:51:45 +08:00
Charles-Edouard Brétéché
ed97ff66d0
fix: registry client not propagated correctly (#5622)
* fix: registry client not propagated correctly

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>
2022-12-08 23:23:18 +08:00
Charles-Edouard Brétéché
aade51e20a
fix: don't create orphan spans in instrumented clients (#5624)
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 15:52:12 +01: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
shuting
acc208960d
fix nil error panic (#5619)
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-12-08 08:32:44 +00:00
Charles-Edouard Brétéché
ae0dd5ce08
fix: mutation of cached object in bg scan controller (#5608)
* fix: mutation of cached object in bg scan controller

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix: mutation of cached object in bg scan 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>
Co-authored-by: shuting <shuting@nirmata.com>
2022-12-07 15:37:23 +00:00
Charles-Edouard Brétéché
7219b4f8a3
refactor: registry client (#5596)
* refactor: registry client

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>
2022-12-07 23:08:37 +08: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
ansalamdaniel
9c4f05e883
Fix: handling unexpected global-anchor-variable for the apply command (#5590)
Signed-off-by: ansalamdaniel <ansalam.daniel@infracloud.io>

Signed-off-by: ansalamdaniel <ansalam.daniel@infracloud.io>
2022-12-07 16:05:05 +08:00
Charles-Edouard Brétéché
c8185feb11
fix: use lister for CA secret (#5598)
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-07 14:08:37 +08:00
Charles-Edouard Brétéché
d19e870c17
refactor: update otlp packages (#5367)
* fix: panic when disable metrics is true

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* refactor: update otlp 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>

* 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>

* update bunch of deps

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* target infos

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>

* 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: Chip Zoller <chipzoller@gmail.com>
2022-12-06 15:41:00 +00:00
Charles-Edouard Brétéché
d9272d9b93
refactor: jmespath arithmetic operations (#5544)
* refactor: add and subtract jmespath operations

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 tests

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix multiply

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* divide

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>

* modulo

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-05 11:15:32 +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
Pratik Shah
f8ed1a9301
issue-4613: Add support for cache enhancements with informers (#5484)
Signed-off-by: Pratik Shah <pratik@infracloud.io>

Signed-off-by: Pratik Shah <pratik@infracloud.io>
2022-12-02 13:59:51 +00:00
Charles-Edouard Brétéché
5b89e2e5f8
refactor: make policy context immutable and fields private (#5523)
* refactor: make policy context immutable and fields private

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* refactor: make policy context immutable and fields 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>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-12-02 16:14:23 +08:00
shuting
ef06833613
feat: support attestations with multiple signatures (#5409)
* add new attribute ".verifyImages.attestations.attestors"

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* Update CRDs

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* support multiple subjects for attestations

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* - fix entries check; - refactors code

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* fix linter

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* - allow both attestors and attestations; - make attestations.attestor optional

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* fix panic

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* fix tests

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* add kuttl tests

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* fix tests

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* fix tests

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* fix tests

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* remove the invalid test

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* fix empty attestor

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* add cleanup steps

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* Update api/kyverno/v1/image_verification_types.go

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* update codegen

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: ShutingZhao <shuting@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@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-12-01 22:09:44 +00:00
Charles-Edouard Brétéché
56c1585cb1
fix: bug in report resource watcher (#5525)
* fix: bug in report resource watcher

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>
2022-12-01 22:13:26 +01:00
Charles-Edouard Brétéché
db9faf5835
fix: cleanup policy validation (#5514)
* fix: cleanup policy validation

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>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-12-01 16:02:21 +08: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é
1ea4a0db19
refactor: use internal cmd package in kyverno (#5507) 2022-11-30 13:37:53 +00:00
Charles-Edouard Brétéché
9b1860a4e5
refactor: add controller helper to internal package (#5506)
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 11:13:57 +00: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é
ff9ba81440
feat: add webhook type to admission metrics (#5493)
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 17:30:24 +08:00
Charles-Edouard Brétéché
c3be9e36a5
feat: propagate context to dynamic client (#5495)
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 13:59:40 +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é
938df21d4d
fix: panic when response is nil (#5502)
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-29 11:39:44 +00:00
Charles-Edouard Brétéché
dd4f1fb995
fix: report deletion fighting with garbage collection (#5486)
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-29 10:24:17 +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é
c2549898c9
refactor: move metrics closer to the code that use them (#5492)
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-28 19:11:11 +01:00
Charles-Edouard Brétéché
f9f01fc70d
chore: refactor metrics namespace check (#5489)
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-28 16:53:26 +01:00
ansalamdaniel
2ba4def87c
Fix: handled skip rule processing in anyPattern field (#5191)
Signed-off-by: ansalamdaniel <ansalam.daniel@infracloud.io>
2022-11-28 08:01:51 -05:00
Charles-Edouard Brétéché
dfded5cc60
feat: propagate context to the metrics package (#5479)
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-28 10:30:14 +00:00
Rodrigo Fior Kuntzer
08447c108f
fix: fix mutating the "/metadata/serverAddress" section of a keda.s/v1alpha1/ScaledObject object (#5374)
* fix: fix mutating the "/metadata/serverAddress" section of a keda.sh/v1alpha1/ScaledObject object

Signed-off-by: Rodrigo Fior Kuntzer <rodrigo@miro.com>

* fix: update test policy

Signed-off-by: Rodrigo Fior Kuntzer <rodrigo@miro.com>

Signed-off-by: Rodrigo Fior Kuntzer <rodrigo@miro.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-11-28 09:55:42 +00:00
Charles-Edouard Brétéché
a09d2a77e5
feat: add allowed label to admission metrics (#5478)
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-28 08:59:05 +00:00
Charles-Edouard Brétéché
3970f2556c
fix: typo in autogen package (#5480)
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 22:51:26 +00:00
Charles-Edouard Brétéché
f08db8709c
chore: improve tracing instrumented clients (#5474)
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-25 13:59:14 +00:00
Charles-Edouard Brétéché
e03f48128a
refactor: metrics configuration code (#5475)
* refactor: metrics configuration

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>
2022-11-25 13:14:55 +00:00
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
Nikhil Sharma
8547c8ff8c
Add reconciling logic for creating cronjobs whenever a new cleanup policy is created (#5385)
* add reconcile logic to create CronJobs

Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.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>

* more 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>

* fix lint issues

Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.com>

* watch cronjobs in reconciliation

Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.com>

* fix

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>
Signed-off-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: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-11-25 09:59:45 +00:00
Charles-Edouard Brétéché
fa88f4a2ff
feat: add new filtering handlers (#5472)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-11-25 08:58:13 +00:00
Charles-Edouard Brétéché
67bd7b1edc
fix: remove filtering for policy admission handlers (#5462)
* fix: remove filtering for policy admission handlers

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* move kyverno filtering

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-11-25 09:21:39 +01:00
Prateek Pandey
42221a93e4
fix: add clone check before validating namespace policy (#5459)
fix: add clone check before validate clone namespace

- fix data policy validation
- add kuttl tests to validate the behaviour

Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
2022-11-25 12:49:22 +05:30
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
Charles-Edouard Brétéché
3766f6e6cf
fix: log watcher error in reports controller (#5449)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-11-23 23:18:50 +05:30
shuting
93eaead565
fix: mutate existing policy does not get applied when background=false (#5439)
* fix mutate existing policies when background=false

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* add the kuttl test

Signed-off-by: ShutingZhao <shuting@nirmata.com>

Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-11-23 08:16:06 +00:00
Charles-Edouard Brétéché
f4c2f24208
feat: improve handlers tracing code (#5442)
* feat: improve handlers tracing 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>

* fix 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>
2022-11-23 06:50:55 +00:00
Charles-Edouard Brétéché
900002fcf9
chore: bump a bunch of deps (#5440)
* chore: bump a bunch of 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>
2022-11-23 14:03:16 +08:00
Charles-Edouard Brétéché
ecbdaae292
feat: add logging support to instrumented clients (#5438)
* feat: add discovery support in instrumented clients

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix tracing

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* feat: add logging support to instrumented clients

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-11-22 15:12:30 +00:00
Charles-Edouard Brétéché
4ccec04bfa
feat: add discovery support in instrumented clients (#5437)
* feat: add discovery support in instrumented clients

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix tracing

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-22 14:26:49 +00:00
Charles-Edouard Brétéché
2178b9fe77
refactor: dynamic client use instrumented clients (#5436)
* refactor: improve instrumented clients creation

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: instrumented clients code part 3

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>

* refactor: dynamic client

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-22 13:37:27 +00:00
Charles-Edouard Brétéché
2765ab166d
chore: remove obsolete metrics client code (#5401)
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-22 11:44:06 +00:00
Charles-Edouard Brétéché
447360c1f3
refactor: improve instrumented clients code and support dynamic/metadata client (#5428)
* refactor: improve instrumented clients creation

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: instrumented clients code part 3

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>

* metadata

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* metadata

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-22 17:10:07 +08:00
Jim Bugwadia
f70c6ef444
Fix multi attestor keyless (#5432)
* match atleast one signature

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* add unit tests

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* gofumpt

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* gofumpt

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2022-11-22 06:37:24 +00:00
Vyankatesh Kudtarkar
dc0a07e5d8
Handle Match resources kind (#5421)
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-11-22 01:20:24 +00:00
Charles-Edouard Brétéché
4b11292835
chore: bump sigstore deps (#5376)
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-11-21 21:48:34 +00:00
Charles-Edouard Brétéché
8ff6ce1c7f
refactor: improve instrumented clients creation (#5417)
* refactor: improve instrumented clients creation

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>
2022-11-21 17:16:25 +00:00
Diego Nicacio
b0f5b2f537
logging action (#5416)
Signed-off-by: diegonicacio <diegoonicacio@gmail.com>

Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-11-21 21:39:20 +05:30
Charles-Edouard Brétéché
58933452c1
fix: typo (#5415)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-11-21 12:37:47 +05:30
Charles-Edouard Brétéché
ce94187bd3
feat: make traces better (#5412)
* feat: make traces better

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* error

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-20 14:42:57 +01:00
Charles-Edouard Brétéché
4bdd45c0cc
refactor: introduce cmd internal package (#5404)
* refactor: introduce cmd internal 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>

* changelog

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* informer

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* tracing

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix flag

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-11-18 22:21:15 +08:00
Charles-Edouard Brétéché
1b307ff6c5
refactor: generated instrumented client code part 2 (#5398)
* refactor: generated instrumented client 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>

* linter

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* kyverno client

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* client type

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* factory

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* linter

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* makefile

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* main

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* remove manually instrumented clients

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>

* refactor and traces

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>

* use instrumented clients

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-18 10:07:29 +00:00
Charles-Edouard Brétéché
9983e82770
feat: add tracing middleware (#5397)
* feat: add tracing middleware

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* add middleware

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* add tracing to middlewares

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>
2022-11-18 09:18:00 +00:00
Pratik Shah
dccb1f692a
Fixed issue-3709: Image verify rule gives error for non-existing configmap (#5272)
Signed-off-by: Pratik Shah <pratik@infracloud.io>

Signed-off-by: Pratik Shah <pratik@infracloud.io>
2022-11-18 08:27:34 +00:00
Charles-Edouard Brétéché
1f48610cd2
refactor: generate instrumented client code (#5362)
* refactor: generated instrumented client 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>

* linter

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* kyverno client

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* client type

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* factory

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* linter

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* makefile

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* main

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* remove manually instrumented clients

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>
2022-11-17 16:01:30 +00:00
Charles-Edouard Brétéché
fdf5b840b6
refactor: propagate context through admission handlers (#5392)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-11-17 15:17:52 +00:00
Charles-Edouard Brétéché
ebe8618cdc
refactor: improve tracing package (#5391)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-11-17 14:41:49 +00:00
Vyankatesh Kudtarkar
83a84c9d47
[Bug]: Fix wildcard any/all issue (#5387)
* Fix wildcard for any/all match/excude kinds

* remove non required test

* add kuttl test

* Revert "add kuttl test"

This reverts commit d2245bc248.

* add kuttl test

* fix test
2022-11-17 14:07:03 +00:00
shuting
b1367fd497
fix the entry length validation for the verify image rule (#5384)
Signed-off-by: ShutingZhao <shuting@nirmata.com>

Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-11-17 17:25:02 +05:30
Rodrigo Fior Kuntzer
bb90bb25ba
fix closed watchers in the resource-report-controller (#5350)
* fix: fix closed watchers in the resource-report-controller

Signed-off-by: Rodrigo Fior Kuntzer <rodrigo@miro.com>

* fix: using the resourceVersion from the list operation result

Signed-off-by: Rodrigo Fior Kuntzer <rodrigo@miro.com>

Signed-off-by: Rodrigo Fior Kuntzer <rodrigo@miro.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-11-17 09:37:51 +00:00
Riko Kudo
8acb8c3e38
fixed dryrun option to handle changes caused by mutating policy (#4899)
* fixed dryrun option to handle changes caused by mutating policy

Signed-off-by: Riko Kudo <rurikudo@ibm.com>

* add a check to avoid using kyverno namespace for dryrun

Signed-off-by: Riko Kudo <rurikudo@ibm.com>

* add a check to avoid using kyverno namespace for dryrun

Signed-off-by: Riko Kudo <rurikudo@ibm.com>

Signed-off-by: Riko Kudo <rurikudo@ibm.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2022-11-17 08:17:45 +00:00
Prateek Pandey
c0f479add9
fix: add validation for generate namespace policy (#5346)
* fix: add validation for generate namespace policy

- generate of cluster scope resource not allowed
- Only allowed to generate resource in policy namespace

Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>

* add unit tests to validate the behaviour

Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>

* fix error logs

Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>

Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-11-17 07:43:51 +00:00