Merge pull request #7339 from justinsb/cos_flexvolume_path

Update default flexvolumepath for COS
This commit is contained in:
Kubernetes Prow Robot 2019-08-01 09:14:15 -07:00 committed by GitHub
commit bdf039dfdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import (
"path/filepath"
"strings"
"k8s.io/kops/nodeup/pkg/distros"
"k8s.io/kops/pkg/flagbuilder"
"k8s.io/kops/pkg/k8scodecs"
"k8s.io/kops/pkg/kubemanifest"
@ -156,7 +157,14 @@ func (b *KubeControllerManagerBuilder) buildPod() (*v1.Pod, error) {
// Ensure the Volume Plugin dir is mounted on the same path as the host machine so DaemonSet deployment is possible
if volumePluginDir == "" {
volumePluginDir = "/usr/libexec/kubernetes/kubelet-plugins/volume/exec"
switch b.Distribution {
case distros.DistributionContainerOS:
// Default is different on ContainerOS, see https://github.com/kubernetes/kubernetes/pull/58171
volumePluginDir = "/home/kubernetes/flexvolume"
default:
volumePluginDir = "/usr/libexec/kubernetes/kubelet-plugins/volume/exec"
}
} else {
// If volume-plugin-dir flag is set in kubelet, match dir in kube-controller
flags = append(flags, "--flex-volume-plugin-dir="+volumePluginDir)