From 296abfeab394a3f58b0e7bec787c9d48b9abef5d Mon Sep 17 00:00:00 2001 From: Fernando Llaca Date: Mon, 25 Jun 2018 18:47:34 +0200 Subject: [PATCH] Solves #2933: Allow http_proxy, https_proxy and no_proxy environment variables in cert-manager playbook --- .../cert_manager/defaults/main.yml | 3 +++ .../templates/cert-manager-deploy.yml.j2 | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/roles/kubernetes-apps/ingress_controller/cert_manager/defaults/main.yml b/roles/kubernetes-apps/ingress_controller/cert_manager/defaults/main.yml index bc6bceb151e..f13550ebac3 100644 --- a/roles/kubernetes-apps/ingress_controller/cert_manager/defaults/main.yml +++ b/roles/kubernetes-apps/ingress_controller/cert_manager/defaults/main.yml @@ -4,3 +4,6 @@ cert_manager_cpu_requests: 10m cert_manager_cpu_limits: 30m cert_manager_memory_requests: 32Mi cert_manager_memory_limits: 200Mi +cert_manager_controller_http_proxy: "" +cert_manager_controller_https_proxy: "" +cert_manager_controller_no_proxy: "" diff --git a/roles/kubernetes-apps/ingress_controller/cert_manager/templates/cert-manager-deploy.yml.j2 b/roles/kubernetes-apps/ingress_controller/cert_manager/templates/cert-manager-deploy.yml.j2 index 1760ed4b80b..f2366881121 100644 --- a/roles/kubernetes-apps/ingress_controller/cert_manager/templates/cert-manager-deploy.yml.j2 +++ b/roles/kubernetes-apps/ingress_controller/cert_manager/templates/cert-manager-deploy.yml.j2 @@ -35,6 +35,18 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + {% if cert_manager_controller_http_proxy and cert_manager_controller_http_proxy != "" %} + - name: HTTP_PROXY + value: {{ cert_manager_controller_http_proxy }} + {% endif %} + {% if cert_manager_controller_https_proxy and cert_manager_controller_https_proxy != "" %} + - name: HTTPS_PROXY + value: {{ cert_manager_controller_https_proxy }} + {% endif %} + {% if cert_manager_controller_no_proxy and cert_manager_controller_no_proxy != "" %} + - name: NO_PROXY + value: {{ cert_manager_controller_no_proxy }} + {% endif %} resources: requests: cpu: {{ cert_manager_cpu_requests }}