Jim Bugwadia
e8e3b93a5f
api server lookups ( #1514 )
...
* initial commit for api server lookups
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* initial commit for API server lookups
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* Enhancing dockerfiles (multi-stage) of kyverno components and adding non-root user to the docker images (#1495 )
* Dockerfile refactored
Signed-off-by: Raj Babu Das <mail.rajdas@gmail.com>
* Adding non-root commands to docker images and enhanced the dockerfiles
Signed-off-by: Raj Babu Das <mail.rajdas@gmail.com>
* changing base image to scratch
Signed-off-by: Raj Babu Das <mail.rajdas@gmail.com>
* Minor typo fix
Signed-off-by: Raj Babu Das <mail.rajdas@gmail.com>
* changing dockerfiles to use /etc/passwd to use non-root user'
Signed-off-by: Raj Babu Das <mail.rajdas@gmail.com>
* minor typo
Signed-off-by: Raj Babu Das <mail.rajdas@gmail.com>
* minor typo
Signed-off-by: Raj Babu Das <mail.rajdas@gmail.com>
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* revert cli image name (#1507 )
Signed-off-by: Raj Babu Das <mail.rajdas@gmail.com>
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* Refactor resourceCache; Reduce throttling requests (background controller) (#1500 )
* skip sending API request for filtered resource
* fix PR comment
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
* fixes https://github.com/kyverno/kyverno/issues/1490
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
* fix bug - namespace is not returned properly
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
* reduce throttling - list resource using lister
* refactor resource cache
* fix test
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
* fix label selector
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
* fix build failure
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix merge issues
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix unit test
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add nil check for API client
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Raj Babu Das <mail.rajdas@gmail.com>
Co-authored-by: shuting <shutting06@gmail.com>
2021-02-01 12:59:13 -08:00
shuting
c692263177
Refactor resourceCache; Reduce throttling requests (background controller) ( #1500 )
...
* skip sending API request for filtered resource
* fix PR comment
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
* fixes https://github.com/kyverno/kyverno/issues/1490
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
* fix bug - namespace is not returned properly
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
* reduce throttling - list resource using lister
* refactor resource cache
* fix test
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
* fix label selector
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
* fix build failure
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
2021-01-29 17:38:23 -08:00
Pooja Singh
0396d5278e
added logic for generate policy with data ( #1463 )
...
* added logic for generate policy with data
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* debuging data of configmap
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* removed few print statements
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* logic for configmap
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* logic for pod
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* logic for pod
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* restructured
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* removed println
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* added comments
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* added test cases
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* function rename
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* removed comment
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* small improvement
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* extract annotation and label
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* fixed test cases
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* extract annotation and label from updated target resource
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
* updated test cases
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-01-27 10:11:22 -08:00
shuting
d82f19be4e
Feature/fix dev mode execution ( #1477 )
...
* add serverIP to X.509 certificate SANs
* disable webhook monitor in debug mode
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2021-01-20 15:25:27 -08:00
shuting
3bc386955e
Remove unnecessary JSON patches; fixes strategicMergePatch for tolerations ( #1478 )
...
* ignore certain paths when generates JSON patches
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
* remove extra comment
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
* fix https://github.com/kyverno/kyverno/issues/1339
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
* resolve PR comments
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
* update comment
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
2021-01-19 11:08:06 -08:00
shuting
e7a04b9138
Fix memory leak - remove item from the cache once done (audit handler) ( #1459 )
...
* remove entry from audit handler
* fix test
2021-01-07 16:26:59 -08:00
shuting
52d091c5a3
Improve / clean up code ( #1444 )
...
* Remove lock embedded in CRD controller, use concurrent map to store shcemas
* delete rcr info from data store
* skip policy validation on status update
* - remove status check in policy mutation; - fix test
* Remove fqdncn flag
* add flag profiling port
* skip policy mutation & validation on status update
* sync policy status every minute
* update log messages
2021-01-06 16:32:02 -08:00
NoSkillGirl
e67747260b
generate refactorings
2021-01-04 15:19:06 +05:30
Jim Bugwadia
68474a9dd2
skip validation patterns for delete requests
2021-01-02 01:10:14 -08:00
NoSkillGirl
fabe9ee8aa
added update logic in ResourceMutation
2020-12-30 00:12:36 +05:30
NoSkillGirl
c98240d5dc
making sure older labels are not removed
2020-12-29 16:36:43 +05:30
NoSkillGirl
9913af0253
adding GR for older GR's
2020-12-29 15:35:12 +05:30
NoSkillGirl
430184add4
updated comment
2020-12-28 13:28:26 +05:30
NoSkillGirl
ed868652ae
removing goroutine
2020-12-24 18:45:46 +05:30
NoSkillGirl
bf7356d8f6
fixed updation of clone source
2020-12-24 18:39:23 +05:30
NoSkillGirl
371b79fc36
small fix
2020-12-24 12:41:54 +05:30
NoSkillGirl
0a84225dff
goroutine added for GR
2020-12-24 12:29:28 +05:30
NoSkillGirl
ddc17d1983
fixed syntax error
2020-12-24 12:28:32 +05:30
NoSkillGirl
068ec5922f
changed label prefix
2020-12-24 12:28:32 +05:30
NoSkillGirl
a2f3709985
corrected label
2020-12-24 12:28:32 +05:30
NoSkillGirl
53e2e38cd3
enqueing gr on getting deleted
2020-12-24 12:28:32 +05:30
Jim Bugwadia
58feb4f0ae
Merge pull request #1417 from kyverno/1337_match_old_resource
...
update validation logic
2020-12-23 19:01:15 -08:00
shuting
2fc3b3b998
Fixes 1410 strategic merge patch ( #1414 )
...
* fixes #1410
* fix unit test
* re-initialize worker immediately on failure
2020-12-23 17:48:00 -08:00
Jim Bugwadia
e2f10c6f83
update validation logic
2020-12-23 15:10:07 -08:00
shuting
d0347afa59
Fix invalid failure event for generate policy ( #1413 )
...
* reduce RCR throttling requests by merging policy application (policy - namespace) results into single RCR
* - refactor policy controller; - fix RCR issue
* - refactor RCR controller; - fix cpolr on ns update; - reduce throttling when getting resources; - fix tests
* update CRD schema
* fix typo
* fix invalid generate failure event
2020-12-22 11:07:31 -08:00
shuting
3c5f9f8888
1398 - Reduce RCR throttling requests ( #1406 )
...
* reduce RCR throttling requests by merging policy application (policy - namespace) results into single RCR
* - refactor policy controller; - fix RCR issue
* - refactor RCR controller; - fix cpolr on ns update; - reduce throttling when getting resources; - fix tests
* update CRD schema
* fix typo
2020-12-21 11:04:19 -08:00
Jim Bugwadia
c77944ddef
filter resources excluded in config ( #1404 )
2020-12-16 12:29:16 -08:00
shuting
5f70f5feec
fixes #1399 ( #1400 )
2020-12-15 15:21:39 -08:00
Jim Bugwadia
ad9f189144
merge main
2020-12-14 16:08:01 -08:00
Pooja Singh
bff7229678
1345 use GR lister ( #1387 )
...
* improved log message
* added lister for GR
* added label to GR
* added wait for cache is sync
2020-12-14 14:52:13 -08:00
Jim Bugwadia
b25a037113
fix generate clone/data check
2020-12-14 02:43:16 -08:00
shuting
c1764a85d1
1370 clean up stale RCRs ( #1373 )
...
* remove env "POLICY-TYPE"
* clean up resource in goroutine
* clean up stale RCRs on namespace deletion
* go vet
* clean up code
2020-12-08 23:04:16 -08:00
Jim Bugwadia
2613a6cce4
pkg/webhooks/server.go ( #1372 )
...
* pkg/webhooks/server.go
* remove test for blocking deletes on generatated & synchronized resources
* remove test for blocking deletes on generatated & synchronized resources
2020-12-08 19:09:59 -08:00
shuting
624b481df3
Fix 1351 - policy report ( #1359 )
...
* ignore Kyverno CRDs existence check when server is not available
* clean up cluster / reportChangeRequest
* resolve PR comments
* - fixes #1351 ; - clean up code
* fo fmt
2020-12-04 10:04:46 -08:00
Jim Bugwadia
9cae63ea03
Merge pull request #1352 from kyverno/1332_wildcards_in_labels
...
1332 wildcards in labels and annotations
2020-12-03 13:56:56 -08:00
Pooja Singh
733cd060a3
fixed triggring generate rule ( #1355 )
2020-12-03 09:43:43 -08:00
Jim Bugwadia
305adf2fa0
fix typos and improve readability
2020-12-01 22:50:40 -08:00
shuting
2ec5a0fa42
1319 fix throttling ( #1348 )
...
* fix policy status and generate controller issues
* shorten ACTION column name
* update logs
* improve naming
* add temp logs for troubleshooting
* cleanup logs
* apply generate policy to old & new resource in webhook
* cleanup log messages
* cleanup log messages
* cleanup log messages
* fix clean up of policy report in init container
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2020-12-01 12:30:08 -08:00
Jim Bugwadia
2344b2c305
1319 fix throttling ( #1341 )
...
* fix policy status and generate controller issues
* shorten ACTION column name
* update logs
Co-authored-by: Shuting Zhao <shutting06@gmail.com>
2020-11-30 11:22:20 -08:00
Jim Bugwadia
ec95724e97
update webhook registration and monitor ( #1318 )
...
* update webhook registration and monitor
* update log
* fix test
* improve logs
* improve logs
* format changes
* decrease interval for webhook config checks
2020-11-26 16:07:06 -08:00
Jim Bugwadia
125faaf4e3
fix variable substitution
2020-11-25 00:21:51 -08:00
shuting
e868dbfeb9
Fix 1287 - failed to update annotation through mutate policy ( #1289 )
...
* fix 1287
* update mutate log
2020-11-24 10:11:05 -08:00
Shuting Zhao
2d8092d97c
fixes https://github.com/kyverno/kyverno/issues/1238
2020-11-18 14:31:43 -08:00
Shuting Zhao
b9fb926ddb
fixes for golint ./...
2020-11-17 13:07:30 -08:00
Shuting Zhao
e985ee4031
correct misspelled words
2020-11-17 12:01:01 -08:00
Shuting Zhao
781fbfb82c
Merge branch 'main' into schema_gen
...
# Conflicts:
# pkg/generate/cleanup/controller.go
# pkg/generate/controller.go
2020-11-13 17:46:34 -08:00
Pooja Singh
c9b6c1f2f1
Supress Error Logs ( #1255 )
...
* supressed validation and crd error log
* small fix
2020-11-13 16:36:25 -08:00
Shuting Zhao
58bc63e1ad
remove policy violation from types.go
2020-11-11 15:50:17 -08:00
shuting
5e07ecc5f3
Add Policy Report ( #1229 )
...
* add report in cli
* policy report crd added
* policy report added
* configmap added
* added jobs
* added jobs
* bug fixed
* added logic for cli
* common function added
* sub command added for policy report
* subcommand added for report
* common package changed
* configmap added
* added logic for kyverno cli
* added logic for jobs
* added logic for jobs
* added logic for jobs
* added logic for cli
* buf fix
* cli changes
* count bug fix
* docs added for command
* go fmt
* refactor codebase
* remove policy controller for policyreport
* policy report removed
* bug fixes
* bug fixes
* added job trigger if needed
* job deletation logic added
* build failed fix
* fixed e2e test
* remove hard coded variables
* packages adde
* improvment added in jobs sheduler
* policy report yaml added
* cronjob added
* small fixes
* remove background sync
* documentation added for report command
* remove extra log
* small improvement
* tested policy report
* revert hardcoded changes
* changes for demo
* demo changes
* resource aggrigation added
* More changes
* More changes
* - resolve PR comments; - refactor jobs controller
* set rbac for jobs
* add clean up in job controller
* add short names
* remove application scope for policyreport
* move job controller to policyreport
* add report logic in command apply
* - update policy report types; - upgrade k8s library; - update code gen
* temporarily comment out code to pass CI build
* generate / update policyreport to cluster
* add unit test for CLI report
* add test for apply - generate policy report
* fix unit test
* - remove job controller; - remove in-memory configmap; - clean up kustomize manifest
* remove dependency
* add reportRequest / clusterReportRequest
* clean up policy report
* generate report request
* update crd clusterReportRequest
* - update json tag of report summary; - update definition manifests; - fix dclient creation
* aggregate reportRequest into policy report
* fix unit tests
* - update report summary to optional; - generate clusterPolicyReport; - remove reportRequests after merged to report
* remove
* generate reportRequest in kyverno namespace
* update resource filter in helm chart
* - rename reportRequest to reportChangeRequest; -rename clusterReportRequest to clusterReportChangeRequest
* generate policy report in background scan
* skip generating report change request if there's entry results
* fix results entry removal when policy / rule gets deleted
* rename apiversion from policy.kubernetes.io to policy.k8s.io
* update summary.* to lower case
* move reportChangeRequest to kyverno.io/v1alpha1
* remove policy report flag
* fix report update
* clean up policy violation CRD
* remove violation CRD from manifest
* clean up policy violation code - remove pvGenerator
* change severity fields to lower case
* update import library
* set report category
Co-authored-by: Yuvraj <yuvraj.yad001@gmail.com>
Co-authored-by: Yuvraj <10830562+evalsocket@users.noreply.github.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2020-11-09 11:26:12 -08:00
Jim Bugwadia
7e9b08baeb
Feature/make operators case insensitive ( #1217 )
...
* fix typo
* make operators case insensitive
* fix case statement
2020-10-29 15:00:22 -07:00