From 810f30956c5b8ff0974630f55e0ff6df38ebbc03 Mon Sep 17 00:00:00 2001 From: FengyunPan2 Date: Wed, 11 Apr 2018 11:30:50 +0800 Subject: [PATCH] Bind /dev/disk to node and master When kubernetes openstack cloud provider get vm metadata by configdriver, it get vm info from '/dev/disk/*', so we should bind '/dev/disk' for kube-apiserver\kube-controller-manager and kubelet. Fix #171 cc @strigazi --- kubernetes-apiserver/config.json.template | 10 ++++++++++ kubernetes-controller-manager/config.json.template | 10 ++++++++++ kubernetes-kubelet/config.json.template | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/kubernetes-apiserver/config.json.template b/kubernetes-apiserver/config.json.template index edbf9c8..e020b11 100644 --- a/kubernetes-apiserver/config.json.template +++ b/kubernetes-apiserver/config.json.template @@ -146,6 +146,16 @@ "rprivate" ] }, + { + "type": "bind", + "source": "/dev/disk", + "destination": "/dev/disk", + "options": [ + "rbind", + "ro", + "rprivate" + ] + }, { "destination": "/etc/resolv.conf", "type": "bind", diff --git a/kubernetes-controller-manager/config.json.template b/kubernetes-controller-manager/config.json.template index 5c7af9d..e3a9572 100644 --- a/kubernetes-controller-manager/config.json.template +++ b/kubernetes-controller-manager/config.json.template @@ -146,6 +146,16 @@ "rprivate" ] }, + { + "type": "bind", + "source": "/dev/disk", + "destination": "/dev/disk", + "options": [ + "rbind", + "ro", + "rprivate" + ] + }, { "destination": "/etc/resolv.conf", "type": "bind", diff --git a/kubernetes-kubelet/config.json.template b/kubernetes-kubelet/config.json.template index 69ddc44..8a8cb45 100644 --- a/kubernetes-kubelet/config.json.template +++ b/kubernetes-kubelet/config.json.template @@ -295,6 +295,16 @@ "rprivate" ] }, + { + "type": "bind", + "source": "/dev/disk", + "destination": "/dev/disk", + "options": [ + "rbind", + "ro", + "rprivate" + ] + }, { "type": "bind", "source": "/etc/localtime",