From 6547024fa3947a65c74ee5a00140e5a8a9398437 Mon Sep 17 00:00:00 2001 From: Dmytro Dovbii Date: Wed, 14 Sep 2016 15:47:22 +0300 Subject: [PATCH] Apply custom cidr configuration for docker0 for master k8s node Change-Id: Id47c3d4548f1556280b9663a6176205bf0d3b051 Closes-Bug: #1590070 --- .../package/Resources/KubeMasterSetup.template | 1 + .../package/Resources/scripts/master-kube-setup.sh | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/Kubernetes/KubernetesCluster/package/Resources/KubeMasterSetup.template b/Kubernetes/KubernetesCluster/package/Resources/KubeMasterSetup.template index af5965b..a347fd3 100644 --- a/Kubernetes/KubernetesCluster/package/Resources/KubeMasterSetup.template +++ b/Kubernetes/KubernetesCluster/package/Resources/KubeMasterSetup.template @@ -41,6 +41,7 @@ Scripts: - systemd/kube-apiserver.service - systemd/kube-scheduler.service - systemd/kube-controller-manager.service + - systemd/docker.service Options: diff --git a/Kubernetes/KubernetesCluster/package/Resources/scripts/master-kube-setup.sh b/Kubernetes/KubernetesCluster/package/Resources/scripts/master-kube-setup.sh index 74e3596..63e9e69 100644 --- a/Kubernetes/KubernetesCluster/package/Resources/scripts/master-kube-setup.sh +++ b/Kubernetes/KubernetesCluster/package/Resources/scripts/master-kube-setup.sh @@ -7,6 +7,13 @@ mkdir -p /var/run/murano-kubernetes if [[ $(which systemctl) ]]; then + # On debian docker ignores /etc/default/docker file + # Replacing original docker.service to modified with EnvironmentFile option + systemctl stop docker + cp -f systemd/docker.service /lib/systemd/system/ + systemctl daemon-reload + systemctl start docker + systemctl stop kube* sed -i.bak "s/%%MASTER_IP%%/$2/g" environ/kube-config