kubernetes v1.37

CSIDriverSpec.tokenRequests

tokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: "csi.storage.k8s.io/serviceAccount.tokens": { "<audience>": { "token": <token>, "expirationTimestamp": <expiration timestamp in RFC3339>, }, ... } Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.

2 fields
CSIDriverSpec.tokenRequests fields and descriptions
Field / TypeDescription
audience
string required

audience is the intended audience of the token in "TokenRequestSpec". It will default to the audiences of kube apiserver.

expirationSeconds
integer

expirationSeconds is the duration of validity of the token in "TokenRequestSpec". It has the same default value of "ExpirationSeconds" in "TokenRequestSpec".

  • format: int64