From f5b12d94ad46f17a219caafd703b18f3a266d5b1 Mon Sep 17 00:00:00 2001 From: Andrew Gauld Date: Tue, 18 Sep 2018 15:19:46 -0400 Subject: Don't change to https when use_tls is set 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 --- k8s/k8sclient/k8sclient.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/k8s/k8sclient/k8sclient.py b/k8s/k8sclient/k8sclient.py index eff51a3..4040642 100644 --- a/k8s/k8sclient/k8sclient.py +++ b/k8s/k8sclient/k8sclient.py @@ -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) -- cgit 1.2.3-korg