1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
Commit graph

4535 commits

Author SHA1 Message Date
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
Charles-Edouard Brétéché
0cc4d9b1f0
fix: duration metrics precision (#4393)
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 19:08:42 +08:00
Charles-Edouard Brétéché
3d9417a58a
chore: add workflow to ensure github actions are pinned to a commit SHA (#4390)
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-23 22:02:13 +02:00
Charles-Edouard Brétéché
5cc97993dc
feat: add raw api call support (#3820)
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: shuting <shuting@nirmata.com>
2022-08-23 18:52:54 +02:00
Charles-Edouard Brétéché
6c93a925ab
chore: update maintainers md (#4380)
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-23 14:44:37 +00:00
Charles-Edouard Brétéché
8fc1754df7
chore: fix fossa ci job (#4382)
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-23 13:30:32 +00:00
Charles-Edouard Brétéché
2882a4fb13
fix: missing aggregated role for UR (#4378)
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-23 12:07:44 +00:00
Charles-Edouard Brétéché
fb93595397
fix: exclude autogen rules when autogen internals is enabled (#4370)
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-23 14:42:46 +08:00
Charles-Edouard Brétéché
e02dbc17d3
fix: prevent installing helm chart in namespace kube-system (#4368)
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-22 17:53:05 +02:00
Rodrigo Fior Kuntzer
8e5f831b07
fix: fix the verbosity of reconciling logs in the config controller (#4362)
Signed-off-by: Rodrigo Fior Kuntzer <rodrigo@miro.com>

Signed-off-by: Rodrigo Fior Kuntzer <rodrigo@miro.com>
2022-08-22 07:51:05 +00:00
George
648511383c
Update wgpolicyk8s.io CRDs (#4355)
* Update policyreport api

Signed-off-by: George Sedky <george@devopzilla.com>

* Run codegen to generate CRDs

Signed-off-by: George Sedky <george@devopzilla.com>

Signed-off-by: George Sedky <george@devopzilla.com>
Co-authored-by: George Sedky <george@devopzilla.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-08-22 07:18:33 +00:00
Tushar Dahiya
71af968eac
Update pr_documentation.md (#4361)
Signed-off-by: Tushar Dahiya <tusharxoxoxo@gmail.com>

Signed-off-by: Tushar Dahiya <tusharxoxoxo@gmail.com>
2022-08-21 22:05:00 +00:00
Ayushman
a79fb4d963
Added remove-color flag for CLI-test (#4345)
* added remove-color flag

Signed-off-by: Ayushman Mishra <ayushvidushi01@gmail.com>

* applied to print table

Signed-off-by: Ayushman Mishra <ayushvidushi01@gmail.com>

Signed-off-by: Ayushman Mishra <ayushvidushi01@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-08-19 19:11:19 +05:30
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
Anurag
0e25017ff8
update apply help message (#4344)
Signed-off-by: Anurag <81210977+kranurag7@users.noreply.github.com>

Signed-off-by: Anurag <81210977+kranurag7@users.noreply.github.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-08-18 06:52:30 +00:00
Vyankatesh Kudtarkar
de743ad2c9
Fix deprecated api policy issue (#4349) 2022-08-18 10:49:06 +05:30
vivek kumar sahu
17052436cb
Treat normal and precondition variable equally (#4217)
* When  the value of the variables not present will assigned as nil

Signed-off-by: viveksahu26 <vivekkumarsahu650@gmail.com>

* Added cli test cases

Signed-off-by: viveksahu26 <vivekkumarsahu650@gmail.com>

* fixed failing test cases

Signed-off-by: viveksahu26 <vivekkumarsahu650@gmail.com>

* remove extra line

Signed-off-by: viveksahu26 <vivekkumarsahu650@gmail.com>

Signed-off-by: viveksahu26 <vivekkumarsahu650@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-08-18 04:34:36 +00:00
Charles-Edouard Brétéché
186dde5589
fix: image verify logs (#4348)
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-17 19:32:19 -07:00
Sambhav Kothari
ea4f1cf4df
Remove myself as codeowner (#4333)
I get a lot of noise as I am a code-owner on quite a few of these files which distracts me from PR/issues where I am actually mentioned and a review is needed. Removing myself from code-owners for now.

Signed-off-by: Sambhav Kothari <sambhavs.email@gmail.com>

Signed-off-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-08-12 07:38:45 -04:00
Jim Bugwadia
22eb79a7f0
Fix PEM delimiter parse (#4331)
* update log levels

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

* do not generate policy reports for blocked images

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

* fix PEM delimiter parsing and add test case

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

Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2022-08-12 10:06:14 +00:00
treydock
b02da637b2
[Helm] Added ability to remove namespaces from default resourceFilters list (#4299)
Fixes #4287

Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>

Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
Co-authored-by: shuting <shuting@nirmata.com>
2022-08-12 09:36:01 +00:00
dependabot[bot]
0bb575442d
chore(deps): bump github.com/sigstore/cosign from 1.10.0 to 1.10.1 (#4328)
Bumps [github.com/sigstore/cosign](https://github.com/sigstore/cosign) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/sigstore/cosign/releases)
- [Changelog](https://github.com/sigstore/cosign/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sigstore/cosign/compare/v1.10.0...v1.10.1)

---
updated-dependencies:
- dependency-name: github.com/sigstore/cosign
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-11 12:38:27 +08:00
Tom Stewart
ca3d346fcc
support failurePolicy in kyverno-policies helm chart (#4323)
* support failurePolicy in kyverno-policies helm chart

Signed-off-by: Tom Stewart <thomas.stewart@arcadia.com>
2022-08-09 17:12:27 -04:00
vivek kumar sahu
c95bb74992
Context vars substitution in CLI (#4290)
* context variables substitution will be independent of sequence

Signed-off-by: viveksahu26 <vivekkumarsahu650@gmail.com>

* Added test cases

Signed-off-by: viveksahu26 <vivekkumarsahu650@gmail.com>

Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-08-09 05:48:57 +00:00
Kumar Mallikarjuna
94c60598af
Replaced status with message (#4315)
Signed-off-by: Kumar Mallikarjuna <kumar@nirmata.com>
2022-08-09 10:23:50 +05:30
aofekiko
b516aecb42
Changed resource names to plurals (#4312)
Signed-off-by: aofekiko <aofekiko@gmail.com>
2022-08-08 13:54:01 +00:00
Jim Bugwadia
66c3b3b8d0
Fix pr image verify blocked (#4297)
* update log levels

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

* do not generate policy reports for blocked images

Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2022-08-04 05:27:09 +00:00
Charles-Edouard Brétéché
421b490c56
feat: use tombstone helper (#4273)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-08-03 16:17:07 +00:00
Anutosh Bhat
663e7584ae
Tightened scope on apiGroups for Kyverno:events Clusterrole (#4292)
Signed-off-by: anutosh491 <andersonbhat491@gmail.com>

Co-authored-by: shuting <shuting@nirmata.com>
2022-08-03 15:36:03 +00:00
Dylan Shepard
d10f9d1b5a
trivial typo update (#4291)
Signed-off-by: Dylan Shepard <dylan@shepard.dev>
2022-08-03 04:28:06 +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
6fa8a97583
update log levels (#4286)
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2022-08-02 10:57:25 +05:30
Tobias Trabelsi
ba32121acb
added additional init and sidecar container config (#4283)
Signed-off-by: Tobias Trabelsi <Lerentis@users.noreply.github.com>
2022-08-01 13:29:27 +00:00
Guilhem Lettron
b03e461f25
feat: auto optimize GOMAXPROCS (#4277)
Signed-off-by: Guilhem Lettron <guilhem@barpilot.io>
2022-07-29 23:59:47 +08:00
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
vivek kumar sahu
03cec01fb5
feature: added new type of event, PolicySkipped (#4251)
* feature: added new type of event, PolicySkipped

Signed-off-by: viveksahu26 <vivekkumarsahu650@gmail.com>

* fix html docs

Signed-off-by: viveksahu26 <vivekkumarsahu650@gmail.com>

Co-authored-by: shuting <shuting@nirmata.com>
2022-07-28 14:01:50 +08:00
shuting
750b4b106c
Reset policy status on termination (#4269)
- reset policy status to false on termination
- retry reconciling policies when .status.ready=false


Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-07-27 14:15:06 +05:30
James Callahan
975a2a21fa
fix: use an absolute path in docker entrypoint (#4263)
With a relative path, containers started with a different working
directory will fail to find the entrypoint

Fixes: #4252
Signed-off-by: James Callahan <jamescallahan@bitgo.com>

Co-authored-by: shuting <shuting@nirmata.com>
2022-07-26 07:16:01 +00:00
Tathagata Paul
9b41e2e017
Add shutdown methods for exporters and controllers (#4214)
* add shutdown methods for exporters and controllers

Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>

* remove shutdown exporter and add timeout in main.go

Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>

* move ctx timeout to main

Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>

* change variable order

Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>
2022-07-25 09:25:26 +00:00
shuting
a190b6ed56
sync Helm versions (#4262)
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-07-25 06:33:51 +00:00
Guilhem Lettron
96999f8995
fix: use only 1 kubernetes client (#4256)
Signed-off-by: Guilhem Lettron <guilhem@barpilot.io>

Co-authored-by: shuting <shuting@nirmata.com>
2022-07-25 13:49:51 +08:00
Tuan Anh Tran
6136470f40
Add Techcombank to adopters (#4260)
Signed-off-by: Tuan Anh Tran <me@tuananh.org>
2022-07-23 01:53:41 +00:00
Anutosh Bhat
be6cc1381f
Implementing flag to show all failing tests only through the test command (#4227)
* fix kyverno cli policy-report typo (#4224)

- fix kyverno cli policy report typo 
- add shorthand for policy-report flag

Signed-off-by: Vyankatesh vyankateshkd@gmail.com
Signed-off-by: anutosh491 <andersonbhat491@gmail.com>

* Added flag for getting fail only tests

Signed-off-by: anutosh491 <andersonbhat491@gmail.com>

* Improve output message

Signed-off-by: anutosh491 <andersonbhat491@gmail.com>

* Updated flag name as per CamelCase

Signed-off-by: anutosh491 <andersonbhat491@gmail.com>

Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-07-22 20:02:12 +05:30
Prateek Pandey
3f1997c0e8
fix split policyreport name with background scan (#4237)
- fix split policyreport name with background scan
- fix the label selector initialising
- refactor the generatePolicyName func

Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
2022-07-21 14:31:42 +05:30
Batuhan Apaydın
9af9717f16
chore: use new distroless base image provided by distroless org (#4219)
* chore: use new distroless base image provided by distroless org

Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>

* chore: remove unnecessary user instruction

Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>

Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-07-21 06:37:56 +00:00
Vyankatesh Kudtarkar
530e38a6f4
fix check depreciated api issue (#4243) 2022-07-21 13:11:39 +08:00
shuting
23a1df0d7b
Cherry-pick #4233 (#4236)
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-07-20 22:22:15 +05:30
shuting
7a2045bc11
Revert "fix: metrics with invalid validationMode (#4198)" (#4241)
This reverts commit 65c100566c.
2022-07-20 15:22:03 +00:00
Ramón Berrutti
65c100566c
fix: metrics with invalid validationMode (#4198)
Signed-off-by: Ramón Berrutti <ramonberrutti@gmail.com>

Co-authored-by: shuting <shuting@nirmata.com>
2022-07-20 09:06:15 +00:00
Anutosh Bhat
dafa27e928
Corrected description for UpdateRequest struct (#4215)
* Corrected description for UpdateRequest struct

Signed-off-by: anutosh491 <andersonbhat491@gmail.com>

* Added changes for docs

Signed-off-by: anutosh491 <andersonbhat491@gmail.com>

* Added diff shown in verify generate tests

Signed-off-by: anutosh491 <andersonbhat491@gmail.com>

Co-authored-by: shuting <shuting@nirmata.com>
2022-07-19 12:16:50 +00:00