Charles-Edouard Brétéché
7f57b9618a
feat: cleanup v2alpha1 kyverno api ( #10457 )
...
* feat: cleanup v2alpha1 kyverno api
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 tests
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix: webhook
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>
Co-authored-by: shuting <shuting@nirmata.com>
2024-06-14 09:39:36 +00:00
Vishal Choudhary
2104171b4f
fix: add verbosity to background scanner log ( #10404 )
...
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-06-06 13:51:01 +02:00
Vishal Choudhary
47adea6f1c
feat: add support for background scanning of existing resource in image verification ( #10287 )
...
* feat: add support for background scanning of existing resource in image verification
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: change rule response type to image verify
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* chore: fix nilptr reference
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-05-24 09:41:04 +00:00
shuting
e58d7120c6
fix: sort webhookconfig.operations ( #10274 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-05-21 13:22:08 +00:00
shuting
84e0ced314
fix: webhook config set ( #10262 )
...
* tests: add unit tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: merge operations map correctly
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-05-21 08:33:59 +00:00
shuting
fb9c66f455
feat(perf): add new linter prealloc
to enforce slice declarations best practice ( #10250 )
...
* feat(perf): add new linter prealloc to enforce slice declarations best practice
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix(linter): prealloac slices
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-05-20 14:46:35 +05:30
Mariam Fahmy
8805620574
fix: add CONNECT operation in the webhook config for pod/exec subresource ( #9855 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-05-06 09:51:46 +00:00
Norwin Schnyder
5d50022f43
fix: skip rules without operation in resource webhook creation ( #10146 )
...
* fix: skip rules without operation in resource webhook creation
Signed-off-by: Norwin Schnyder <norwin.schnyder+github@gmail.com>
* test: add unit test for buildRulesWithOperations
Signed-off-by: Norwin Schnyder <norwin.schnyder+github@gmail.com>
* fix liniting issues
Signed-off-by: Norwin Schnyder <norwin.schnyder+github@gmail.com>
---------
Signed-off-by: Norwin Schnyder <norwin.schnyder+github@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-04-30 17:05:44 +00:00
Vishal Choudhary
e66a550560
fix: fetch only adopted ephemeral report ( #10148 )
...
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-04-30 15:17:24 +00:00
Mariam Fahmy
77f1f97f6e
chore: remove a package that is imported twice ( #10101 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-04-29 10:40:39 +00:00
shuting
3e7a7ac244
fix: policy status reconciliation ( #10032 )
...
* fix: get latest policy object before updating status
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: remove debug code
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-04-12 07:08:15 +00:00
Khaled Emara
c9055ac2ff
fix(autogen): only generate rule for request kind ( #9984 )
...
* fix(autogen): only generate rule for request kind
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* feat(autogen): use jsoniter instead of std for json
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* chore(atogen): use sets instead of manipulating strings
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(autogen): formatting linter
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(autogen): backwards compatability
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* revert(autogen): old behavior
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix: builds error
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: ShutingZhao <shuting@nirmata.com>
2024-04-04 08:09:30 +00:00
Charles-Edouard Brétéché
c241cfce44
fix: polex matching code ( #9955 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-04-03 18:56:48 +00:00
Khaled Emara
429e84be10
fix(globalcontext): panics and validation ( #9903 )
2024-03-14 16:12:39 +00:00
Khaled Emara
2b2587469d
feat: enhance global context ( #9710 )
...
* feat(globalcontext): add event handling
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* feat(globalcontext): handle cache sync error
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* feat(globalcontext): ensure api is called during init
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* design(events): decouple events from policies a bit
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* feat(globalcontext): use status
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcontext): make status optional
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcontext): status update
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcontext): codegen
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* chore(globalcontext): delete yaml annotations
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcontext): fix status in tests
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcotext): update enqueue func
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcontext): error
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* chore(globalcontext): rbac
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* chore(globalcontext): retry logic
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcontext): unknown api call in test
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* bump
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix: set unique name for each testing resource
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: update readme
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: log msg
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: add delays
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: delay gctce creation
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* debug: check Kyverno status
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* debug: update chainsaw config
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* debug: revert chainsaw config
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* test(globalcontext): print actual status
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcontext): add necessary delays and check status before applying
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* test(globalcontext): long refreshInterval
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* debug: log success
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* debug: print informer data
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcontext): use client instead of informer
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* debug: print status after update
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* debug: print ResourceVersion
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* debug: remove gcecontroller from other controllers
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcontext): update status only once
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* chore: remove excess logs
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcontext): add store to cleanup controller
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
---------
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-02-23 10:34:04 +00:00
Mariam Fahmy
2a277a01c4
feat: apply VAP bindings in CLI apply command in offline mode ( #9751 )
...
* feat: apply VAP bindings in CLI apply command in offline mode
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix lint
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix chainsaw tests
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-02-21 07:52:25 +00:00
Charles-Edouard Brétéché
7775541b46
fix: reports aggregation ( #9697 )
...
* chore: rename admission to ephemeral in reports aggregation controller
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix: reports aggregation
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* second queue
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* cleanup
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>
* nit
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* flag
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-02-08 10:36:01 +00:00
Khaled Emara
10258921ac
feat(validation-webhook): validate global context reference ( #9678 )
...
* feat(validation-webhook): validate global context reference
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(validation-webhook): global reference name
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* test(globalcontext): fix tests after valdiation
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(policycache): dont add NotReady Policies
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* chore(globalcontext): rename e2e tests
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* chore(globalcontext): add entry errors
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* test(globalcontext): fix chainsaw test
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
---------
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
2024-02-08 07:46:58 +00:00
Charles-Edouard Brétéché
6f440ab6c0
chore: rename admission to ephemeral in reports aggregation controller ( #9690 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-02-07 10:29:56 +00:00
Charles-Edouard Brétéché
64176cdbea
fix: don't delete garbage collected policy reports ( #9679 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-02-07 07:10:51 +00:00
Charles-Edouard Brétéché
f1c81dbc69
feat: remove admission controller ( #9677 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-02-07 06:20:35 +00:00
Khaled Emara
1eda4789d1
test(globalcontext): add e2e tests ( #9661 )
...
* fix(globalcontext): validation
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcontext): use existence instead of ready for now
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* chore(globalcontext): improve not ready error message
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcontext): allow any APICall
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcontext): prevent double marshal
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* test(globalcontext): add e2e tests
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* chore(globalcontext): move vaildation to OpenAPI V3
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
---------
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-02-06 17:03:32 +00:00
Khaled Emara
8a4d9941de
feat: add globalcontext loader and interface ( #9602 )
...
* feat(globalcontext): add interface
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcontext): package import path
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* design(contextloader): move globalcontext from Load to init
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(globalcontext): remove pointer
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* design(globalcontext): create specific Store
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* codegen
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-02-05 11:24:37 +00:00
Vishal Choudhary
3142af64a0
feat: add global context entry validation webhook ( #9619 )
...
* feat: add global context entry validation webhook
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: use `k8s.io/apimachinery/pkg/util/json` instead of `encoding/json`
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: lint
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-02-02 18:04:50 +01:00
Charles-Edouard Brétéché
2b712107d2
feat: consider maxAPICallResponseLength ( #9620 )
...
* chore: move global context package out of engine
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* feat: consider maxAPICallResponseLength
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-02-02 15:35:57 +00:00
Charles-Edouard Brétéché
b59353c657
chore: move global context package out of engine ( #9618 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-02-02 14:35:24 +00:00
Vishal Choudhary
10ae9e306c
feat: update refreshInterval in globalcontext CRD to use a duration ( #9615 )
2024-02-02 12:06:51 +00:00
Khaled Emara
226fa9515a
feat: add globalcontext controller ( #9601 )
...
* feat: add globalcontext controller
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* rework controller
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* rbac
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* cmd
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix rbac
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* engine
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* k8s resources
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* k8s resource
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* resync zero
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* api call
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* api call
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* clean
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix linter
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-02-02 10:41:35 +00:00
Mariam Fahmy
3510998d4f
feat: Support CEL expression warnings ( #9566 )
...
* feat: support CEL expression warnings
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: allow the policy creation but return warnings to the API server
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix tests
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: ShutingZhao <shuting@nirmata.com>
2024-02-02 10:04:02 +00:00
Anushka Mittal
cfc9683033
Changes to dynamically configure webhooks ( #8437 )
...
* Changes to dynamically configure webhooks
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Add unit tests
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Add kuttl tests
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Refactoring
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Correct unit test
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Change way of webhooks configured
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Correct tests with new changes
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Add delete operation by default
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Correct tests with new changes
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Correct order for operations
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Add corrections
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Add mutatingwebhookconfiguration test
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Correct unit test
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Added policy.yaml in mutate webhook test
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Add corrections in kuttl test and code
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Change name of test
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Changes to update webhooks manifest
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Add corrections for dynamic-op-mutate kuttl test
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Add minor changes; remove unnecessary file
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Correct adding operations for MutatingWebhookConf
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* dynamic op mutate and validate added
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Resolve conflicts
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Filter rules for mutatingwebhookconf correctly
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* replace TestStep with Test in chainsaw tests
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* converted to new chainsaw-test format
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* minor corrections
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* remove isMutationEmpty()
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* initial changes for dynamic opn enhancements
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* rename variables
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* resolve lint errors
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* refactor code
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* add changes for exclude operations
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* add conformance tests
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* add unit tests
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* corrections in conformance tests
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* modification in unit tests
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* correction in conformance tests
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* Update .vscode/launch.json
Signed-off-by: shuting <shuting@nirmata.com>
* update variable usage
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
* remove testresults
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
---------
Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
Signed-off-by: shuting <shuting@nirmata.com>
Co-authored-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: shuting <shutting06@gmail.com>
2024-01-31 15:46:53 +00:00
Charles-Edouard Brétéché
e969e29eb8
chore: remove reports aggregation per namespace ( #9570 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-01-30 23:08:47 +00:00
Charles-Edouard Brétéché
9102753323
fix: make alternate reports storage transparent ( #9553 )
...
* fix: make alternate reports storage transparent
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* bg scan
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* aggregation
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* aggregation
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* rm manager
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* update
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>
* fixes
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-01-30 14:53:37 +00:00
Mariam Fahmy
831bf3c074
feat: reuse --protectManagedResources flag in the cleanup controller ( #8566 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-01-30 07:08:30 +00:00
Mariam Fahmy
9ed14cb779
feat: support vap bindings in reports ( #9506 )
...
* feat: support vap bindings in reports
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: add binding to the rule response
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* add chainsaw test
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix lint
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix chainsaw
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* add chainsaw tests
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix chainsaw tests
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-01-29 12:49:17 +01:00
shuting
7170cbb0c2
feat:Webhook config per policy ( #9483 )
...
* add spec.webhookConfigurations
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update crd
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* configure webhook
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* register webhook handler
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* skip storing finegrained policies in cache
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update resource validate handler
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* updates
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* enable mutate resource handler for fine-grained policies
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-01-27 13:00:22 +00:00
Florian Hopfensperger
8781a38849
feat: configure webhook scope based on resource and policy type ( #8065 )
...
* feat: configure webhook scope based on policy type
Signed-off-by: Florian Hopfensperger <florian.hopfensperger@allianz.de>
* Update pkg/controllers/webhook/controller.go
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: shuting <shuting@nirmata.com>
* feat: configure webhook scope based on resource type
Signed-off-by: Florian Hopfensperger <florian.hopfensperger@allianz.de>
* review comments
Signed-off-by: Florian Hopfensperger <florian.hopfensperger@allianz.de>
* sorting of webhooks
Signed-off-by: Florian Hopfensperger <florian.hopfensperger@allianz.de>
* Update pkg/controllers/webhook/utils.go
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix imports
Signed-off-by: Florian Hopfensperger <florian.hopfensperger@allianz.de>
---------
Signed-off-by: Florian Hopfensperger <florian.hopfensperger@allianz.de>
Signed-off-by: shuting <shuting@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-01-26 15:07:42 +00:00
Vishal Choudhary
e6c39f31a5
feat: add a new API group reports.kyverno.io
( #9521 )
...
* feat: add new report interface
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* chore: reports.kyverno.io/v1 apigroup
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* chore: codegen
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: add report manager
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: add reports manager to reports controller
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: add alternateReportStorage to helm chart
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: report utils deepcopy
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* init flag
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: wrong return value
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-01-26 13:40:29 +00:00
Mariam Fahmy
d47684c0d9
feat: support validatingadmissionpolicybindings in CLI apply command ( #9468 )
...
* feat: support validatingadmissionpolicybindings in CLI apply command
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix linter issue
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-01-23 11:47:38 +00:00
Charles-Edouard Brétéché
8795916e14
fix: change generic policy to not return any ( #9463 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-01-20 19:20:22 +02:00
Mariam Fahmy
a791d9ac35
feat: skip generating VAP when an exception is defined ( #9386 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-01-18 15:55:27 +00:00
Mariam Fahmy
f0564b3019
feat: re-evaluate policy exceptions for existing resources and modify reports accordingly ( #8659 )
...
* feat: re-evaluate policy exceptions for existing resources and modify reports accordingly
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: use v2 of exceptions
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix chainsaw test
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: use properties in the reports result
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix chainsaw tests
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-01-17 10:00:15 -08:00
Mariam Fahmy
f8c5571ddc
fix: remove the check of exclude in VAPs ( #9331 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-01-03 17:37:30 +00:00
Mariam Fahmy
4fff841cdc
fix: remove policy informer from vap controller ( #9279 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-12-26 11:45:26 +00:00
shuting
67b96a7cf2
refactor: mutate checks ( #9255 )
...
* refactor
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-12-22 15:07:17 +02:00
Jim Bugwadia
f4f34419d9
improve messages ( #9168 )
...
* improve messages
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix typo
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
---------
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2023-12-16 10:50:08 +02:00
Zadkiel Aharonian
5e96b26a48
feat: webhook labels ( #9015 )
...
Signed-off-by: Zadkiel Aharonian <hello@zadkiel.fr>
Co-authored-by: shuting <shuting@nirmata.com>
2023-12-07 12:58:31 +00:00
Charles-Edouard Brétéché
095b22b6af
fix: ttl cleanup not working with cluster wide resources ( #9060 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-12-03 00:35:13 +01:00
Mariam Fahmy
1404ea0966
fix: delete VAPs in case Kyverno policies can't be translated ( #8887 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-11-27 06:36:01 +00:00
Dirk Pahl
d8c2c5818d
Make server ports configurable, resolves #7279 ( #7728 )
...
* Make server ports configurable, resolves #7279
Signed-off-by: Dirk Pahl <dirk.pahl@deutschebahn.com>
* Make server ports configurable, resolves #7279
Signed-off-by: Dirk Pahl <dirk.pahl@deutschebahn.com>
* Switch to flags instead of env vars
Signed-off-by: Dirk Pahl <dirk.pahl@deutschebahn.com>
* Could not use internal package in webhooks pkg
Signed-off-by: Dirk Pahl <dirk.pahl@deutschebahn.com>
* Add helm chart changes
Signed-off-by: Dirk Pahl <dirk.pahl@deutschebahn.com>
* make codegen-docs-all
Signed-off-by: Dirk Pahl <dirk.pahl@deutschebahn.com>
* make codegen-manifest-all
Signed-off-by: Dirk Pahl <dirk.pahl@deutschebahn.com>
---------
Signed-off-by: Dirk Pahl <dirk.pahl@deutschebahn.com>
Co-authored-by: Dirk Pahl <dirk.pahl@deutschebahn.com>
Co-authored-by: shuting <shuting@nirmata.com>
2023-11-17 14:19:53 +00:00
Mariam Fahmy
f0be3bdc0b
fix: display a message when the controller has no permissions for VAPs ( #8776 )
...
* fix: display a message when the controller has no permissions for VAPs
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: add a warning when a Kyverno policy is created
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-11-01 21:52:03 +08:00
Mariam Fahmy
50c8d20f9c
fix: rename vap logging name to ValidatingAdmissionPolicy ( #8785 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-10-30 15:54:34 +00:00
Charles-Edouard Brétéché
c96199dee1
chore: move utils/wildcard in ext ( #8772 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-10-29 23:59:53 +00:00
Rakshit Gondwal
b574802c12
feat: support conditions in PolicyException ( #8577 )
...
* feat: support conditions in PolicyException
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
* fix matchesException func
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
* add codegen-all files
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
* fix after review
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
* remove variable validation from PolicyException
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
* fix after review
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
* add kuttl tests
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
* remove ValidateVariables() from tests
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
* fix errors
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
* remove check-variables kuttl test
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
* fix after review
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
* add sleep step to kuttl
Signed-off-by: Rakshit Gondwal <98955085+rakshitgondwal@users.noreply.github.com>
* miinor fix
Signed-off-by: Rakshit Gondwal <98955085+rakshitgondwal@users.noreply.github.com>
* add readme for kuttl test
Signed-off-by: Rakshit Gondwal <98955085+rakshitgondwal@users.noreply.github.com>
---------
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
Signed-off-by: Rakshit Gondwal <98955085+rakshitgondwal@users.noreply.github.com>
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2023-10-24 10:45:52 +00:00
Mariam Fahmy
d688af2539
fix: allow cleanup controller to update the policy status ( #8681 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-10-18 21:22:42 +08:00
Vishal Choudhary
15a8970e23
feat: add support for days in ttl labels ( #8660 )
2023-10-16 13:01:07 +00:00
Mariam Fahmy
e969248483
chore: bump cleanup policies to v2beta1 ( #8621 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-10-12 19:45:33 +08:00
shuting
360bcc83ee
Revert "chore: bump cleanup policies to v2beta1 ( #8594 )" ( #8609 )
...
This reverts commit fff3ad047e
.
2023-10-09 15:01:24 +00:00
Mariam Fahmy
fff3ad047e
chore: bump cleanup policies to v2beta1 ( #8594 )
...
* chore: bump cleanup policies to v2beta1
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* chore: remove the support of v2alpha1 cleanup policies
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-10-09 19:37:15 +08:00
Mariam Fahmy
8cbe66a06a
feat: generate events for CEL policies that generate VAPs ( #8564 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-10-09 10:16:35 +00:00
Charles-Edouard Brétéché
482c243517
refactor: remove openapi package ( #8538 )
...
* refactor: openapi package
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* kubectl validate
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* rm
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>
* go mod
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix vscode
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-09-27 16:21:47 +00:00
Mariam Fahmy
538e8958aa
refactor: get the last execution time from the cleanup policy interface ( #8531 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-09-27 08:55:25 +02:00
Mariam Fahmy
7add300ffa
feat: remove the creation of cronjobs in cleanup controller ( #8526 )
...
* feat: remove the creation of cronjobs in cleanup controller
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: use lastExecutionTime instead of nextExecutionTime
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-09-26 12:02:17 +02:00
Charles-Edouard Brétéché
6cf57ee81f
fix: make sure we don't modify reports not owned by kyverno ( #8502 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-09-22 04:01:21 +00:00
Charles-Edouard Brétéché
c1978d97a6
fix: use vap map in report aggregation ( #8458 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-09-20 08:32:38 +00:00
Charles-Edouard Brétéché
2444b7c670
refactor: add per resource reports aggregation ( #8426 )
...
* refactor: add per resource reports aggregation
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* added controller implementation
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* clean
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 kuttl tests
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 kuttl tests
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* vaps
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-09-20 14:51:32 +08:00
Charles-Edouard Brétéché
fb90d0935d
fix: use go 1.21 new packages ( #8452 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-09-19 12:06:53 +00:00
Charles-Edouard Brétéché
fa36f76cf9
refactor: move per namespace reports aggregator in a sub package ( #8419 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-09-15 08:41:36 +00:00
Charles-Edouard Brétéché
e43b78c6c7
fix: bump golang exp lib ( #8408 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-09-14 21:46:47 +00:00
Mariam Fahmy
d3dbd52f75
fix typo ( #8399 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-09-14 13:52:24 +00:00
Mariam Fahmy
9b0e6b6e9e
fix: ignore generating backgroundscan reports for Kyverno policies in case VAPs are generated ( #8356 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-09-12 11:08:28 +00:00
Charles-Edouard Brétéché
7a982a4c2c
fix: generate flake ( #8332 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-09-11 13:04:57 +00:00
Ved Ratan
10dacd5292
fix: use controller utils package in ttl controller ( #8169 )
...
* included controller-util
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* refactor
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* updated event handlers
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* added registration
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* event handler refactor
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* lint
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* enhancements
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* util refactor
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* removed comments
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix handler
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-09-08 09:12:34 +02:00
Mariam Fahmy
00fda95642
fix: add matchConditions and variables when generating VAPs ( #8308 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-09-07 13:03:36 +00:00
Mariam Fahmy
8732183cc6
feat: generate backgroundscan reports for validating admission policies ( #8135 )
...
* feat: generate backgroundscan reports for validating admission policies
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: skip validate check images if errors are encourted when validating the resource
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-09-05 11:42:17 +00:00
Charles-Edouard Brétéché
7d74eb3ab0
fix: propagate registration and error in controllerutils pkg ( #8192 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-08-31 20:08:29 +00:00
Mariam Fahmy
c583b64120
feat: generate validating admission policies and their bindings from Kyverno policies ( #7840 )
...
* feat: generate validating admission policies and their bindings from Kyverno policies
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* feat: add generate VAPs feature flag
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: use container flags instead of feature flags
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: limit VAP generation to cluster policies
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* feat: add policy checks for generating VAPs
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* chore: rename package
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* feat: translate match/exclude resources in Kyverno policies to their alternatives in validating admission policies
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* feat: add vap info in kyverno policy status
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: delete the translation of
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* feat: add kuttl tests
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* feat: add generateValidatingAdmissionPolicy feature flag in the helm chart
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* chore: update codegen
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* feat: add validating admission policy kuttl tests in the workflow
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: check K8s server version
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: remove the kind config of VAPs
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-08-31 10:25:21 +00:00
Ved Ratan
daadd36c72
[Feat]: Perform permissions check when TTL label is observed ( #8128 )
...
* added permissions check
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* lint fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* lint fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* issue_8091
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* log fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* refactor
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
Signed-off-by: Ved Ratan <82467006+VedRatan@users.noreply.github.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-08-28 16:18:48 +00:00
Charles-Edouard Brétéché
0f9fe30c08
feat: allow overriding ca and tls secret names ( #8137 )
...
* feat: allow overriding ca and tls secret names
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-28 14:05:49 +00:00
Vishal Choudhary
b374c05517
fix: update certmanager and config to take common name and namespace as arguments ( #8129 )
...
* feat: add namespace and common name args
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
* fix: remove unnecessary dns name
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
---------
Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-08-28 12:04:37 +00:00
Charles-Edouard Brétéché
93d01b3f36
feat: add ttl manager metric for tracked resources ( #8134 )
...
* feat: add ttl manager metric for tracked resources
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>
* lock
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-28 10:24:53 +00:00
Ved Ratan
ebd9506f87
[Feat] TTL controller log improvements ( #8112 )
...
* upgraded verbose and enhanced label
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* enhancements
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
---------
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
2023-08-25 22:32:56 +02:00
Charles-Edouard Brétéché
ab6fc0ad1b
fix: reduce tls package dependencies (part 2) ( #8109 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-08-25 11:24:52 +00:00
Ved Ratan
780f1c1e09
[Feat]: added ttl-metrics ( #8096 )
...
* added ttl-metrics
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* lint
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* applied changes
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* added gvr in labels
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* lint fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
---------
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
2023-08-24 10:32:46 +02:00
Charles-Edouard Brétéché
a3403131d6
feat: add match conditions support in webhooks ( #8042 )
...
* feat: add match conditions support in webhooks
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* chart
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* release notes
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* changelog
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix configmap
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>
* warning
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: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-08-18 08:32:15 +00:00
Charles-Edouard Brétéché
57a0f81040
feat: use k8s 1.28 libs ( #8037 )
...
* feat: use k8s 1.28 libs
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix validating admission policies
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix a typo
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-08-18 03:54:05 +00:00
Ved Ratan
0ebc7518a8
fix, enhancement ( #7988 )
...
* fix, enhancement
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* lint
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
---------
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
2023-08-09 09:50:11 +02:00
Charles-Edouard Brétéché
549f290002
fix: ttl manager stop informer on error ( #7966 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-08-03 17:53:52 +00:00
Charles-Edouard Brétéché
64a555a25d
fix: ttl cleanup controller events processing ( #7964 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-08-03 15:27:32 +00:00
Charles-Edouard Brétéché
329c11a058
chore: move ttl formats to constants ( #7958 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-08-02 19:12:40 +02:00
Charles-Edouard Brétéché
4dee024f13
chore: rename ttl controller package ( #7957 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-08-02 16:24:26 +00:00
Ved Ratan
9f2cc6c99c
feat: add ttl controller ( #7821 )
...
* added the ttl controller
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fixed label and vars
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* added logger
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* applied fixes
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* removed comments
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* lint
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* lint
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* lint
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* more lint fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* applied changes
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* minor fixes
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix logger, separate parse logic
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* added tests
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* added kuttl tests, validation utilities
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* commented code
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* renamed tests
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix test
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* created log.go
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix log.go
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* added README.md refactor code
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* lint fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* lint
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* lint fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* added validation webhook
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* label-validation fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* added flag, updated verbs
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* updated verbs
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* updated helm chart
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* test fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* lint
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* linter
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* imporoved webhook validation
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* linter fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* lint
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* lint fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* fix codegen
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* webhook names and path constants
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* constant label
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix label selector
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* kuttl test fix
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
* helm docs
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix controller logger
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix: manager logger
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix failure policy
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* kuttl tests
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* move kuttl tests in separate job
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* remove rbac steps
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* remove configmaps from core cluster role
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix logger
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* rename flag
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 error
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix linter
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Ved Ratan <vedratan8@gmail.com>
Signed-off-by: Ved Ratan <82467006+VedRatan@users.noreply.github.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-08-02 16:47:40 +02:00
Charles-Edouard Brétéché
cd9a13e751
chore: move kyverno.io/verify-images constant ( #7955 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-08-02 14:02:21 +00:00
Charles-Edouard Brétéché
524d93f413
chore: move more constants ( #7944 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-07-31 14:51:23 +00:00
Jim Bugwadia
be2abbeaa8
add flag for policy reports ( #7888 )
...
* add flag for policy reports
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* remove logger param
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* update launch
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* remove logging changes
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* remove logging changes
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* remove logging changes
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* update Helm chart
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
---------
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2023-07-26 12:22:51 +08:00
Charles-Edouard Brétéché
dfceb4bf82
fix: remove obsolete methode in discovery ( #7802 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-07-11 16:22:36 +08:00
Charles-Edouard Brétéché
e166d7897b
fix: aggregated admission report not updated correctly ( #7798 )
...
* fix: aggregated admission report not updated correctly
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>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-07-10 12:25:32 +00:00
Mariam Fahmy
1fa20c6c46
Move fetchClusterPolicies() and fetchPolicies() to utils ( #7773 )
...
Signed-off-by: Mariam Fahmy <mariamfahmy66@gmail.com>
2023-07-07 09:05:11 +02: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
Charles-Edouard Brétéché
c5ebb73231
fix: lock schema manager when updating it ( #7704 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-06-29 12:39:09 +08:00
Charles-Edouard Brétéché
1d5fe217da
feat: add background only policy support ( #6666 )
...
* feat: add background only policy support
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* webhook
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>
* 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>
* all disabled
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-06-28 12:54:27 +00:00