summaryrefslogtreecommitdiffstats
path: root/roles/container_runtime
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-01-05 10:07:35 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2018-01-05 10:08:22 +0100
commit98eef4c6f0ff07c4812c7d15b5cf678c356f48c4 (patch)
tree09a135f187220e3c50aff4ce2a69a5f034100351 /roles/container_runtime
parent9f19afc7529bd7293433b27e834b9ee3479e646f (diff)
downloadopenshift-98eef4c6f0ff07c4812c7d15b5cf678c356f48c4.tar.gz
openshift-98eef4c6f0ff07c4812c7d15b5cf678c356f48c4.tar.bz2
openshift-98eef4c6f0ff07c4812c7d15b5cf678c356f48c4.tar.xz
openshift-98eef4c6f0ff07c4812c7d15b5cf678c356f48c4.zip
crio: configure proxy variables
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1529478 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'roles/container_runtime')
-rw-r--r--roles/container_runtime/tasks/systemcontainer_crio.yml5
-rw-r--r--roles/container_runtime/templates/crio-network.j29
2 files changed, 14 insertions, 0 deletions
diff --git a/roles/container_runtime/tasks/systemcontainer_crio.yml b/roles/container_runtime/tasks/systemcontainer_crio.yml
index 6a195a938..30d233f5c 100644
--- a/roles/container_runtime/tasks/systemcontainer_crio.yml
+++ b/roles/container_runtime/tasks/systemcontainer_crio.yml
@@ -81,6 +81,11 @@
dest: /etc/cni/net.d/openshift-sdn.conf
src: 80-openshift-sdn.conf.j2
+- name: Create /etc/sysconfig/crio-network
+ template:
+ dest: /etc/sysconfig/crio-network
+ src: crio-network.j2
+
- name: Start the CRI-O service
systemd:
name: "cri-o"
diff --git a/roles/container_runtime/templates/crio-network.j2 b/roles/container_runtime/templates/crio-network.j2
new file mode 100644
index 000000000..763be97d7
--- /dev/null
+++ b/roles/container_runtime/templates/crio-network.j2
@@ -0,0 +1,9 @@
+{% if 'http_proxy' in openshift.common %}
+HTTP_PROXY={{ openshift.common.http_proxy }}
+{% endif %}
+{% if 'https_proxy' in openshift.common %}
+HTTPS_PROXY={{ openshift.common.https_proxy }}
+{% endif %}
+{% if 'no_proxy' in openshift.common %}
+NO_PROXY={{ openshift.common.no_proxy }}
+{% endif %}