• Kubernetes Submit Queue's avatar
    Merge pull request #46444 from jsafrane/node-mount-propagation · 11a83607
    Kubernetes Submit Queue authored
    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
    11a83607
kubelet_pods.go 63.8 KB