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
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é
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
Abhinav Sinha
2cd988a153
Added validation for Condition Operators ( #2864 )
...
* Added validation for Condition Operators
Signed-off-by: Abhinav Sinha <zeborg3@gmail.com>
* Updated description of `Condition.Operator` with all current valid condition operators`
Signed-off-by: Abhinav Sinha <zeborg3@gmail.com>
* Added `ConditionOperators` map and updated existing `ConditionOperator` type references
Signed-off-by: Abhinav Sinha <zeborg3@gmail.com>
2021-12-28 15:12:31 +00:00
Jose Armesto
831a9826d1
Restructure project to follow standards ( #2632 )
...
Signed-off-by: Jose Armesto <github@armesto.net>
2021-10-29 18:13:20 +02:00
Marcus Noble
604c0408c6
Refactored operator tests to use test cases ( #2620 )
...
Identified several situations where operators didn't return the expected result (mainly around different types) so fixed those to make all tests cases pass.
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2021-10-29 10:54:51 +02:00
Anushka Mittal
08a3087100
New operators ( #2543 )
...
* added anyin operator
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* allin, anynotin, allnotin added
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* added operator handler info
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* fixes typos and variable names
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* reusing code from in.go in new operators
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* Added more test cases for new operators
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* updated openapiv3schema
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* matching logic
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* added deprecated tag for In and NotIn
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
2021-10-26 17:29:42 -07:00
Marcus Noble
913bbd567a
Handle durations with standard comparison operators ( #2569 )
...
* Handle durations with standard comparison operators
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
* Fix error strings
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
* Added CLI tests for duration operations
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
* Added tests with different units
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2021-10-22 12:41:25 -07:00
Marcus Noble
509f561d67
Added support for comparing resource quantities
...
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2021-10-19 15:22:26 +01:00
treydock
8204028009
Add DurationOperator to handle duration comparison operations ( #2214 )
...
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
2021-07-30 13:11:52 -07:00
Max Goncharenko
903963c26d
add special variable substitution logic for preconditions ( #1930 )
...
* add special variable substitution logic for preconditions
Signed-off-by: Max Goncharenko <kacejot@fex.net>
* handle NotFoundVariable error in proper way
Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>
* remove excess log; fix grammar
Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>
* removed isPrecondition flag; added test case for empty deny string; fixed related issue
Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>
* fix test case
Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>
* fix go lint
Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>
* fix tests
Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>
2021-07-28 09:54:50 -07:00
Vineeth Reddy
eeb4e4ff0f
turn preconditions error to info log ( #1926 )
...
* turn preconditions error to info log
Signed-off-by: vineethvanga18 <reddy.8@iitj.ac.in>
* minor change
Signed-off-by: vineethvanga18 <reddy.8@iitj.ac.in>
* further changes
Signed-off-by: vineethvanga18 <reddy.8@iitj.ac.in>
* resolve conflicts
Signed-off-by: vineethvanga18 <reddy.8@iitj.ac.in>
* add precondition flag
Signed-off-by: vineethvanga18 <reddy.8@iitj.ac.in>
* NotFoundError -> Info
Signed-off-by: vineethvanga18 <reddy.8@iitj.ac.in>
2021-07-07 17:37:44 +05:30
Yashvardhan Kukreja
6b3ab3fe23
added: generic NumericOperator to handle numeric operations for kyverno policies ( #1536 )
...
Signed-off-by: Yashvardhan Kukreja <yash.kukreja.98@gmail.com>
2021-02-05 19:49:23 -08:00
Jim Bugwadia
e67779eeb5
allow wildcards in condition values
2020-11-28 23:29:15 -08:00
Jim Bugwadia
7e9b08baeb
Feature/make operators case insensitive ( #1217 )
...
* fix typo
* make operators case insensitive
* fix case statement
2020-10-29 15:00:22 -07:00
Shuting Zhao
cdc5190c56
update nirmata/kyverno to kyverno/kyverno
2020-10-07 11:12:31 -07:00
NoSkillGirl
e8c4050d49
Added In and NotIn Operators
2020-06-26 12:48:12 +05:30
shravan
f08f7e22c7
744 supporting Equals and NotEquals as operater types
2020-05-06 22:43:17 +05:30
shivkumar dudhani
1b1ab78f77
logs & access
2020-03-17 11:05:20 -07:00
shivkumar dudhani
5cee543755
refactor variable substitution
2020-02-14 11:59:28 -08:00
Shivkumar Dudhani
8c1d79ab28
linter suggestions ( #655 )
...
* cleanup phase 1
* linter fixes phase 2
2020-01-24 12:05:53 -08:00
Shivkumar Dudhani
3cf9141f4d
593 feature ( #594 )
...
* initial commit
* background policy validation
* correct message
* skip non-background policy process for add/update
* add Generate Request CR
* generate Request Generator Initial
* test generate request CR generation
* initial commit gr generator
* generate controller initial framework
* add crd for generate request
* gr cleanup controller initial commit
* cleanup controller initial
* generate mid-commit
* generate rule processing
* create PV on generate error
* embed resource type
* testing phase 1- generate resources with variable substitution
* fix tests
* comment broken test #586
* add printer column for state
* return if existing resource for clone
* set resync time to 2 mins & remove resource version check in update handler for gr
* generate events for reporting
* fix logs
* initial commit
* fix trailing quote in patch
* remove comments
* initial condition (equal & notequal)
* initial support for conditions
* initial support fo conditions in generate
* support precondition checks
* cleanup
* re-evaluate GR on namespace update using dynamic informers
* add status for generated resources
* display loaded variable SA
* support delete cleanup of generate request main resources
* fix log
* remove namespace from SA username
* support multiple variables per statement for scalar values
* fix fail variables
* add check for userInfo
* validation checks for conditions
* update policy
* refactor logs
* code review
* add openapispec for clusterpolicy preconditions
* Update documentation
* CR fixes
* documentation
* CR fixes
* update variable
* fix logs
* update policy
* pre-defined variables (serviceAccountName & serviceAccountNamespace)
* update test
2020-01-07 15:13:57 -08:00