libopenstorage/stork

Do not create a token on every call in the portworx driver

lpabon opened this issue · 0 comments

Is this a BUG REPORT or FEATURE REQUEST?:
Bug

What happened:
Generating a token is expensive if done very often, they involve crypto calls. Please file a bug to track that.
Example of how kubernetes deals with OIDC tokens to alleviate this: https://github.com/kubernetes/client-go/blob/master/plugin/pkg/client/auth/oidc/oidc.go#L332

See: #324 (comment)

What you expected to happen:
The driver should only create it when needed.