Provide a region to the K8S Fedora Atomic config

Kubernetes should initialize its Global configuration for the OpenStack
provider with the region specified in the Heat stack.
This will allow user to create Magnum Kubernetes clusters in
multiregional OpenStack installation with different public endpoint for
services.

Task: 22576
Story: 2002728
Change-Id: I66820369b889e16445cad7a48cd0f458aae1c41f
This commit is contained in:
Andrei Ozerov 2018-06-29 15:00:35 +03:00
parent 3d136642b5
commit a28e5609f9
5 changed files with 18 additions and 0 deletions

View File

@ -38,6 +38,7 @@ write_files:
CLUSTER_UUID="$CLUSTER_UUID"
MAGNUM_URL="$MAGNUM_URL"
VOLUME_DRIVER="$VOLUME_DRIVER"
REGION_NAME="$REGION_NAME"
HTTP_PROXY="$HTTP_PROXY"
HTTPS_PROXY="$HTTPS_PROXY"
NO_PROXY="$NO_PROXY"

View File

@ -25,3 +25,8 @@ monitor-max-retries=3
[BlockStorage]
bs-version=v2
EOF
# Provide optional region parameter if it's set.
if [ -n ${REGION_NAME} ]; then
sed -i '/ca-file/a region='${REGION_NAME}'' $KUBE_OS_CLOUD_CONFIG
fi

View File

@ -660,6 +660,7 @@ resources:
cluster_uuid: {get_param: cluster_uuid}
magnum_url: {get_param: magnum_url}
volume_driver: {get_param: volume_driver}
region_name: {get_param: region_name}
fixed_network: {get_attr: [network, fixed_network]}
fixed_subnet: {get_attr: [network, fixed_subnet]}
api_pool_id: {get_attr: [api_lb, pool_id]}

View File

@ -72,6 +72,10 @@ parameters:
type: string
description: volume driver to use for container storage
region_name:
type: string
description: A logically separate section of the cluster
flannel_network_cidr:
type: string
description: network range for flannel overlay network
@ -456,6 +460,7 @@ resources:
"$CLUSTER_UUID": {get_param: cluster_uuid}
"$MAGNUM_URL": {get_param: magnum_url}
"$VOLUME_DRIVER": {get_param: volume_driver}
"$REGION_NAME": {get_param: region_name}
"$HTTP_PROXY": {get_param: http_proxy}
"$HTTPS_PROXY": {get_param: https_proxy}
"$NO_PROXY": {get_param: no_proxy}

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Add `region` parameter to the Global configuration section of the
Kubernetes configuration file. Setting this parameter will allow Magnum
cluster to be created in the multi-regional OpenStack installation.