Get Docker proxy info from config (#8205)
This helps not to hard code the docker proxy IP, but take it from config file during build time.
This commit is contained in:
parent
91ff807b21
commit
3a96eb933e
@ -480,7 +480,7 @@ with open("'${fl}'", "r") as s:
|
||||
if [ "${use_k8s_as_http_proxy}" == "y" ]; then
|
||||
# create proxy files for docker using private IP which will
|
||||
# be later directed to k8s master upon config
|
||||
PROXY_INFO="http://172.16.1.1:3128/"
|
||||
PROXY_INFO="${kube_docker_proxy}"
|
||||
cat <<EOT | sudo tee $FILESYSTEM_ROOT/etc/systemd/system/docker.service.d/http_proxy.conf > /dev/null
|
||||
[Service]
|
||||
Environment="HTTP_PROXY=${PROXY_INFO}"
|
||||
|
@ -146,12 +146,14 @@ INCLUDE_DHCP_RELAY = y
|
||||
# Uncomment to enable:
|
||||
# TELEMETRY_WRITABLE = y
|
||||
|
||||
# INCLUDE_MACSEC - build docker-macsec for macsec support
|
||||
INCLUDE_MACSEC = y
|
||||
|
||||
# INCLUDE_KUBERNETES - if set to y kubernetes packages are installed to be able to
|
||||
# run as worker node in kubernetes cluster.
|
||||
INCLUDE_KUBERNETES = n
|
||||
|
||||
# INCLUDE_MACSEC - build docker-macsec for macsec support
|
||||
INCLUDE_MACSEC = y
|
||||
KUBE_DOCKER_PROXY = http://172.16.1.1:3128/
|
||||
|
||||
# KUBERNETES_VERSION - Set to the required version.
|
||||
# K8s_GCR_IO_PAUSE_VERSION - Version of k8s universal pause container image
|
||||
|
1
slave.mk
1
slave.mk
@ -941,6 +941,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
|
||||
export shutdown_bgp_on_start="$(SHUTDOWN_BGP_ON_START)"
|
||||
export default_buffer_model="$(SONIC_BUFFER_MODEL)"
|
||||
export include_kubernetes="$(INCLUDE_KUBERNETES)"
|
||||
export kube_docker_proxy="$(KUBE_DOCKER_PROXY)"
|
||||
export enable_pfcwd_on_start="$(ENABLE_PFCWD_ON_START)"
|
||||
export installer_debs="$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$($*_INSTALLS))"
|
||||
export lazy_installer_debs="$(foreach deb, $($*_LAZY_INSTALLS),$(foreach device, $($(deb)_PLATFORM),$(addprefix $(device)@, $(IMAGE_DISTRO_DEBS_PATH)/$(deb))))"
|
||||
|
Loading…
Reference in New Issue
Block a user