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

3815 commits

Author SHA1 Message Date
NoSkillGirl
a2e106a87a fixed global variable test cases
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-10-05 11:11:54 +05:30
NoSkillGirl
8e0ac567e1 fixed test-validate-image-tag-ignore test case
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-10-05 11:11:54 +05:30
NoSkillGirl
7b94a7477b panic fix
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-10-05 11:11:54 +05:30
NoSkillGirl
1bf48c54a8 improving if condition
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-10-05 11:11:54 +05:30
NoSkillGirl
f4e9543b40 updated apply policy on resource function
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-10-05 11:11:54 +05:30
vivek kumar sahu
ae6f6c327f Added Code to support the test command for mutate policy (#2279)
* Added test-e2e-local in the Makefile
* Added a proper Indentation
* Added 3 more fields
* Added getPolicyResourceFullPath function
* Updating the patchedResource path to full path
* Converts Namespaced policy to ClusterPolicy
* Added GetPatchedResourceFromPath function
* Added GetPatchedResource function
* Checks for namespaced-policy from policy name provided bu user
* Generalizing resultKey for both validate and mutate. Also added kind field to this key
* Added Type field to PolicySpec
* To handle mutate case when resource and patchedResource are equal
* fetch patchResource from path provided by user and compare it with engine patchedResource
* generating result by comparing patchedResource
* Added kind to resultKey
* Handles namespaced policy results
* Skip is required
* Added []*response.EngineResponse return type in ApplyPolicyOnResource function
* namespaced policy only surpasses resources having same namespace as policy
* apply command will print the patchedResource whereas test will not
* passing engineResponse instead of validateEngineResponse because it supports results for both validate and mutate case
* default namespace will printed in the output table if no namespace is being provided by the user
* Added e2e test for mutate policy and also examples for both type of policies
* Created a separate function to get resultKey
* Changes in the resultKey for validate case
* Added help description for test command in the cli
* fixes code for more test cases
* fixes code to support more cases and also added resources for e2e-test
* some small changes like adding brackets, clubbing 2 if cond into one, changing variable name, etc.
* Rearrange GetPatchedResourceFromPath function to get rid from repetion of same thing twice.
* Added kind in the result section of test.yaml for all test-cases
* engineResponse will handle different types of response
* GetPatchedResource() uses GetResource function to fetch patched resource

Signed-off-by: viveksahu26 <vivekkumarsahu650@gmail.com>
2021-10-05 11:11:54 +05:30
Kumar Mallikarjuna
aba2e58f09
Added PodDisruptionBudget in kustomize & helm (Rebased) (#2463)
* added pdb in helm & kustomize

Signed-off-by: Christopher Haar <chhaar30@googlemail.com>

* added pdb in helm & kustomize

Signed-off-by: Christopher Haar <chhaar30@googlemail.com>

* changed for comments

Signed-off-by: Christopher Haar <chhaar30@googlemail.com>

* Updating minAvailable

Signed-off-by: Kumar Mallikarjuna <kumarmallikarjuna1@gmail.com>

* Removed redundant lines

Signed-off-by: Kumar Mallikarjuna <kumarmallikarjuna1@gmail.com>

* Updated README

Signed-off-by: Kumar Mallikarjuna <kumarmallikarjuna1@gmail.com>

* Updated README

Signed-off-by: Kumar Mallikarjuna <kumarmallikarjuna1@gmail.com>

Co-authored-by: Christopher Haar <christopher@DKBs-MBP.localdomain>
Co-authored-by: Christopher Haar <chhaar30@googlemail.com>
2021-10-04 22:39:24 -07:00
Vyankatesh Kudtarkar
9541d2be3e
Validate GVK while installing policy & Fix any/all matching logic (#2458)
* Handle case-sensitive GVK & Fix any/all matching logic

* Fix any/all matching logic in the background controller

* fix cli issue

* fix any all issue

* add exclude block

* add validation for exclude block

* fix exclude issue
2021-10-04 12:00:57 -07:00
Kumar Mallikarjuna
b7c8368569
Adding deprecation warning for any and all (Rebased) (#2466)
* added deprecation warning for any and all

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* Updated schemas

Signed-off-by: Kumar Mallikarjuna <kumarmallikarjuna1@gmail.com>

Co-authored-by: RinkiyaKeDad <arshsharma461@gmail.com>
2021-10-04 11:57:39 -07:00
Jim Bugwadia
705e029ff0
Merge pull request #2443 from JimBugwadia/feature/foreach_validate
Feature/foreach validate
2021-10-04 00:05:36 -07:00
Jim Bugwadia
94335d58c9 fix golangci-lint issues
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-10-03 23:39:55 -07:00
Jim Bugwadia
6cf9fdd502 fix compile errors
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-10-03 23:23:45 -07:00
Jim Bugwadia
ee6aafa7bb fix linter issues
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-10-03 23:07:40 -07:00
Jim Bugwadia
529a3509d5 fix deployment-missing-labels test
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-10-03 22:36:06 -07:00
Jim Bugwadia
c9ec282764 format
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-10-03 04:00:06 -07:00
Jim Bugwadia
77ae92e784 improve messages
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-10-03 03:28:58 -07:00
Jim Bugwadia
731ffde0e7 fix messages and tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-10-03 03:15:22 -07:00
Jim Bugwadia
086194ffab fix reporting
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-10-03 01:31:05 -07:00
Jim Bugwadia
8b7d404ea2 generate CRDs and validate handling of skip/error
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-10-02 18:29:25 -07:00
Jim Bugwadia
89d1e4afab format
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-10-02 16:57:40 -07:00
Jim Bugwadia
e0e6074afc add validation; add 'element' to context
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-10-02 16:53:02 -07:00
Jim Bugwadia
f015c16f08 fmt
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-10-02 14:24:23 -07:00
Jim Bugwadia
2bd5bca721 merge foreach and add attestation checks
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-10-02 14:24:06 -07:00
Jim Bugwadia
249c0f62f8 support attestations
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-10-02 01:19:47 -07:00
Pooja Singh
c32002837d
supporting request object for generate policies (#2455)
* supporting request object for generate policies

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>

* updated naming for operation

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>

* run make kustomize-crd

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-10-01 11:39:29 -07:00
Jim Bugwadia
0dbe7ea675 start attestation support
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-10-01 11:10:36 -07:00
Jim Bugwadia
1ebd2c99f2 add messages and set rule to skip when pattern does not match
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-09-30 23:34:04 -07:00
Jim Bugwadia
6ae3063038 merge main
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-09-30 11:53:33 -07:00
Jim Bugwadia
5b5a85c16a change RuleStatus values to lowercase
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-09-30 00:04:13 -07:00
shuting
af944b9cd5
Add new fields webhookTimeoutSeconds and failurePolicy to the policy Spec (#2456)
* add tag WebhookTimeoutSeconds to policy spec

Signed-off-by: ShutingZhao <shutting06@gmail.com>

* add spec.failurePolicy

Signed-off-by: ShutingZhao <shutting06@gmail.com>
2021-09-29 20:53:34 -07:00
Anita-ihuman
575f3627fc
Updating the Contributing.md file (#2450)
* create configuration for behaviour bot

Signed-off-by: Anita-ihuman <charlesanita403@gmail.com>

* adding contributor images

Signed-off-by: Anita-ihuman <charlesanita403@gmail.com>

* fixed typo in config.yml

Signed-off-by: Anita-ihuman <charlesanita403@gmail.com>

* including config file to ignore.

Signed-off-by: Anita-ihuman <charlesanita403@gmail.com>

* refined the contributing.md file

Signed-off-by: Anita-ihuman <charlesanita403@gmail.com>

* updated  the contributing.md file

Signed-off-by: Anita-ihuman <charlesanita403@gmail.com>

* updated  the contributing.md file

Signed-off-by: Anita-ihuman <charlesanita403@gmail.com>

* updated  the contributing.md file

Signed-off-by: Anita-ihuman <charlesanita403@gmail.com>
2021-09-29 20:52:03 -07:00
Pooja Singh
22789443a8
Merge pull request #2420 from NoSkillGirl/debug_2406_flacky_unit_test
Fix for flaky unit test
2021-09-29 17:02:54 +05:30
Vyankatesh Kudtarkar
edc29c5546
Merge pull request #2451 from vyankyGH/any/All_backgroundScan
Fix No warning about background mode when using any / all in match
2021-09-29 14:17:38 +05:30
Vyankatesh Kudtarkar
34da0a993e Fix No warning about background mode when using any / all in match 2021-09-29 11:02:48 +05:30
NoSkillGirl
9513cca68f removing commented test case
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-09-29 11:02:07 +05:30
NoSkillGirl
ff540bfb06 removing print statement
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-09-29 10:59:54 +05:30
Anushka Mittal
dc6694029c
Update anti-affinity to the soft limit (#2441) 2021-09-28 14:00:49 -07:00
Shubham Palriwala
5b01dd53a7
remove minio/minio and update minio/pkg (#2440)
Signed-off-by: ShubhamPalriwala <spalriwalau@gmail.com>
2021-09-28 12:19:26 -07:00
NoSkillGirl
83a815d7cf added test cases
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-09-28 20:17:03 +05:30
Vyankatesh Kudtarkar
5273a7fa7b
Fix skipped policy message is displayed even if variable is passed (#2446) 2021-09-28 19:06:16 +05:30
Jim Bugwadia
3957a1400e fix deny check and fmt
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-09-27 23:40:05 -07:00
Jim Bugwadia
a905a61581 fix deny rules
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-09-27 14:28:55 -07:00
Kumar Mallikarjuna
6a81bb7cc3
Escape references (#2433)
* Escape references

Signed-off-by: Kumar Mallikarjuna <kumarmallikarjuna1@gmail.com>

* Additional tests

Signed-off-by: Kumar Mallikarjuna <kumarmallikarjuna1@gmail.com>
2021-09-27 11:44:56 -07:00
ShubhamPalriwala
187f054809 feat: add SBOM using cosign
Signed-off-by: ShubhamPalriwala <spalriwalau@gmail.com>
2021-09-27 15:26:11 +05:30
ShubhamPalriwala
f3318767d8 feat: sign images using cosign on release
Signed-off-by: ShubhamPalriwala <spalriwalau@gmail.com>
2021-09-27 15:26:11 +05:30
ShubhamPalriwala
614975b1c6 feat: sign images using cosign on build
Signed-off-by: ShubhamPalriwala <spalriwalau@gmail.com>
2021-09-27 15:26:11 +05:30
Jim Bugwadia
536b64bed1 fix tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-09-26 21:15:13 -07:00
Jim Bugwadia
67660647d9 update tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-09-26 18:30:53 -07:00
Jim Bugwadia
6c5fb08e45 merge main
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-09-26 02:20:29 -07:00
Jim Bugwadia
39061d91c4 implement validate.foreach
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-09-26 02:12:31 -07:00