k-cloud-labs / kinitiras

A programmable rule engine for k8s admission webhook
https://k-cloud-labs.github.io/kinitiras-doc
Apache License 2.0
158 stars 11 forks source link

feat: support cache resources configurable #7 #13

Closed yusank closed 1 year ago

yusank commented 1 year ago

What type of PR is this?

/kind feature

What this PR does / why we need it:

To improve performance of webhook and use less memory.

Which issue(s) this PR fixes:

Fixes #7

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

Add one new args pre-cache-resources to configure which resources to cache, for example:

... // other arguments 
--pre-cache-resources=Deployment/apps/v1,Replicas/apps/v1
codecov[bot] commented 1 year ago

Codecov Report

Merging #13 (9bede4e) into main (52d511e) will increase coverage by 24.51%. The diff coverage is 91.66%.

@@             Coverage Diff             @@
##             main      #13       +/-   ##
===========================================
+ Coverage   35.48%   60.00%   +24.51%     
===========================================
  Files           2        2               
  Lines          31       55       +24     
===========================================
+ Hits           11       33       +22     
- Misses         20       22        +2     
Impacted Files Coverage Δ
cmd/app/options/options.go 50.00% <91.66%> (+50.00%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.