diff --git a/cluster/openstack/config-default.sh b/cluster/openstack/config-default.sh index daad8d161d7..d2cc00c0151 100644 --- a/cluster/openstack/config-default.sh +++ b/cluster/openstack/config-default.sh @@ -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} diff --git a/cluster/openstack/kubernetes-heat/fragments/configure-proxy.sh b/cluster/openstack/kubernetes-heat/fragments/configure-proxy.sh index 60fba2f8efe..c6489239d80 100644 --- a/cluster/openstack/kubernetes-heat/fragments/configure-proxy.sh +++ b/cluster/openstack/kubernetes-heat/fragments/configure-proxy.sh @@ -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 @@ -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/ diff --git a/cluster/openstack/kubernetes-heat/kubecluster.yaml b/cluster/openstack/kubernetes-heat/kubecluster.yaml index 0ee51535b79..af385cd44a0 100644 --- a/cluster/openstack/kubernetes-heat/kubecluster.yaml +++ b/cluster/openstack/kubernetes-heat/kubecluster.yaml @@ -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}