Charles-Edouard Brétéché
c112aaefa1
refactor: separate resource mutation/validation handlers from server ( #3908 )
...
* refactor: webhooks server logger
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: separate policy mutation/validation handlers from server
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* separate resource mutation from server code
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-05-16 22:36:21 +08:00
Jim Bugwadia
4f8eab76ce
cleanup event messages and sources ( #3741 )
...
* cleanup events
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix sonatype issues
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-05-02 05:14:32 +00:00
shuting
a45986c04d
Set policy kind to generate events in the webhook ( #3726 )
...
* remove mutateExisting field
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* update policy controller to create UR for generate
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* remove debug log
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* - Update api docs
- Ignore e2e tests cleanup failure
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Add back index to helm template
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* Set policy kind to generate events in the webhook
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-04-29 05:50:55 +00:00
shuting
eb0b8d352c
- Create events for imageVerify rules ( #3710 )
...
- Skip generating events on blocked resource
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-04-28 17:51:06 +08:00
Charles-Edouard Brétéché
9fc65fa5a7
refactor: use policy interface and introduce admission utils package ( #3512 )
...
* refactor: use more policy interface
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: migrate to policy interface
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-31 20:25:54 +08: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
Frank Jogeleit
c522343c03
Update PolicyReport CRDs to wgpolicyk8s.io/v1alpha2 ( #1825 )
2021-08-21 10:35:17 -07:00
Valentin Velkov
63f4c9a884
Configurable success events on policies & resources. Generating failure events on policies by default. ( #1939 )
...
* Remove unused event.Reason const
Signed-off-by: Velkov <valentin.velkov@sap.com>
* Generate failure events on policies
Signed-off-by: Velkov <valentin.velkov@sap.com>
* Generate success events on policy
Signed-off-by: Velkov <valentin.velkov@sap.com>
* Introduce 'generateSuccessEvents' flag
Signed-off-by: Velkov <valentin.velkov@sap.com>
* Unit tests & chart fix
Signed-off-by: Velkov <valentin.velkov@sap.com>
2021-06-29 14:43:11 -07:00
Jim Bugwadia
e2f10c6f83
update validation logic
2020-12-23 15:10:07 -08:00
Shuting Zhao
e985ee4031
correct misspelled words
2020-11-17 12:01:01 -08:00
Shuting Zhao
cdc5190c56
update nirmata/kyverno to kyverno/kyverno
2020-10-07 11:12:31 -07:00
shuting
75a7543c6d
Events fix ( #1006 )
...
* remove success event
* remove event success message
* remove events generated on clusterpolicy
2020-07-20 20:30:02 +05:30
NoSkillGirl
b23cfa9f93
added auto-gen policy rule for cli
2020-07-11 17:57:07 +05:30
Jim Bugwadia
65193feccb
update logging, naming, and event retry ( #959 )
...
* update logging and naming
* check per policy patch count
2020-06-30 11:53:27 -07:00
shivkumar dudhani
1b1ab78f77
logs & access
2020-03-17 11:05:20 -07:00
shivkumar dudhani
a31dc21076
fix ineffective assign
2020-02-20 10:01:29 -08:00
shivkumar dudhani
e499264ea9
refactor events
2020-02-19 19:24:34 -08:00
Shivkumar Dudhani
8c1d79ab28
linter suggestions ( #655 )
...
* cleanup phase 1
* linter fixes phase 2
2020-01-24 12:05:53 -08:00
Shuting Zhao
ecbbd04bc5
- remove policy violation created on owner and related logic; - use generic call to create violation info
2020-01-06 17:07:11 -08:00
Shivkumar Dudhani
5b8ab3842b
Support variable substitution ( #549 )
...
* initial commit
* variable substitution
* update tests
* update test
* refactor engine packages for validate & generate
* update vendor
* update toml
* support variable substitution in overlay mutation
* missing update
* fix indentation in logs
* store context values as single JSON document using merge patches.
* remove duplicate functions
* fix message string
* Handle processing of policies in background (#569 )
* remove condition check while generating mutation patch as conditions are verified in the first iteration
* initial commit
* background policy validation
* correct message
* skip non-background policy process for add/update
* fix order to correct policy registration
* update comment
Co-authored-by: shuting <shutting06@gmail.com>
* refactor
Co-authored-by: shuting <shutting06@gmail.com>
2019-12-30 17:08:50 -08:00
Shivkumar Dudhani
085856baa1
add event source and format event messages ( #565 )
2019-12-26 11:50:41 -08:00
shivkumar dudhani
10fc1b47ba
Merge branch 'master' into v1.1.0
2019-12-12 16:54:42 -08:00
Shivkumar Dudhani
a81d5c9ae7
update event message ( #515 )
2019-11-18 17:13:48 -08:00
shivkumar dudhani
f97406698d
remove namespace from resource spec
2019-11-15 12:03:58 -08:00
Shuting Zhao
b67577994a
update apiversion to v1 in code
2019-11-13 13:41:08 -08:00
Shuting Zhao
bdcb2eac6a
claim namespaced policy violations
2019-11-12 23:19:38 -08:00
shivkumar dudhani
1049e3fe81
pass dynamic client
2019-11-12 18:25:50 -08:00
shivkumar dudhani
ccbb6e33a5
introduce policy violation generator
2019-11-12 14:41:29 -08:00
shivkumar dudhani
70ff2fa177
update engineResponse Name
2019-10-08 10:57:24 -07:00
shivkumar dudhani
5dab189743
fix event resource name + add filtered kinds to policy controller & namespace + fix messages
2019-09-12 15:04:35 -07:00
shivkumar dudhani
b66c1b7f0c
remove exlude kind checks
2019-09-04 10:40:49 -07:00
shivkumar dudhani
5b80da32ba
replace policyInfo with engineResponse
2019-08-26 13:34:42 -07:00
Shuting Zhao
a110efb96c
Merge branch 'policyViolation' into 254_dynamic_webhook_configurations
...
# Conflicts:
# main.go
# pkg/annotations/annotations.go
# pkg/annotations/controller.go
# pkg/controller/controller.go
# pkg/controller/controller_test.go
# pkg/engine/engine.go
# pkg/engine/generation.go
# pkg/engine/mutation.go
# pkg/engine/validation.go
# pkg/event/controller.go
# pkg/webhooks/mutation.go
# pkg/webhooks/policyvalidation.go
# pkg/webhooks/report.go
# pkg/webhooks/server.go
# pkg/webhooks/validation.go
2019-08-14 19:00:37 -07:00
shivkumar dudhani
aed0ed0dc1
clean up
2019-08-14 10:01:47 -07:00
shivkumar dudhani
c04a935300
existing resource reporting
2019-08-13 13:15:04 -07:00
shivkumar dudhani
9af6bf9003
update testing v1
2019-08-12 10:02:07 -07:00
shivkumar dudhani
a5e1b43eb7
policy violation support (incomplete)
2019-08-09 20:08:22 -07:00
shivkumar dudhani
2cdeac5988
start creation policy violation
2019-08-09 19:12:50 -07:00
shivkumar dudhani
1e621146be
test policy engine on admission requests
2019-08-09 16:55:43 -07:00
Shivkumar Dudhani
f9ad672027
Merge branch 'master' into 120_policy_performance
2019-08-07 18:57:00 -07:00
shivkumar dudhani
d16e398d38
fixes bug_267
2019-08-07 17:06:36 -07:00
Shuting Zhao
4ef50c66ea
- add resource namespace in event info - improve event text
2019-08-06 11:30:44 -07:00
shivkumar dudhani
3cb978c16f
clean up + fix bugs
2019-07-19 20:30:55 -07:00
shivkumar dudhani
f9b5ac9a27
flag, violations
2019-07-18 10:22:20 -07:00
shivkumar dudhani
129ced1b2a
annotations creation,update & removal
2019-07-17 23:13:28 -07:00
shivkumar dudhani
e5f208e303
annotation generation from policy controller
2019-07-17 17:53:13 -07:00
shivkumar dudhani
a36ed10425
change flag & corrections
2019-07-16 15:53:14 -07:00
shivkumar dudhani
f47910da53
update flag & support ValidationFailureAction flag
2019-07-15 19:14:42 -07:00
shivkumar dudhani
68a6751990
restructure webhooks pkg
2019-07-15 16:07:56 -07:00