Skip to content

Commit

Permalink
fix: Conform proxy vars (IBM#79)
Browse files Browse the repository at this point in the history
Proxy variables in all.yaml didn't conform to the "env." standard that
all the other variables use.

Feedback from users said it was confusing and caused some issues.

Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Amadeuds Podvratnik <pod@de.ibm.com>
  • Loading branch information
jacobemery authored and AmadeusPodvratnik committed Feb 13, 2023
1 parent 0ca15db commit cb604ba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions docs/set-variables-group-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@
## 13 - (Optional) Proxy
**Variable Name** | **Description** | **Example**
:--- | :--- | :---
**proxy_env.http_proxy** | (Optional) A proxy URL to use for creating HTTP connections outside the cluster. Will be<br /> used in the install-config and applied to other Ansible hosts unless set otherwise in<br /> no_proxy below. Must follow this pattern: http://username:pswd>@ip:port | http://ocp-admin:Pa$sw0rd@9.72.10.1:80
**proxy_env.https_proxy** | (Optional) A proxy URL to use for creating HTTPS connections outside the cluster. Will be<br /> used in the install-config and applied to other Ansible hosts unless set otherwise in<br /> no_proxy below. Must follow this pattern: https://username:pswd@ip:port | https://ocp-admin:Pa$sw0rd@9.72.10.1:80
**proxy_env.no_proxy** | (Optional) A comma-separated list (no spaces) of destination domain names, IP<br /> addresses, or other network CIDRs to exclude from proxying. When using a<br /> proxy, all necessary IPs and domains for your cluster will be added automatically. See<br /> roles/get_ocp/templates/install-config.yaml.j2 for more details on the template. <br />Preface a domain with . to match subdomains only. For example, .y.com matches<br /> x.y.com, but not y.com. Use * to bypass the proxy for all listed destinations. | example.com,192.168.10.1
**env.proxy.http** | (Optional) A proxy URL to use for creating HTTP connections outside the cluster. Will be<br /> used in the install-config and applied to other Ansible hosts unless set otherwise in<br /> no_proxy below. Must follow this pattern: http://username:pswd>@ip:port | http://ocp-admin:Pa$sw0rd@9.72.10.1:80
**env.proxy.https** | (Optional) A proxy URL to use for creating HTTPS connections outside the cluster. Will be<br /> used in the install-config and applied to other Ansible hosts unless set otherwise in<br /> no_proxy below. Must follow this pattern: https://username:pswd@ip:port | https://ocp-admin:Pa$sw0rd@9.72.10.1:80
**env.proxy.no** | (Optional) A comma-separated list (no spaces) of destination domain names, IP<br /> addresses, or other network CIDRs to exclude from proxying. When using a<br /> proxy, all necessary IPs and domains for your cluster will be added automatically. See<br /> roles/get_ocp/templates/install-config.yaml.j2 for more details on the template. <br />Preface a domain with . to match subdomains only. For example, .y.com matches<br /> x.y.com, but not y.com. Use * to bypass the proxy for all listed destinations. | example.com,192.168.10.1

## 14 - (Optional) Misc
**Variable Name** | **Description** | **Example**
Expand Down
9 changes: 4 additions & 5 deletions inventories/default/group_vars/all.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,10 @@ env:
fips: 'false'

# Section 13 - (Optional) Proxy

#proxy_env:
# http_proxy:
# https_proxy:
# no_proxy:
# proxy:
# http:
# https:
# no:

# Section 14 - (Optional) Misc
language: en_US.UTF-8
Expand Down
6 changes: 3 additions & 3 deletions roles/get_ocp/templates/install-config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: {{ env.install_config.api_version }}
baseDomain: {{ env.cluster.networking.base_domain }}
{% if use_proxy == true %}
{{ 'proxy: ' }}
{{ ' httpProxy: ' + proxy_env.http_proxy }}
{{ ' httpsProxy: ' + proxy_env.https_proxy }}
{{ ' noProxy: ' + proxy_env.no_proxy + ',' + '127.0.0.1,' + 'localhost,' +
{{ ' httpProxy: ' + env.proxy.http }}
{{ ' httpsProxy: ' + env.proxy.https }}
{{ ' noProxy: ' + env.proxy.no + ',' + '127.0.0.1,' + 'localhost,' +
env.bastion.networking.ip + ',' +
env.cluster.nodes.bootstrap.ip + ',' +
env.cluster.nodes.control.ip|join(',') + ',' +
Expand Down

0 comments on commit cb604ba

Please sign in to comment.