소스 검색

cluster-monitoring: conditionally render proxy settings

Sergiusz Urbaniak 6 년 전
부모
커밋
921df2b339
1개의 변경된 파일11개의 추가작업 그리고 3개의 파일을 삭제
  1. 11 3
      roles/openshift_cluster_monitoring_operator/templates/cluster-monitoring-operator-config.j2

+ 11 - 3
roles/openshift_cluster_monitoring_operator/templates/cluster-monitoring-operator-config.j2

@@ -65,7 +65,15 @@ data:
       baseImage: {{ openshift_cluster_monitoring_operator_kube_rbac_proxy_image }}
     auth:
       baseImage: {{ openshift_cluster_monitoring_operator_proxy_image }}
+{% if 'http_proxy' in openshift.common or 'https_proxy' in openshift.common or 'no_proxy' in openshift.common %}
     http:
-      httpProxy: {{ openshift.common.http_proxy  | default('') }}
-      httpsProxy: {{ openshift.common.https_proxy  | default('') }}
-      noProxy: {{ openshift.common.no_proxy  | default('') }}
+{% endif %}
+{% if 'http_proxy' in openshift.common %}
+      httpProxy: {{ openshift.common.http_proxy }}
+{% endif %}
+{% if 'https_proxy' in openshift.common %}
+      httpsProxy: {{ openshift.common.https_proxy }}
+{% endif %}
+{% if 'no_proxy' in openshift.common %}
+      noProxy: {{ openshift.common.no_proxy }}
+{% endif %}