зеркало из https://github.com/microsoft/pai.git
Fix docker cache distribute port config (#5357)
This commit is contained in:
Родитель
648d1bcd1d
Коммит
8e1bb28533
|
@ -6,7 +6,7 @@
|
|||
- role: '../roles/docker-cache/install'
|
||||
vars:
|
||||
enable_docker_cache: true
|
||||
docker_cache_host: "{{ hostvars[groups['kube-master'][0]]['ip'] }}"
|
||||
docker_cache_host: "{{ hostvars[groups['kube-master'][0]]['ip'] }}:30500"
|
||||
tasks:
|
||||
- name: Restart service docker config from /etc/docker/daemon.json after update
|
||||
ansible.builtin.systemd:
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
enable_docker_cache: false
|
||||
docker_cache_host: 'localhost'
|
||||
docker_cache_host: 'localhost:30500'
|
||||
|
|
|
@ -5,7 +5,7 @@ import json
|
|||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("host", default="localhost", help="host addr of docker cache registry")
|
||||
parser.add_argument("host", default="localhost:30500", help="host addr of docker cache registry")
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@ def main():
|
|||
with open(str(backup_path), 'w') as f:
|
||||
json.dump(current_config, f)
|
||||
|
||||
docker_cache_mirror = "http://{}:30500".format(args.host)
|
||||
docker_cache_mirror = "http://{}".format(args.host)
|
||||
if "registry-mirrors" in current_config:
|
||||
if docker_cache_mirror not in current_config["registry-mirrors"]:
|
||||
current_config["registry-mirrors"].append(docker_cache_mirror)
|
||||
|
|
Загрузка…
Ссылка в новой задаче