Jelajahi Sumber

master: set DEBUG_LOGLEVEL based on openshift_master_debug_level

Dan Williams 7 tahun lalu
induk
melakukan
c12c02eb93

+ 1 - 1
roles/openshift_control_plane/files/apiserver.yaml

@@ -21,7 +21,7 @@ spec:
         set -o allexport
         source /etc/origin/master/master.env
       fi
-      exec openshift start master api --config=/etc/origin/master/master-config.yaml
+      exec openshift start master api --config=/etc/origin/master/master-config.yaml --loglevel=${DEBUG_LOGLEVEL:-2}
     securityContext:
       privileged: true
     volumeMounts:

+ 1 - 1
roles/openshift_control_plane/files/controller.yaml

@@ -21,7 +21,7 @@ spec:
         set -o allexport
         source /etc/origin/master/master.env
       fi
-      exec openshift start master controllers --config=/etc/origin/master/master-config.yaml --listen=https://0.0.0.0:8444
+      exec openshift start master controllers --config=/etc/origin/master/master-config.yaml --listen=https://0.0.0.0:8444 --loglevel=${DEBUG_LOGLEVEL:-2}
     securityContext:
       privileged: true
     volumeMounts:

+ 4 - 0
roles/openshift_control_plane/templates/master.env.j2

@@ -14,3 +14,7 @@ HTTPS_PROXY={{ openshift.common.https_proxy | default('')}}
 {% if 'no_proxy' in openshift.common %}
 NO_PROXY={{ openshift.common.no_proxy | default('') }},{{ openshift.common.portal_net }},{{ openshift.master.sdn_cluster_network_cidr }}
 {% endif %}
+
+{% if openshift_master_debug_level is defined %}
+DEBUG_LOGLEVEL={{ openshift_master_debug_level }}
+{% endif %}