Skip to content

Commit

Permalink
Fixed proxy settings for minion, added comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
elsonrodriguez authored and Lukasz Zajaczkowski committed Apr 28, 2016
1 parent b4333ad commit 126b6c0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions cluster/openstack/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ CLIENT_PUBLIC_KEY_PATH=${CLIENT_PUBLIC_KEY_PATH:-~/.ssh/id_rsa.pub}
# Max time period for stack provisioning. Time in minutes.
STACK_CREATE_TIMEOUT=${STACK_CREATE_TIMEOUT:-60}

# Enable Proxy, if true kube-up will apply your current proxy settings(defined by *_PROXY environment variables) to the deployment.
ENABLE_PROXY=${ENABLE_PROXY:-false}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail

#These values are meant to be swapped in by heat
# The contents of these variables swapped in by heat via environments presented to kube-up.sh

export ETC_ENVIRONMENT='FTP_PROXY=$FTP_PROXY
HTTP_PROXY=$HTTP_PROXY
Expand Down Expand Up @@ -56,8 +56,10 @@ export DOCKER_PROXY='[Service]
Environment="no_proxy=$NO_PROXY"
'

# This again is set by heat
ENABLE_PROXY='$ENABLE_PROXY'

# Heat itself doesn't have conditionals, so this is how we set up our proxy without breaking non-proxy setups.
if [[ "${ENABLE_PROXY}" == "true" ]]; then
mkdir -p /etc/systemd/system/docker.service.d/

Expand Down
6 changes: 6 additions & 0 deletions cluster/openstack/kubernetes-heat/kubecluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,12 @@ resources:
cluster_name: {get_param: "OS::stack_name"}
secgroup_base: {get_resource: secgroup_base}
secgroup_node: {get_resource: secgroup_node}
enable_proxy: {get_param: enable_proxy }
ftp_proxy: {get_param: ftp_proxy }
http_proxy: {get_param: http_proxy }
https_proxy: {get_param: https_proxy }
socks_proxy: {get_param: socks_proxy }
no_proxy: {get_param: no_proxy }
min_size: {get_param: number_of_minions}
desired_capacity: {get_param: number_of_minions}
max_size: {get_param: max_number_of_minions}
Expand Down

0 comments on commit 126b6c0

Please sign in to comment.