Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NO-ISSUE: configure install-config.yaml proxy when required #1697

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions agent/05_agent_configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,12 @@ function generate_cluster_manifests() {
export AGENT_NODES_BMC_ADDRESSES_STR=${nodes_bmc_addresses::-1}
set -x

if [[ ! -z "$INSTALLER_PROXY" ]]; then
export AGENT_HTTP_PROXY=${HTTP_PROXY}
export AGENT_HTTPS_PROXY=${HTTPS_PROXY}
export AGENT_NO_PROXY=${NO_PROXY}
fi

# Create manifests
ansible-playbook -vvv \
-e install_path=${SCRIPTDIR}/${INSTALL_CONFIG_PATH} \
Expand Down
12 changes: 12 additions & 0 deletions agent/roles/manifests/templates/install-config_baremetal_yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,15 @@ imageContentSources:
{% endif %}
additionalTrustBundle: {{ ca_bundle_crt }}
{% endif %}
{% if http_proxy or https_proxy or no_proxy %}
proxy:
{% if http_proxy %}
httpProxy: "{{ http_proxy }}"
{% endif %}
{% if https_proxy %}
httpsProxy: "{{ https_proxy }}"
{% endif %}
{% if no_proxy %}
noProxy: "{{ no_proxy }}"
{% endif %}
{% endif %}
12 changes: 12 additions & 0 deletions agent/roles/manifests/templates/install-config_vsphere_yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,15 @@ additionalTrustBundle: {{ ca_bundle_crt }}
{% elif enable_local_registry %}
additionalTrustBundle: {{ registry_certificate }}
{% endif %}
{% if http_proxy or https_proxy or no_proxy %}
proxy:
{% if http_proxy %}
httpProxy: "{{ http_proxy }}"
{% endif %}
{% if https_proxy %}
httpsProxy: "{{ https_proxy }}"
{% endif %}
{% if no_proxy %}
noProxy: "{{ no_proxy }}"
{% endif %}
{% endif %}
12 changes: 12 additions & 0 deletions agent/roles/manifests/templates/install-config_yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,15 @@ additionalTrustBundle: {{ ca_bundle_crt }}
{% elif enable_local_registry %}
additionalTrustBundle: {{ registry_certificate }}
{% endif %}
{% if http_proxy or https_proxy or no_proxy %}
proxy:
{% if http_proxy %}
httpProxy: "{{ http_proxy }}"
{% endif %}
{% if https_proxy %}
httpsProxy: "{{ https_proxy }}"
{% endif %}
{% if no_proxy %}
noProxy: "{{ no_proxy }}"
{% endif %}
{% endif %}
3 changes: 3 additions & 0 deletions agent/roles/manifests/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ external_subnet_v6: "{{ lookup('env', 'EXTERNAL_SUBNET_V6') }}"
external_subnet_v4_prefixlen: "{{ lookup('env', 'EXTERNAL_SUBNET_V4') | ansible.utils.ipaddr('prefix') }}"
external_subnet_v6_prefixlen: "{{ lookup('env', 'EXTERNAL_SUBNET_V6') | ansible.utils.ipaddr('prefix') }}"
fips_mode: "{{ lookup('env', 'FIPS_MODE') | bool }}"
http_proxy: "{{ lookup('env', 'AGENT_HTTP_PROXY') }}"
https_proxy: "{{ lookup('env', 'AGENT_HTTPS_PROXY') }}"
image: "{{ lookup('env', 'IMAGE') }}"
ip_stack: "{{ lookup('env', 'IP_STACK') }}"
local_image_url_suffix: "{{ lookup('env', 'LOCAL_IMAGE_URL_SUFFIX') }}"
Expand All @@ -46,6 +48,7 @@ network_type: "{{ lookup('env', 'NETWORK_TYPE') }}"
num_masters: "{{ lookup('env', 'NUM_MASTERS') }}"
num_workers: "{{ lookup('env', 'NUM_WORKERS') }}"
num_extra_workers: "{{ lookup('env', 'NUM_EXTRA_WORKERS', default='0') }}"
no_proxy: "{{ lookup('env', 'AGENT_NO_PROXY') }}"
platform_type: "{{ lookup('env', 'AGENT_PLATFORM_TYPE') }}"
platform_name: "{{ lookup('env', 'AGENT_PLATFORM_NAME') }}"
provisioning_host_external_ip: "{{ lookup('env', 'PROVISIONING_HOST_EXTERNAL_IP') }}"
Expand Down