|
10 | 10 | - [Non-Goals](#non-goals)
|
11 | 11 | - [Proposal](#proposal)
|
12 | 12 | - [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) |
14 | 13 | - [Risks and Mitigations](#risks-and-mitigations)
|
15 | 14 | - [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
|
16 | 15 | - [Feature enablement and rollback](#feature-enablement-and-rollback)
|
@@ -106,37 +105,6 @@ type PodSecurityContext struct {
|
106 | 105 | }
|
107 | 106 | ```
|
108 | 107 |
|
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 |
| - |
140 | 108 | ### Risks and Mitigations
|
141 | 109 |
|
142 | 110 | - 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.
|
|
0 commit comments