Mariam Fahmy
b495c6d112
feat: support authorizer variable in CEL expressions ( #8024 )
...
* feat: support authorizer variable in CEL expressions
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* feat: add the auth reason
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* feat: add kuttl tests
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix lint issue
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix kuttl test
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: add helpers
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-09-05 10:16:50 +00:00
Mariam Fahmy
94aa1f18c6
feat: support namespaced parameter resources for CEL expressions in Kyverno policies ( #8084 )
...
* feat: support namespaced parameter resources for CEL expressions in Kyverno policies
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix lint issue
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix kuttl test
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-08-28 14:43:09 +00:00
Charles-Edouard Brétéché
87728f1771
refactor: background controller permissions ( #8083 )
...
* fix: reduce background controller permissions
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* debug
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>
* codegen
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>
2023-08-23 12:29:56 +00:00
Mariam Fahmy
a60dc00392
feat: migrate to events.k8s.io/v1 ( #7673 )
...
* feat: migrate events to events.k8s.io group
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: kuttl event tests
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* migrate background events to events.k8s.io
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* update kuttl tests
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* remove ResourceSkipped from actions
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-07-26 14:06:51 +00:00
Charles-Edouard Brétéché
03702476fa
refactor: move kyverno constants out of v1 package ( #7760 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-07-06 08:00:36 +00:00
shuting
955570b0c5
fix: auth checks with the APIVersion and the subresource ( #7628 )
...
* fix auth checks with apiVersion and subresource
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add kuttl tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* remove duplicate code
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update permissions
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-06-22 14:14:06 +00:00
Mike Bryant
91021b65b6
fix: Delete downstream objects on precondition fail ( #7496 )
...
* fix: Delete downstream objects on precondition fail
When a rule fails the match in a generate rule, the downstream resource gets deleted. This will now also happen if the rule is skipped due to a precondition.
Signed-off-by: Mike Bryant <mike.bryant@mettle.co.uk>
* add debug command
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* sync trigger updates to downstream
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix bgscan fetching trigger
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: Move rbac change into tests for better isolation
Signed-off-by: Mike Bryant <mike.bryant@mettle.co.uk>
* fix unit test
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: Mike Bryant <mike.bryant@mettle.co.uk>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2023-06-15 11:32:19 -04:00
shuting
d3db3bc342
refactor: generate reconciliation on policy updates ( #7531 )
...
* generate rule type validation
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* generate rule type validation
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add the kuttl test
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* linter fixes
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* rever validation checks
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* refactor
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-06-14 13:52:27 +00:00
itsCheithanya
692d419aa4
Updated the message to the level4log and removed err that originated from ApplyBackgroundChecks. ( #7528 )
...
* updated the message to the level4log and removed err that originated from ApplyBackgroundChecks
Signed-off-by: Cheithanya <cheithanya2002@gmail.com>
* Update pkg/policy/policy_controller.go
Signed-off-by: shuting <shutting06@gmail.com>
---------
Signed-off-by: Cheithanya <cheithanya2002@gmail.com>
Signed-off-by: shuting <shutting06@gmail.com>
Co-authored-by: shuting <shutting06@gmail.com>
2023-06-14 12:36:26 +00:00
shuting
0c3351887a
fix: the same source cannot be used for multiple targets with a generate clone rule ( #7436 )
...
* add source labels to targets
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* handle multiple triggers/targets for the same clone source
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add source labels to targets
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix test
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* remove unused code
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add kuttl tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* rename the test
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add kuttl tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add kuttl tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* split apiversion label into version and group
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-06-07 13:50:47 +00:00
Mariam Fahmy
7f6fb24057
feat: support cel expression in validate rules ( #7070 )
...
* feat: support cel expression in validate rules
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* Adding CEL preconditions in kyverno policies
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* Support parameter resources in validate.cel subrule
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* fix
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* Adding CEL preconditions in kyverno policies
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* Add kuttl tests for validate.cel subrule
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* fix
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* Fix disallow-host-path kuttl test
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* Add kuttl test for cel preconditions
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* Fix kuttl tests for validate.cel
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* Use K8S API Validation and AuditAnnotation
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
* Use K8S API ParamKind and ParamRef
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
---------
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2023-05-31 14:30:55 -07:00
Charles-Edouard Brétéché
194bfacc71
fix: permission validation message ( #7362 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-05-31 19:14:32 +00:00
shuting
d99c000b17
fix: mutate existing auth check ( #7219 )
...
* fix auth check when using variables in ns
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add kuttl tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-05-17 18:20:34 +02:00
shuting
f7e9c45585
update background scan logging messages ( #7142 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-05-09 15:18:03 +00:00
shuting
a7900ff40c
require generate.apiVersion ( #7080 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-05-03 10:33:29 +00:00
shuting
f87b0204e6
fix: generate policy validation to prevent endless loop ( #7026 )
...
* refactor policy validation
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add loop check for generate
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add kuttl tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* linter fixes
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* linter fixes
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-04-28 13:54:17 +00:00
Jim Bugwadia
0c22858bbc
add support for Kubernetes API server POST ( #6948 )
...
* allow POST for Kubernetes API calls
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add kuttl tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fmt and undo local changes
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix codegen and unit test
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix unit test
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix tests and extends docs
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
---------
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2023-04-26 16:31:44 -07:00
shuting
e14fe847bc
feat: new access checks for background policies ( #6970 )
...
* switch to use sar for access checks
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix unit tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update helm config
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix username
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update msg
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix sa name
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update install.yaml
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-04-24 10:31:42 +00:00
shuting
5a6b3c86f6
fix background variables validation ( #6978 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-04-23 16:22:29 +00:00
Charles-Edouard Brétéché
76d1b37e68
fix: incorrect json patch validation ( #6941 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-04-17 19:06:50 +08:00
Charles-Edouard Brétéché
544fe04508
refactor: introduce jmespath interface ( #6882 )
...
* refactor: introduce jmespath interface
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>
2023-04-13 11:29:40 +00:00
shuting
2948adba57
fix: auth check the generate policy when use variables in name/namespace ( #6874 )
...
* decrease log level
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* set namespace to for 'all'
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* udpate kuttl tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* rename file
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* rename file
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-04-13 07:38:47 +00:00
Charles-Edouard Brétéché
289ff3e1ce
refactor: factorise engine creation ( #6837 )
...
* refactor: factorise engine creation
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-04-11 07:12:05 +00:00
Charles-Edouard Brétéché
784ca07419
refactor: engine rule response creation ( #6784 )
...
* refactor: engine rule response creation
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* private fields
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more private
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more 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>
* fix unit tests
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-04-05 10:35:38 +00:00
Vyom Yadav
80fc3013d3
fix: Support subresources as the trigger in generate rules ( #6760 )
...
* fix: check background scanning only for validation policies
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
* fix: Support subresources as the trigger in generate rules
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
---------
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
2023-04-04 11:01:06 +00:00
Charles-Edouard Brétéché
40ac8eb863
feat: add context/preconditions support to mutate existing ( #6754 )
...
* refactor: engine handlers
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>
* feat: add context/preconditions support to mutate existing
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>
* kuttl
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>
* readme
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix and context kuttl test
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>
* 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>
* 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>
* final 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>
2023-04-03 19:58:58 +00:00
Pradeep Lakshmi Narasimha
cc9adc5cd8
Adding validation to reject audit mode policy creation/updation when mutateDigest is set to true ( #6757 )
...
* Adding validation to reject audit mode policy creation/updation when mutateDigest is set to true
Signed-off-by: praddy26 <pradeep.vaishnav4@gmail.com>
* fix tests
Signed-off-by: realshuting <shutting06@gmail.com>
---------
Signed-off-by: praddy26 <pradeep.vaishnav4@gmail.com>
Signed-off-by: realshuting <shutting06@gmail.com>
Co-authored-by: realshuting <shutting06@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2023-04-03 15:52:32 +00:00
shuting
81ec6c96a1
fix auth validation ( #6696 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-03-27 11:56:24 +00:00
Charles-Edouard Brétéché
1e30aacbd9
fix: replace more refect.DeepEqual ( #6674 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-03-24 10:01:49 +00:00
Charles-Edouard Brétéché
49f0baa277
fix: policy validation with subresource and background scan enabled ( #6571 )
...
* fix: policy validation with subresource
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* kuttl
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* workflow
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-03-22 17:12:10 +00:00
shuting
6249ab70e8
fix: block generate policies when lack of permission to operate downstream resources ( #6610 )
...
* debug
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* return on errors only
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update clusterrolebinding
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update clusterrolebinding
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* remove debug
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add kuttl tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix ns
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-03-22 13:14:57 +00:00
Charles-Edouard Brétéché
0b56613d59
fix: map APIResource in FindResources results ( #6611 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-03-17 11:21:26 +00:00
shuting
6f7f06f0d4
chore: cleanup generate codebase ( #6598 )
...
* add debug info
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* cleanup code
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* linter fix
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* remove unused labels
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* rename ns
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* reset resource version
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* remove ur updater
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>
* cleanup code
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* remove code to add labels to clone source #6583
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* rename ns
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* remvove labels from test resource
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* remove generated by labels
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-03-17 08:36:06 +00:00
Charles-Edouard Brétéché
ad3bf969bf
fix: add message to bypass schema validation when it fails ( #6604 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-03-16 15:03:00 +00:00
Charles-Edouard Brétéché
062bd798f0
test: add kuttl tests for policy kinds validation ( #6547 )
...
* test: add kuttl tests for policy kinds 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>
* 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>
2023-03-13 18:24:11 +08:00
shuting
48726dcd4a
feat: validate immutable fields for a generate rule - 2 ( #6451 )
...
* update validation checks
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix ns assertions
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-03-10 14:39:44 +00:00
shuting
4572eab750
fix: apply generate existing when a new rule is added ( #6472 )
...
* trigger generate existing when a new rule is added
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add a kuttl test
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* refactor
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* ignore existing rule updates
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-03-06 15:40:49 +00:00
shuting
c8a3b19d2c
disallow variabels in clone/cloneList ( #6438 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-03-03 11:32:40 +00:00
shuting
ea306d6d7f
rename generateExistingOnPolicyUpdate to generateExisting ( #6470 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-03-03 12:05:53 +01:00
shuting
0b359d07db
rename GenerateExistingOnPolicyUpdate to GenerateExisting ( #6321 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-03-03 09:34:55 +00:00
shuting
264eaec049
fix: remove timestamp checks for the clone rule ( #6439 )
...
* remove timestamp checks
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add kuttl tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-03-01 15:49:05 +00:00
shuting
86fc31f63b
feat: add validations for generate immutable fields ( #6328 )
...
* add validations for generate immutable fields
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore(deps): bump github.com/onsi/gomega from 1.26.0 to 1.27.0 (#6334 )
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega ) from 1.26.0 to 1.27.0.
- [Release notes](https://github.com/onsi/gomega/releases )
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md )
- [Commits](https://github.com/onsi/gomega/compare/v1.26.0...v1.27.0 )
---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Jmespath typo fix (#6342 )
Signed-off-by: Abhishek Kumar <abhishek22512@gmail.com>
* chore(deps): bump golang.org/x/net from 0.6.0 to 0.7.0 (#6341 )
Bumps [golang.org/x/net](https://github.com/golang/net ) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases )
- [Commits](https://github.com/golang/net/compare/v0.6.0...v0.7.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions (#6348 )
Bumps [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions ) from 2.0.5 to 2.1.0.
- [Release notes](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases )
- [Commits](bd2868d14a...b9ddf6a515
)
---
updated-dependencies:
- dependency-name: zgosalvez/github-actions-ensure-sha-pinned-actions
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump github.com/onsi/gomega from 1.27.0 to 1.27.1 (#6347 )
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega ) from 1.27.0 to 1.27.1.
- [Release notes](https://github.com/onsi/gomega/releases )
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md )
- [Commits](https://github.com/onsi/gomega/compare/v1.27.0...v1.27.1 )
---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix: dump admission response (#6349 )
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix: use labels.Everything in userinfo clusterroles matching (#6351 )
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* update k8s.gcr.io to registry.k8s.io (#6340 )
Signed-off-by: Rayan Das <rayandas91@gmail.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* Notary v2 (#6011 )
* fix make debug-deploy
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* improve log messages
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* initial update
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* initial update
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* update registry credentials handling order
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* comment out ACR helper - breaks anonymous image pull
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* merge main and refactor verifiers
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix opt init
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* remove local address
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* update to NotaryV2 RC
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix fmt
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* update deps
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* format imports
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* remove env and no-op statement
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix merge issues
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix linter issue
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* remove unused field
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* make fmt
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* renable ACR credential helper
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* Update .vscode/launch.json
Signed-off-by: shuting <shutting06@gmail.com>
---------
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Signed-off-by: shuting <shutting06@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: shuting <shutting06@gmail.com>
* chore(deps): bump fluxcd/flux2 from 0.39.0 to 0.40.0 (#6362 )
Bumps [fluxcd/flux2](https://github.com/fluxcd/flux2 ) from 0.39.0 to 0.40.0.
- [Release notes](https://github.com/fluxcd/flux2/releases )
- [Changelog](https://github.com/fluxcd/flux2/blob/main/.goreleaser.yml )
- [Commits](978cc0c5b8...2cac6ce281
)
---
updated-dependencies:
- dependency-name: fluxcd/flux2
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* oldObject translation solved in autogen (#6305 )
* OldObject translation solved in autogen
Signed-off-by: Abhishek Kumar <abhishek22512@gmail.com>
* CronJob fixed in autogen
Signed-off-by: Abhishek Kumar <abhishek22512@gmail.com>
* tests added
Signed-off-by: Abhishek Kumar <abhishek22512@gmail.com>
---------
Signed-off-by: Abhishek Kumar <abhishek22512@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix: logger key value in wrong order (#6365 )
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix: missing metrics for policies in audit mode (#6363 )
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* chore(deps): bump github.com/notaryproject/notation-go (#6361 )
Bumps [github.com/notaryproject/notation-go](https://github.com/notaryproject/notation-go ) from 1.0.0-rc.1 to 1.0.0-rc.3.
- [Release notes](https://github.com/notaryproject/notation-go/releases )
- [Commits](https://github.com/notaryproject/notation-go/compare/v1.0.0-rc.1...v1.0.0-rc.3 )
---
updated-dependencies:
- dependency-name: github.com/notaryproject/notation-go
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: role matching from authentication infos (#6358 )
* fix: role matching from authentication infos
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* more tests
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix: delete certificate secret if type is not TLS (#6368 )
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* refactor: user/groups exclusions (#6357 )
* refactor: user/groups exclusions
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* wildcard
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>
* add labels to downstream and source resources (#6322 )
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update generate validation checks
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Abhishek Kumar <abhishek22512@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Rayan Das <rayandas91@gmail.com>
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Signed-off-by: shuting <shutting06@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhishek Kumar <76171953+octonawish-akcodes@users.noreply.github.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Rayan Das <rayandas91@gmail.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2023-03-01 06:52:20 +00:00
shuting
0c91e87bbb
fix: delete downstream for a generate rule removal, with data and sync ( #6393 )
...
* remove policy handler for updates
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* remove policy update handler from the ur controller
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* rework cleanup downstream on policy deletion
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix downstream deletion on data rule removal
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add kuttl test for clusterpolicy
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* linter fix
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add kuttl test for policy
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update api docs
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add delays
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix name assertion
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* delete downstream when deletes the clone source
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add kuttl test pol-clone-sync-delete-source
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* linter fixes
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add kuttl test pol-clone-sync-delete-downstream
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* add kuttl test pol-data-sync-modify-rule
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix panic
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix panic
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix labels
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix policy assertions
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix annotation missing names
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* rename policy
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* remove dead code
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* create unique namespaces
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* create more unique namespaces
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix assertion
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>
2023-03-01 03:48:18 +00:00
shuting
d5684f6794
add labels to downstream and source resources ( #6322 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-02-22 10:49:09 +00:00
shuting
6ff2790957
add new fields to UR; add helpers ( #6294 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-02-10 14:56:17 +00:00
shuting
dc8874fea7
add label keys ( #6291 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-02-10 14:26:51 +01:00
Charles-Edouard Brétéché
15cf69f737
refactor: improve engine logger management ( #6280 )
...
* refactor: improve engine logger management
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* logger
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>
2023-02-09 15:15:51 +00:00
Brian Dunnigan
d33e616d69
#6055 Add JMESPath support to imageExtractors ( #6183 )
...
Signed-off-by: Brian Dunnigan <bdunnigan@clarityinnovates.com>
Co-authored-by: bdunnigan <bdunnigan@clarityinnovates.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2023-02-08 11:54:59 +00:00
Charles-Edouard Brétéché
3ff83c7bdd
refactor: context loading and engine methods ( #6253 )
...
* refactor: context loading and engine methods
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>
2023-02-08 13:55:03 +08:00
Charles-Edouard Brétéché
6c0549febe
refactor: more engine interface ( #6199 )
...
* refactor: more engine interface
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fixes
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>
2023-02-03 13:01:11 +08:00