Skip to content

Commit

Permalink
Merge pull request #7339 from justinsb/cos_flexvolume_path
Browse files Browse the repository at this point in the history
Update default flexvolumepath for COS
  • Loading branch information
k8s-ci-robot authored Aug 1, 2019
2 parents 8df256a + 35bb1c1 commit bdf039d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion nodeup/pkg/model/kube_controller_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit bdf039d

Please sign in to comment.