Don't change to https when use_tls is set 47/67447/1
authorAndrew Gauld <ag1282@att.com>
Tue, 18 Sep 2018 19:19:46 +0000 (15:19 -0400)
committerAndrew Gauld <ag1282@att.com>
Tue, 18 Sep 2018 19:27:50 +0000 (15:27 -0400)
The k8s plugin's behavior of setting the health check probe type
scheme to https when it was http and the use_tls flag is set is
causing a problem for the Policy Handler.  This change leaves the
health check type alone, so, if it was http, it stays http even if
use_tls is set.

Change-Id: If004876f5142889abe0b24aeb4c0fdedaea3ab2b
Issue-ID: DCAEGEN2-591
Signed-off-by: Andrew Gauld <ag1282@att.com>
k8s/k8sclient/k8sclient.py

index eff51a3..4040642 100644 (file)
@@ -99,7 +99,7 @@ def _create_probe(hc, port, use_tls=False):
           http_get = client.V1HTTPGetAction(
               path = hc['endpoint'],
               port = port,
-              scheme = 'HTTPS' if use_tls else probe_type.upper()
+              scheme = probe_type.upper()
           )
         )
     elif probe_type in ['script', 'docker']:
@@ -593,4 +593,4 @@ def execute_command_in_deployment(deployment_description, command):
         return _execute_command_in_pod(namespace, pod_name, command)
 
     # Execute command in the running pods
-    return map(do_execute, pod_names)
\ No newline at end of file
+    return map(do_execute, pod_names)