Bläddra i källkod

Merge pull request #6615 from giuseppe/cri-o-set-proxy

Automatic merge from submit-queue.

cri-o: set proxy variables

Make CRI-O honor HTTP_PROXY/HTTPS_PROXY/NO_PROXY.

This change https://github.com/kubernetes-incubator/cri-o/pull/1245 in the system container is required
OpenShift Merge Robot 7 år sedan
förälder
incheckning
38fd878685

+ 11 - 0
roles/container_runtime/tasks/systemcontainer_crio.yml

@@ -81,6 +81,17 @@
     dest: /etc/cni/net.d/openshift-sdn.conf
     src: 80-openshift-sdn.conf.j2
 
+- name: Create /etc/sysconfig/crio-storage
+  copy:
+    content: ""
+    dest: /etc/sysconfig/crio-storage
+    force: no
+
+- 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"

+ 9 - 0
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 %}