summaryrefslogtreecommitdiffstats
path: root/roles/docker
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2017-08-24 20:02:11 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2017-08-24 22:42:22 +0200
commitc0a018ed3a9f9dacc9a9e29fdd18a66d6fab6e85 (patch)
treeb2ba4842e6f2ff6d5cbae68f9d68504a95d92986 /roles/docker
parentaffdabe9d5182fb2dca846f4a236aa3af112b68b (diff)
downloadopenshift-c0a018ed3a9f9dacc9a9e29fdd18a66d6fab6e85.tar.gz
openshift-c0a018ed3a9f9dacc9a9e29fdd18a66d6fab6e85.tar.bz2
openshift-c0a018ed3a9f9dacc9a9e29fdd18a66d6fab6e85.tar.xz
openshift-c0a018ed3a9f9dacc9a9e29fdd18a66d6fab6e85.zip
cri-o: add support for additional registries
Support added to CRI-O with: https://github.com/kubernetes-incubator/cri-o/commit/a35727c80bd2a26613aae21db00628045cb9be24 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'roles/docker')
-rw-r--r--roles/docker/tasks/systemcontainer_crio.yml9
-rw-r--r--roles/docker/templates/crio.conf.j25
2 files changed, 14 insertions, 0 deletions
diff --git a/roles/docker/tasks/systemcontainer_crio.yml b/roles/docker/tasks/systemcontainer_crio.yml
index 787f51f94..451b8498f 100644
--- a/roles/docker/tasks/systemcontainer_crio.yml
+++ b/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:
diff --git a/roles/docker/templates/crio.conf.j2 b/roles/docker/templates/crio.conf.j2
index eae1759ab..5805b2fb1 100644
--- a/roles/docker/templates/crio.conf.j2
+++ b/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]