Sambhav Kothari
2dc54e5c1b
Allow variables of any kind to be defined ( #3828 )
...
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
2022-05-07 20:30:11 +00:00
Charles-Edouard Brétéché
306b22a5db
fix: policy deletion in webhookconfig ( #3832 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-07 21:09:19 +01:00
Afzal Ansari
3845225db1
refactor: imported pkg redeclared and a few other unused func ( #3827 )
...
* Removes paths redeclared
Signed-off-by: afzal442 <afzal442@gmail.com>
* fixes v1 redeclared
Signed-off-by: afzal442 <afzal442@gmail.com>
* fixes mergeSucceededResults func never used
Signed-off-by: afzal442 <afzal442@gmail.com>
* fixes func unused
Signed-off-by: afzal442 <afzal442@gmail.com>
* refactors unused func
Signed-off-by: afzal442 <afzal442@gmail.com>
* refactors unused func
Signed-off-by: afzal442 <afzal442@gmail.com>
* refactors getNamespacesForRule unused
Signed-off-by: afzal442 <afzal442@gmail.com>
* refactors policyNamespace unused
Signed-off-by: afzal442 <afzal442@gmail.com>
* refactors replacing loop with ...
Signed-off-by: afzal442 <afzal442@gmail.com>
* refactors func buildPolicyLabel unused
Signed-off-by: afzal442 <afzal442@gmail.com>
* removes unused func
Signed-off-by: afzal442 <afzal442@gmail.com>
* removes unused comment
Signed-off-by: afzal442 <afzal442@gmail.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-07 16:44:57 +00:00
Afzal Ansari
5262ed9225
refactor: shell to prevent globbing and word splitting ( #3829 )
...
* refactors scripts/create-e2e-infrastruture sh
Signed-off-by: afzal442 <afzal442@gmail.com>
* refactors scripts/deploy-controller.sh
Signed-off-by: afzal442 <afzal442@gmail.com>
* refactors scripts/generate-server-cert.sh
Signed-off-by: afzal442 <afzal442@gmail.com>
* minor changes
Signed-off-by: afzal442 <afzal442@gmail.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-07 16:46:50 +01:00
Moritz Johner
4d2ec26c90
CLI should respect scored annotation for warnings ( #3821 )
...
Co-authored-by: Sambhav Kothari <skothari44@bloomberg.net>
2022-05-07 13:33:50 +00:00
Sambhav Kothari
c3604c1170
Add an object_from_lists function ( #3824 )
2022-05-07 12:05:04 +00:00
Sambhav Kothari
876a216b5f
Improve logging and error handling in json context ( #3825 )
2022-05-07 11:32:48 +00:00
Sambhav Kothari
e55bf0bf6f
Relax JMESPath variable validation ( #3826 )
2022-05-07 16:40:53 +05:30
shuting
b4f2b63f53
Load mutate.targets
via dclient ( #3797 )
...
* Load mutate.targets via dclient
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Do not fail on namespace cleanup for e2e generate
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Fix wildcard name listing for a certain namespace
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Rename onPolicyUpdate to mutateExistingOnPolicyUpdate
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Enable "mutateExistingOnPolicyUpdate" on policy events
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-05-06 05:46:36 +00:00
Jim Bugwadia
db3502656d
Cert attestor ( #3809 )
...
* add certificates attestor
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* handle duplicate images; use container name as key
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* use OldObject for modify requests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* use unique image names
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* merge main
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* create a single annotation patch across rules and images
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fmt and change annotation key name
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix linter issues
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* split certs from keys
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make fmt
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix test
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add Rekor and fix tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-05-05 21:57:20 -07:00
Jim Bugwadia
76608e315e
handle duplicate images; use container name as key ( #3779 )
...
* handle duplicate images; use container name as key
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* use OldObject for modify requests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* use unique image names
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* merge main
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* create a single annotation patch across rules and images
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fmt and change annotation key name
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix linter issues
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-05 14:06:18 -07:00
Charles-Edouard Brétéché
5d2e2faf72
fix: autogen rules in status ( #3728 )
...
* refactor: autogen package logger
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix: add rules to status only when necessary
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2022-05-05 15:11:26 +00:00
Prateek Pandey
2af9046e13
refact: disable leader for update request controller ( #3807 )
...
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
2022-05-05 14:19:19 +00:00
Charles-Edouard Brétéché
d480f9f8f4
chore: remove broken .ca from helm chart ( #3811 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-05-05 13:53:04 +00:00
Charles-Edouard Brétéché
25c2bf0e1f
fix: remove k8s apiserver from self-generated cert ( #3803 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-05-05 13:26:55 +00:00
Vyankatesh Kudtarkar
13d8a96f92
Policy Validation check for onPolicyUpdate flag ( #3814 )
...
* policy validation check for OnPolicyUpdate flag
* add validation check for onupdatepolicy flag
2022-05-05 21:04:49 +08:00
shuting
8a9a98d8b5
Add handler
to UR.status
( #3791 )
...
* - Add "handler" to "ur.status"
- Mark / Unmark handler upon UR reconciliation
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Add field onPolicyUpdate
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Update API docs
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Add delay in generate e2e tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Remove duplicate logic for cleaning up the cloned resource
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-05-05 16:26:27 +05:30
Charles-Edouard Brétéché
4d08354498
fix: remove kubeconfig ( #3802 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-05 10:12:43 +00:00
Prateek Pandey
c79dc82eaa
fix: cleanup old dependencies from go.sum and go.mod ( #3806 )
...
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
2022-05-05 08:56:22 +00:00
Charles-Edouard Brétéché
9a1a82e3b5
feat: parse all root CA certs ( #3808 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-05 09:31:22 +01:00
Prateek Nandle
5be6a4e2b0
removed kubeconfig flags ( #3744 )
...
Signed-off-by: Prateeknandle <prateeknandle@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-04 21:11:21 +02:00
Sambhav Kothari
6e48fdf4ce
Fix issue with image registry when decoding OCI descriptors with out of spec keys ( #3799 )
2022-05-04 13:38:56 -04:00
Charles-Edouard Brétéché
bb6e9a1ada
refactor: move config controller in controllers package ( #3790 )
...
* refactor: use typed informers and add tombstone support to webhookconfig
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: remove unstructured usage from webhookconfig
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: cert manager controller
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: move config controller in controllers package
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-04 16:05:03 +00:00
Charles-Edouard Brétéché
288125ebd0
chore: add informer util ( #3796 )
2022-05-04 12:39:14 +00: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é
db735f2165
fix: pod stay in terminating when scaling to 0 ( #3793 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-05-04 10:57:56 +00:00
gsweene2
af51ceb4ff
Add JMESPath Function items
( #3777 )
...
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
Co-authored-by: Sambhav Kothari <skothari44@bloomberg.net>
2022-05-04 10:33:24 +00:00
Vyankatesh Kudtarkar
fca068d0f6
Fix Cli test for image verification ( #3760 )
...
* fix Cli test for image verification
2022-05-04 04:11:59 +00:00
Frank Jogeleit
43fc77c71f
Add rule to PolicyViolation event messages ( #3787 )
...
Signed-off-by: Frank Jogeleit <frank.jogeleit@lovoo.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2022-05-03 18:35:42 +00:00
Charles-Edouard Brétéché
2b6549fd5b
chore: remove config flags ( #3786 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-03 17:52:10 +00: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é
400e486b46
refactor: create a package for controllers and move certmanager in it ( #3782 )
...
* refactor: use typed informers and add tombstone support to webhookconfig
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: remove unstructured usage from webhookconfig
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: cert manager controller
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-04 00:23:34 +08:00
Charles-Edouard Brétéché
207459cc40
refactor: policycache package logger ( #3783 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-03 20:24:11 +08: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é
52d1b642d6
refactor: dclient package logger ( #3778 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-03 08:24:30 +00:00
Sambhav Kothari
266bfa1077
Fix PR update flow and allow updates from release branches ( #3780 )
...
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
2022-05-03 16:03:43 +08:00
Charles-Edouard Brétéché
873e394e5f
fix: cert manager duplicate event handler ( #3772 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-03 07:37:18 +00:00
Danny Kulchinsky
810369d876
webhookconfig: if services resource, add services/status as well ( #3740 )
...
Signed-off-by: Danny Kulchinsky <dkulchinsky@fastly.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-05-03 05:54: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
Charles-Edouard Brétéché
6e07acdd87
refactor: replace clientset by inteface ( #3774 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-02 20:30:07 +00:00
Charles-Edouard Brétéché
a592dad2aa
refactor: cosign package logger ( #3773 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-02 21:03:44 +01:00
Prateek Pandey
3e2c9b25c9
Bump cosign and sigstore version ( #3771 )
...
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2022-05-02 20:20:08 +01:00
Sambhav Kothari
0a9bcd5407
Auto-update PRs which are enabled for auto-merging ( #3766 )
2022-05-02 18:04:43 +00:00
Charles-Edouard Brétéché
18af55ed49
refactor: wait for cache sync ( #3765 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-03 01:41:39 +08:00
Sambhav Kothari
05c5f1b340
Allow kyverno jp to take yaml files as inputs ( #3768 )
2022-05-02 17:03:45 +00:00
Sambhav Kothari
0a5f004047
Allow non-object type elements for foreach rules ( #3763 )
...
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-05-02 16:39:37 +00:00
Charles-Edouard Brétéché
80abda568e
fix: logger call depth ( #3759 )
...
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-05-02 15:49:39 +00:00
Sambhav Kothari
e1ee6e8cbd
Reduce log verbosity for image extractors ( #3764 )
2022-05-02 15:04:19 +00:00
Charles-Edouard Brétéché
45e3bf452a
chore: remove unused resourcecache package ( #3762 )
2022-05-02 15:15:44 +01:00
Charles-Edouard Brétéché
972be16ad3
refactor: remove unstructured usage from webhookconfig ( #3737 )
...
* refactor: use typed informers and add tombstone support to webhookconfig
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: remove unstructured usage from webhookconfig
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-02 18:58:04 +08:00