Skip to content

Commit

Permalink
Merge pull request #1874 from mandre/nodeip-config-proxy
Browse files Browse the repository at this point in the history
Bug 1851344: Pass proxy settings nodeip-configuration service for baremetal, vsphere, openstack
  • Loading branch information
openshift-merge-robot committed Jul 10, 2020
2 parents e423726 + 40cfab6 commit e50305a
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ contents: |
RemainAfterExit=yes
ExecStart=/run/bin/machine-config-daemon firstboot-complete-machineconfig
{{if .Proxy -}}
{{if .Proxy.HTTPProxy -}}
Environment=HTTP_PROXY={{.Proxy.HTTPProxy}}
{{end -}}
{{if .Proxy.HTTPSProxy -}}
Environment=HTTPS_PROXY={{.Proxy.HTTPSProxy}}
{{end -}}
{{if .Proxy.NoProxy -}}
Environment=NO_PROXY={{.Proxy.NoProxy}}
{{end -}}
{{end -}}
[Install]
WantedBy=multi-user.target
RequiredBy=crio.service kubelet.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ contents:
set -eo pipefail
IFACE=$1
STATUS=$2
{{if .Proxy -}}
{{if .Proxy.HTTPProxy -}}
HTTP_PROXY={{.Proxy.HTTPProxy}}
{{end -}}
{{if .Proxy.HTTPSProxy -}}
HTTPS_PROXY={{.Proxy.HTTPSProxy}}
{{end -}}
{{if .Proxy.NoProxy -}}
NO_PROXY={{.Proxy.NoProxy}}
{{end -}}
{{end -}}
# If $DHCP6_FQDN_FQDN is not empty and is not localhost.localdomain
[[ -n "$DHCP6_FQDN_FQDN" && "$DHCP6_FQDN_FQDN" != "localhost.localdomain" && "$DHCP6_FQDN_FQDN" =~ "." ]] && hostnamectl set-hostname --static --transient $DHCP6_FQDN_FQDN
case "$STATUS" in
Expand Down
12 changes: 12 additions & 0 deletions templates/common/baremetal/units/nodeip-configuration.service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ contents: |
sleep 5; \
done"
{{if .Proxy -}}
{{if .Proxy.HTTPProxy -}}
Environment=HTTP_PROXY={{.Proxy.HTTPProxy}}
{{end -}}
{{if .Proxy.HTTPSProxy -}}
Environment=HTTPS_PROXY={{.Proxy.HTTPSProxy}}
{{end -}}
{{if .Proxy.NoProxy -}}
Environment=NO_PROXY={{.Proxy.NoProxy}}
{{end -}}
{{end -}}
[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ contents:
set -eo pipefail
IFACE=$1
STATUS=$2
{{if .Proxy -}}
{{if .Proxy.HTTPProxy -}}
HTTP_PROXY={{.Proxy.HTTPProxy}}
{{end -}}
{{if .Proxy.HTTPSProxy -}}
HTTPS_PROXY={{.Proxy.HTTPSProxy}}
{{end -}}
{{if .Proxy.NoProxy -}}
NO_PROXY={{.Proxy.NoProxy}}
{{end -}}
{{end -}}
case "$STATUS" in
up|down|dhcp4-change|dhcp6-change)
logger -s "NM resolv-prepender triggered by ${1} ${2}."
Expand Down
12 changes: 12 additions & 0 deletions templates/common/openstack/units/nodeip-configuration.service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ contents: |
sleep 5; \
done"
{{if .Proxy -}}
{{if .Proxy.HTTPProxy -}}
Environment=HTTP_PROXY={{.Proxy.HTTPProxy}}
{{end -}}
{{if .Proxy.HTTPSProxy -}}
Environment=HTTPS_PROXY={{.Proxy.HTTPSProxy}}
{{end -}}
{{if .Proxy.NoProxy -}}
Environment=NO_PROXY={{.Proxy.NoProxy}}
{{end -}}
{{end -}}
[Install]
WantedBy=multi-user.target
13 changes: 13 additions & 0 deletions templates/common/ovirt/files/NetworkManager-resolv-prepender.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ contents:
set -eo pipefail
IFACE=$1
STATUS=$2
{{if .Proxy -}}
{{if .Proxy.HTTPProxy -}}
HTTP_PROXY={{.Proxy.HTTPProxy}}
{{end -}}
{{if .Proxy.HTTPSProxy -}}
HTTPS_PROXY={{.Proxy.HTTPSProxy}}
{{end -}}
{{if .Proxy.NoProxy -}}
NO_PROXY={{.Proxy.NoProxy}}
{{end -}}
{{end -}}
case "$STATUS" in
up|down|dhcp4-change|dhcp6-change)
logger -s "NM resolv-prepender triggered by ${1} ${2}."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ contents:
set -eo pipefail
IFACE=$1
STATUS=$2
{{if .Proxy -}}
{{if .Proxy.HTTPProxy -}}
HTTP_PROXY={{.Proxy.HTTPProxy}}
{{end -}}
{{if .Proxy.HTTPSProxy -}}
HTTPS_PROXY={{.Proxy.HTTPSProxy}}
{{end -}}
{{if .Proxy.NoProxy -}}
NO_PROXY={{.Proxy.NoProxy}}
{{end -}}
{{end -}}
# If $DHCP6_FQDN_FQDN is not empty and is not localhost.localdomain
[[ -n "$DHCP6_FQDN_FQDN" && "$DHCP6_FQDN_FQDN" != "localhost.localdomain" && "$DHCP6_FQDN_FQDN" =~ "." ]] && hostnamectl set-hostname --static --transient $DHCP6_FQDN_FQDN
case "$STATUS" in
Expand Down
12 changes: 12 additions & 0 deletions templates/common/vsphere/units/nodeip-configuration.service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ contents: |
done"
ExecStart=/bin/systemctl daemon-reload
{{if .Proxy -}}
{{if .Proxy.HTTPProxy -}}
Environment=HTTP_PROXY={{.Proxy.HTTPProxy}}
{{end -}}
{{if .Proxy.HTTPSProxy -}}
Environment=HTTPS_PROXY={{.Proxy.HTTPSProxy}}
{{end -}}
{{if .Proxy.NoProxy -}}
Environment=NO_PROXY={{.Proxy.NoProxy}}
{{end -}}
{{end -}}
[Install]
WantedBy=multi-user.target
{{ end -}}
Expand Down

0 comments on commit e50305a

Please sign in to comment.