Skip to content

Commit 491bcf8

Browse files
committed
Update KEP to remove reference to mount option fsgroup for now
1 parent 248f4f9 commit 491bcf8

File tree

2 files changed

+2
-32
lines changed

2 files changed

+2
-32
lines changed

keps/sig-storage/695-skip-permission-change/README.md

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
- [Non-Goals](#non-goals)
1111
- [Proposal](#proposal)
1212
- [Implementation Details/Notes/Constraints [optional]](#implementation-detailsnotesconstraints-optional)
13-
- [Handling of volume types that apply gid as a mount option](#handling-of-volume-types-that-apply-gid-as-a-mount-option)
1413
- [Risks and Mitigations](#risks-and-mitigations)
1514
- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
1615
- [Feature enablement and rollback](#feature-enablement-and-rollback)
@@ -106,37 +105,6 @@ type PodSecurityContext struct {
106105
}
107106
```
108107

109-
#### Handling of volume types that apply gid as a mount option
110-
111-
Handling of volume types that use fsGroup as a mount option is out of scope for 1.20 beta, but following section still describes the general mechanism that will be used.
112-
113-
We propose following API change to `CSIDriver` type to allow drivers to declare support for applying fsGroup during mount time.
114-
115-
```go
116-
const (
117-
ReadWriteOnceWithFSTypeFSGroupPolicy FSGroupPolicy = "ReadWriteOnceWithFSType"
118-
FileFSGroupPolicy FSGroupPolicy = "File"
119-
120-
// OnMountFSGroupPolicy indicates that CSI driver supports changing volume ownership via
121-
// mount flags and hence fsgroup of pod should be made available to CSI driver in nodePublish
122-
// and nodeStage CSI RPC calls.
123-
OnMountFSGroupPolicy FSGroupPolicy = "Mount" <--- new change
124-
125-
NoneFSGroupPolicy FSGroupPolicy = "None"
126-
)
127-
```
128-
129-
If `CSIDriver.Spec.FSGroupPolicy` is set to `Mount` then pod's fsGroup will be supplied to the CSI driver in nodeStage/nodePublish driver RPC
130-
calls. `FSGroupChangePolicy` of pod will not have any effect because no recursive ownership and permission change is necessary.
131-
The exact mechanism of supplying `fsGroup` to CSI driver is still being worked out and is not part of 1.20 beta milestone for this feature.
132-
133-
We are currently considering three alternatives for supplying fsGroup to `NodeStage` and `NodePublish` RPC calls:
134-
135-
- Update CSI spec to have explicit field for supplying gid during `NodeStage` and `NodePublish` RPC call. This is being discussed in - https://github.com/container-storage-interface/spec/issues/449
136-
- We could supply fsGroup of the pod to CSI driver via volume attributes of the form - `csi.storage.k8s.io/pod.fsGroup: 1234`. The problem with this option is - this would make create a coupling between CSI driver and Kubernetes.
137-
- A third option is to supply fsGroup as existing mount flag support. The problem with this approach is - CO(Kubernetes) does not know how to format gid mount option string and choosing one particular way of formatting it, would stop us from supporting different CSI drivers which need similar parameters.
138-
139-
140108
### Risks and Mitigations
141109

142110
- One of the risks is if user volume's permission was previously changed using old algorithm(which changes permission of top level directory first) and user opts in for `OnRootMismatch` `FSGroupChangePolicy` then we can't distinguish if the volume was previously only partially recursively chown'd.

keps/sig-storage/695-skip-permission-change/kep.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ creation-date: 2020-01-20
1515
last-updated: 2020-01-20
1616
status: implementable
1717
see-also:
18+
- https://github.com/kubernetes/enhancements/issues/1682
1819
replaces:
1920
superseded-by:
2021

@@ -28,3 +29,4 @@ feature-gates:
2829
components:
2930
- kube-apiserver
3031
- kubelet
32+

0 commit comments

Comments
 (0)