Skip to content

Commit 610a25b

Browse files
committed
update KEP for CSIServiceAccountToken
1 parent 9ea79c5 commit 610a25b

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

keps/sig-storage/1855-csi-driver-service-account-token/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,29 +79,29 @@ uncharming traits:
7979
type CSIDriverSpec struct {
8080
... // existing fields
8181

82-
RequiresRemount *bool
83-
ServiceAccountTokens []ServiceAccountToken
82+
RequiresRepublish *bool
83+
TokenRequests []TokenRequest
8484
}
8585

86-
// ServiceAccountToken contains parameters of a token.
87-
type ServiceAccountToken struct {
88-
Audience *string
86+
// TokenRequest contains parameters of a token.
87+
type TokenRequest struct {
88+
Audience string
8989
ExpirationSeconds *int64
9090
}
9191
```
9292

9393
These three fields are all optional:
9494

95-
- **`ServiceAccountToken.Audience`**: will be set in `TokenRequestSpec`. This
95+
- **`TokenRequest.Audience`**: will be set in `TokenRequestSpec`. This
9696
- will default to `APIAudiences` of kube-apiserver if it is empty. The storage
9797
provider of the CSI driver is supposed to send a `TokenReview` with at least
9898
one of the audiences specified.
9999

100-
- **`ServiceAccountToken.ExpirationSeconds`**: will be set in
100+
- **`TokenRequest.ExpirationSeconds`**: will be set in
101101
`TokenRequestSpec`. The issued token may have a different duration, so the
102102
`ExpirationTimestamp` in `TokenRequestStatus` will be passed to CSI driver.
103103

104-
- **`RequiresRemount`**: should be only set when the mounted volumes by the
104+
- **`RequiresRepublish`**: should be only set when the mounted volumes by the
105105
CSI driver have TTL and require re-validation on the token.
106106

107107
- **Note**: Remount means re-execution of `NodePublishVolume` in scope of
@@ -129,8 +129,8 @@ and will be set in `VolumeContext`:
129129

130130
Take the Vault provider for secret store CSI driver as an example:
131131

132-
1. Create `CSIDriver` object with `ServiceAccountToken[0].Audience=['vault']`
133-
and `RequiresRemount=true`.
132+
1. Create `CSIDriver` object with `TokenRequests[0].Audience=['vault']`
133+
and `RequiresRepublish=true`.
134134
2. When the volume manager of kubelet sees a new volume, the pod object in
135135
`mountedPods` will have `requiresRemound=true` after `MarkRemountRequired`
136136
is called. `MarkRemountRequired` will call into `RequiresRemount` of the
@@ -143,7 +143,7 @@ Take the Vault provider for secret store CSI driver as an example:
143143

144144
### Notes/Constraints/Caveats
145145

146-
The `RequiresRemount` is useful when the mounted volumes can expire and the
146+
The `RequiresRepublish` is useful when the mounted volumes can expire and the
147147
availability and validity of volumes are continuously required. Those volumes
148148
are most likely credentials which rotates for the best security practice. There
149149
are two options when the remount failed:
@@ -220,8 +220,8 @@ Option 1 is adopted. See discussion
220220
- **Will enabling / using this feature result in any new API calls?**
221221

222222
- API call type: `TokenRequest`
223-
- estimated throughput: 1(`RequiresRemount=false`) or
224-
1/ExpirationSeconds/s(`RequiresRemount=true`) for each CSI driver using
223+
- estimated throughput: 1(`RequiresRepublish=false`) or
224+
1/ExpirationSeconds/s(`RequiresRepublish=true`) for each CSI driver using
225225
this feature.
226226
- originating component: kubelet
227227
- components listing and/or watching resources they didn't before: n/a.

keps/sig-storage/1855-csi-driver-service-account-token/kep.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ approvers:
1515
- "@msau42"
1616
- "@mikedanese"
1717
creation-date: 2020-06-09
18-
last-updated: 2020-07-07
18+
last-updated: 2020-11-12
1919
status: implementable
2020
stage: alpha
2121
latest-milestone: "v1.20"

0 commit comments

Comments
 (0)