Browse Source

Merge pull request #5202 from giuseppe/crio-additional-registries

Merged by openshift-bot
OpenShift Bot 7 years ago
parent
commit
4effa70d5a
2 changed files with 14 additions and 0 deletions
  1. 9 0
      roles/docker/tasks/systemcontainer_crio.yml
  2. 5 0
      roles/docker/templates/crio.conf.j2

+ 9 - 0
roles/docker/tasks/systemcontainer_crio.yml

@@ -3,6 +3,15 @@
 - set_fact:
     l_insecure_crio_registries: "{{ '\"{}\"'.format('\", \"'.join(openshift.docker.insecure_registries)) }}"
   when: openshift.docker.insecure_registries
+- set_fact:
+    l_crio_registries: "{{ openshift.docker.additional_registries + ['docker.io'] }}"
+  when: openshift.docker.additional_registries
+- set_fact:
+    l_crio_registries: "{{ ['docker.io'] }}"
+  when: not openshift.docker.additional_registries
+- set_fact:
+    l_additional_crio_registries: "{{ '\"{}\"'.format('\", \"'.join(l_crio_registries)) }}"
+  when: openshift.docker.additional_registries
 
 - name: Ensure container-selinux is installed
   package:

+ 5 - 0
roles/docker/templates/crio.conf.j2

@@ -120,6 +120,11 @@ insecure_registries = [
 {{ l_insecure_crio_registries|default("") }}
 ]
 
+# registries is used to specify a comma separated list of registries to be used
+# when pulling an unqualified image (e.g. fedora:rawhide).
+registries = [
+{{ l_additional_crio_registries|default("") }}
+]
 # The "crio.network" table contains settings pertaining to the
 # management of CNI plugins.
 [crio.network]