diff --git a/magnum/drivers/common/templates/kubernetes/fragments/kube-apiserver-to-kubelet-role.sh b/magnum/drivers/common/templates/kubernetes/fragments/kube-apiserver-to-kubelet-role.sh index 2113c6a6bf..f0d0f4623d 100644 --- a/magnum/drivers/common/templates/kubernetes/fragments/kube-apiserver-to-kubelet-role.sh +++ b/magnum/drivers/common/templates/kubernetes/fragments/kube-apiserver-to-kubelet-role.sh @@ -292,7 +292,7 @@ spec: command: - /bin/openstack-cloud-controller-manager - --v=2 - - --cloud-config=/etc/kubernetes/cloud-config + - --cloud-config=/etc/kubernetes/cloud-config-occm - --cluster-name=${CLUSTER_UUID} - --use-service-account-credentials=true - --bind-address=127.0.0.1 diff --git a/magnum/drivers/common/templates/kubernetes/fragments/write-heat-params-master.sh b/magnum/drivers/common/templates/kubernetes/fragments/write-heat-params-master.sh index 2aa6008498..9629f5d257 100644 --- a/magnum/drivers/common/templates/kubernetes/fragments/write-heat-params-master.sh +++ b/magnum/drivers/common/templates/kubernetes/fragments/write-heat-params-master.sh @@ -32,6 +32,7 @@ HEAT_PARAMS=/etc/sysconfig/heat-params ETCD_DISCOVERY_URL="$ETCD_DISCOVERY_URL" USERNAME="$USERNAME" PASSWORD="$PASSWORD" + CLUSTER_NETWORK="$CLUSTER_NETWORK" CLUSTER_SUBNET="$CLUSTER_SUBNET" TLS_DISABLED="$TLS_DISABLED" KUBE_DASHBOARD_ENABLED="$KUBE_DASHBOARD_ENABLED" diff --git a/magnum/drivers/common/templates/kubernetes/fragments/write-kube-os-config.sh b/magnum/drivers/common/templates/kubernetes/fragments/write-kube-os-config.sh index e25634de7f..5a8c3be89a 100644 --- a/magnum/drivers/common/templates/kubernetes/fragments/write-kube-os-config.sh +++ b/magnum/drivers/common/templates/kubernetes/fragments/write-kube-os-config.sh @@ -15,7 +15,7 @@ $ssh_cmd cp /etc/pki/tls/certs/ca-bundle.crt /etc/kubernetes/ca-bundle.crt # Generate a the configuration for Kubernetes services # to talk to OpenStack Neutron and Cinder -cat > $KUBE_OS_CLOUD_CONFIG < $KUBE_OS_CLOUD_CONFIG # Provide optional region parameter if it's set. if [ -n "${REGION_NAME}" ]; then @@ -41,3 +43,11 @@ fi # backwards compatibility, some apps may expect this file from previous magnum versions. $ssh_cmd cp ${KUBE_OS_CLOUD_CONFIG} /etc/kubernetes/kube_openstack_config + +# Append additional networking config to config file provided to openstack +# cloud controller manager (not supported by in-tree Cinder). +cat > ${KUBE_OS_CLOUD_CONFIG}-occm <