Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jsafrane committed Jun 8, 2017
1 parent f277614 commit 60a34d4
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions contributors/design-proposals/propagation.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ The new `VolumeMount` will look like:

```go
const (
PropagationShared PropagationMode = "Shared"
PropagationSlave PropagationMode = "Slave"
PropagationRShared PropagationMode = "RShared"
PropagationRSlave PropagationMode = "RSlave"
PropagationPrivate PropagationMode = "Private"
)

Expand All @@ -83,8 +83,8 @@ type VolumeMount struct {
}
```

Default would be `Private`, which does not break backward compatibility,
`Slave` and especially `Shared` must be explicitly requested.
Default would be `RSlave`, which should not break backward compatibility,
`RShared` must be explicitly requested.

Opinion against this:

Expand All @@ -100,8 +100,8 @@ The new `HostPathVolumeSource` will look like:

```go
const (
PropagationShared PropagationMode = "Shared"
PropagationSlave PropagationMode = "Slave"
PropagationRShared PropagationMode = "RShared"
PropagationRSlave PropagationMode = "RSlave"
PropagationPrivate PropagationMode = "Private"
)

Expand Down Expand Up @@ -163,20 +163,31 @@ and something prevents it from starting if `/sys` is shared.
## Decision

* We will take 'Add an option in VolumeMount API' (with an annotation during
alpha instead of real VolumeMount field).
alpha instead of real VolumeMount field):
* With validation that it can be used only with HostPath volumes.
* With validation that shared propagation can be used only in privileged
containers.
* kubernetes/kubernetes#46444
* Kubelet will make sure that at least `/var/lib/kubelet` can be share-able into
containers and it will refuse to start if it's unsuccessful.
containers and it will refuse to start if it's unsuccessful
* kubernetes/kubernetes#45724
* Kubelet's Docker shim layer will check that it is able to run a container with
shared mount propagation on `/var/lib/kubelet` during startup and refuse to
start otherwise. This ensures that both Docker and kubelet see the same
`/var/lib/kubelet` and it can be shared into containers.
E.g. Google COS-58 runs Docker in a separate mount namespace with slave
propagation and thus can't run a container with shared propagation on
anything. Other container engines should follow the suit.
* Node conformance suite will check that mount propagation in /var/lib/kubelet
works.
* During alpha, all the behavior above must be explicitly enabled by
`kubelet --test-enable-mount-propagation`
(or `kubelet --feature-gates MountPropagation=true`?). It will be used only
for testing of volume plugins in e2e tests. Developers / testers can enable it
in their clusters, but it's clearly marked as not ready for production.
`kubelet --experimental-enable-mount-propagation`
It will be used only for testing of volume plugins in e2e tests and
it will be marked as deprecated from the beginning.
Developers / testers can enable it in their clusters manually.
Mount propagation may be redesigned or even removed in any future release.
* The default mount propagation will be `rslave`, which is different to current
`private`. Extensive testing is needed!

## Extra Concerns

Expand Down

0 comments on commit 60a34d4

Please sign in to comment.