f7ed82f44a
Why I did it The SONiC switches get their docker images from local repo, populated during install with container images pre-built into SONiC FW. With the introduction of kubernetes, new docker images available in remote repo could be deployed. This requires dockerd to be able to pull images from remote repo. Depending on the Switch network domain & config, it may or may not be able to reach the remote repo. In the case where remote repo is unreachable, we could potentially make Kubernetes server to also act as http-proxy. How I did it When admin explicitly enables, the kubernetes-server could be configured as docker-proxy. But any update to docker-proxy has to be via service-conf file environment variable, implying a "service restart docker" is required. But restart of dockerd is vey expensive, as it would restarts all dockers, including database docker. To avoid dockerd restart, pre-configure an http_proxy using an unused IP. When k8s server is enabled to act as http-proxy, an IP table entry would be created to direct all traffic to the configured-unused-proxy-ip to the kubernetes-master IP. This way any update to Kubernetes master config would be just manipulating IPTables, which will be transparent to all modules, until dockerd needs to download from remote repo. How to verify it Configure a switch such that image repo is unreachable Pre-configure dockerd with http_proxy.conf using an unused IP (e.g. 172.16.1.1) Update ctrmgrd.service to invoke ctrmgrd.py with "-p" option. Configure a k8s server, and deploy an image for feature with set_owner="kube" Check if switch could successfully download the image or not. |
||
---|---|---|
.. | ||
per_namespace | ||
share_image | ||
arp_update_vars.j2 | ||
buffers_config.j2 | ||
config-chassisdb.service.j2 | ||
config-setup.service.j2 | ||
database.service.j2 | ||
dhcp_relay.service.j2 | ||
docker_image_ctl.j2 | ||
gbsyncd.service.j2 | ||
iccpd.service.j2 | ||
init_cfg.json.j2 | ||
kube_cni.10-flannel.conflist | ||
lldp.service.j2 | ||
macsec.service.j2 | ||
manifest.json.j2 | ||
mgmt-framework.service.j2 | ||
mgmt-framework.timer | ||
nat.service.j2 | ||
organization_extensions.sh | ||
packages.json.j2 | ||
pmon.service.j2 | ||
qos_config.j2 | ||
radv.service.j2 | ||
restapi.service.j2 | ||
sflow.service.j2 | ||
snmp.service.j2 | ||
snmp.timer | ||
sonic_debian_extension.j2 | ||
sonic_version.yml.j2 | ||
sonic.target | ||
swss_vars.j2 | ||
tacacs-config.service | ||
tacacs-config.timer | ||
telemetry.service.j2 | ||
telemetry.timer | ||
updategraph.service.j2 |