Skip to content

Commit

Permalink
Merge pull request #27783 from jianhuiz/openstack-heat-network
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

Openstack heat network

add lbaas subnet and floating network configuration
support lbaas v2
add environment variable for fixed network
~~fix lb creation failed because of no 'name' for pool members according to lbaas v2 api~~ #27810

#25987 
@dagnello @lavalamp @mikedanese

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
  • Loading branch information
Kubernetes Submit Queue authored Sep 7, 2016
2 parents 0bd0d55 + 9908a02 commit 9cf0ec3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cluster/openstack-heat/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ MINION_FLAVOR=${MINION_FLAVOR:-m1.medium}

EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-public}

LBAAS_VERSION=${LBAAS_VERSION:-}

SWIFT_SERVER_URL=${SWIFT_SERVER_URL:-}

# Flag indicates if new image must be created. If 'false' then image with IMAGE_ID will be used.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ write_files:
password=$OS_PASSWORD
region=$OS_REGION_NAME
tenant-id=$OS_TENANT_ID
[LoadBalancer]
lb-version=$LBAAS_VERSION
subnet-id=$SUBNET_ID
floating-network-id=$FLOATING_NETWORK_ID
- path: /srv/salt-overlay/pillar/cluster-params.sls
content: |
service_cluster_ip_range: 10.246.0.0/16
Expand Down
7 changes: 7 additions & 0 deletions cluster/openstack-heat/kubernetes-heat/kubecluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ parameters:
description: uuid/name of a network to use for floating ip addresses
default: public

lbaas_version:
type: string
description: version of OpenStack LBaaS service. not specifying means auto detect

server_image:
type: string
description: glance image used to boot the server
Expand Down Expand Up @@ -293,6 +297,9 @@ resources:
"$OS_PASSWORD": {get_param: os_password}
"$OS_REGION_NAME": {get_param: os_region_name}
"$OS_TENANT_ID": {get_param: os_tenant_id}
"$LBAAS_VERSION": {get_param: lbaas_version}
"$SUBNET_ID": {get_resource: fixed_subnet}
"$FLOATING_NETWORK_ID": {get_attr: [kube_master_floating, floating_network_id]}
"$role": "kubernetes-master"

run_salt:
Expand Down
2 changes: 2 additions & 0 deletions cluster/openstack-heat/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ function run-heat-script() {
cd ${ROOT}/kubernetes-heat
openstack stack create --timeout 60 \
--parameter external_network=${EXTERNAL_NETWORK} \
--parameter lbaas_version=${LBAAS_VERSION} \
--parameter fixed_network_cidr=${FIXED_NETWORK_CIDR} \
--parameter ssh_key_name=${KUBERNETES_KEYPAIR_NAME} \
--parameter server_image=${IMAGE_ID} \
--parameter master_flavor=${MASTER_FLAVOR} \
Expand Down

0 comments on commit 9cf0ec3

Please sign in to comment.