libopenstorage / stork

Stork - Storage Orchestration Runtime for Kubernetes
Apache License 2.0
392 stars 89 forks source link

PWX-37036: GetPersistentVolumeClaim needs to use cache in extender, webhook and monitor calls. #1838

Closed diptiranjanpx closed 2 months ago

diptiranjanpx commented 2 months ago

What type of PR is this? improvement

What this PR does / why we need it: Now informercache will keep the trimmed PVC information. This will be useful to enhance performance in webhook, extender and monitor.

Does this PR change a user-facing CRD or CLI?: no

Is a release note needed?:

Issue:
User Impact:
Resolution

Does this change need to be cherry-picked to a release branch?:

Test

  1. Tested with 100 pod deployments with webhook enabled and those using one RWO px volume.
  2. Took down px in 3 nodes in a 9 node cluster to check if drivermonitor is working fine.

Integration test - https://jenkins.pwx.dev.purestorage.com/job/Users/job/strivedi/job/strivedi-extender/2/

strivedi-px commented 2 months ago

Lets fix the UT TestExtenderWithCache/setup. Failing with the following error:

panic: http: multiple registrations for /
diptiranjanpx commented 2 months ago

Lets fix the UT TestExtenderWithCache/setup. Failing with the following error:

panic: http: multiple registrations for /

Have fixed this by creating an instance of http server multiplexer and associating that to the http server of externder.

The reason the UTs were failing is because for mocking cache another suite of tests were running whose setup was failing with above error. Also the same test suite cant be used as if we set a cache instance then for all tests we have to mock the cache.

Integration test: https://jenkins.pwx.dev.purestorage.com/job/Users/job/strivedi/job/strivedi-extender/3/