Merge pull request #46444 from jsafrane/node-mount-propagation

Automatic merge from submit-queue (batch tested with PRs 45724, 48051, 46444, 51056, 51605)

Mount propagation in kubelet

Together with #45724 it implements mount propagation as proposed in https://github.com/kubernetes/community/pull/659

There is:

- New alpha annotation that allows user to explicitly set propagation mode for each `VolumeMount` in pod containers (to be replaced with real `VolumeMount.Propagation` field during beta) + validation + tests. "Private" is the default one (= no change to existing pods).

  I know about proposal for real API fields for alpha feature in https://docs.google.com/document/d/1wuoSqHkeT51mQQ7dIFhUKrdi3-1wbKrNWeIL4cKb9zU/edit, but it seems it's not implemented yet. It would save me quite lot of code and ugly annotation.

- Updated CRI API to transport chosen propagation to Docker.

- New `kubelet --experimental-mount-propagation` option to enable the previous bullet without modifying types.go (worked around with changing `KubeletDeps`... not nice, but it's better than adding a parameter to `NewMainKubelet` and removing it in the next release...)

```release-note
kubelet has alpha support for mount propagation. It is disabled by default and it is there for testing only. This feature may be redesigned or even removed in a future release.
```

@derekwaynecarr @dchen1107 @kubernetes/sig-node-pr-reviews
This commit is contained in:
Kubernetes Submit Queue
2017-09-02 12:11:07 -07:00
committed by GitHub
43 changed files with 1819 additions and 1042 deletions

View File

@@ -62731,6 +62731,10 @@
"description": "Path within the container at which the volume should be mounted. Must not contain ':'.",
"type": "string"
},
"mountPropagation": {
"description": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is alpha in 1.8 and can be reworked or removed in a future release.",
"type": "string"
},
"name": {
"description": "This must match the Name of a Volume.",
"type": "string"

View File

@@ -5334,9 +5334,17 @@
"subPath": {
"type": "string",
"description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)."
},
"mountPropagation": {
"$ref": "v1.MountPropagationMode",
"description": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is alpha in 1.8 and can be reworked or removed in a future release."
}
}
},
"v1.MountPropagationMode": {
"id": "v1.MountPropagationMode",
"properties": {}
},
"v1.Probe": {
"id": "v1.Probe",
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",

View File

@@ -7472,9 +7472,17 @@
"subPath": {
"type": "string",
"description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)."
},
"mountPropagation": {
"$ref": "v1.MountPropagationMode",
"description": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is alpha in 1.8 and can be reworked or removed in a future release."
}
}
},
"v1.MountPropagationMode": {
"id": "v1.MountPropagationMode",
"properties": {}
},
"v1.Probe": {
"id": "v1.Probe",
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",

View File

@@ -2916,9 +2916,17 @@
"subPath": {
"type": "string",
"description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)."
},
"mountPropagation": {
"$ref": "v1.MountPropagationMode",
"description": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is alpha in 1.8 and can be reworked or removed in a future release."
}
}
},
"v1.MountPropagationMode": {
"id": "v1.MountPropagationMode",
"properties": {}
},
"v1.Probe": {
"id": "v1.Probe",
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",

View File

@@ -2971,9 +2971,17 @@
"subPath": {
"type": "string",
"description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)."
},
"mountPropagation": {
"$ref": "v1.MountPropagationMode",
"description": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is alpha in 1.8 and can be reworked or removed in a future release."
}
}
},
"v1.MountPropagationMode": {
"id": "v1.MountPropagationMode",
"properties": {}
},
"v1.Probe": {
"id": "v1.Probe",
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",

View File

@@ -2971,9 +2971,17 @@
"subPath": {
"type": "string",
"description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)."
},
"mountPropagation": {
"$ref": "v1.MountPropagationMode",
"description": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is alpha in 1.8 and can be reworked or removed in a future release."
}
}
},
"v1.MountPropagationMode": {
"id": "v1.MountPropagationMode",
"properties": {}
},
"v1.Probe": {
"id": "v1.Probe",
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",

View File

@@ -8026,9 +8026,17 @@
"subPath": {
"type": "string",
"description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)."
},
"mountPropagation": {
"$ref": "v1.MountPropagationMode",
"description": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is alpha in 1.8 and can be reworked or removed in a future release."
}
}
},
"v1.MountPropagationMode": {
"id": "v1.MountPropagationMode",
"properties": {}
},
"v1.Probe": {
"id": "v1.Probe",
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",

View File

@@ -2450,9 +2450,17 @@
"subPath": {
"type": "string",
"description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)."
},
"mountPropagation": {
"$ref": "v1.MountPropagationMode",
"description": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is alpha in 1.8 and can be reworked or removed in a future release."
}
}
},
"v1.MountPropagationMode": {
"id": "v1.MountPropagationMode",
"properties": {}
},
"v1.WatchEvent": {
"id": "v1.WatchEvent",
"required": [

View File

@@ -20577,9 +20577,17 @@
"subPath": {
"type": "string",
"description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)."
},
"mountPropagation": {
"$ref": "v1.MountPropagationMode",
"description": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is alpha in 1.8 and can be reworked or removed in a future release."
}
}
},
"v1.MountPropagationMode": {
"id": "v1.MountPropagationMode",
"properties": {}
},
"v1.Probe": {
"id": "v1.Probe",
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",