From 53ee4c58546039a364ef2f99779aa0c23645dc9b Mon Sep 17 00:00:00 2001 From: Theo Paul Date: Mon, 1 Jul 2019 15:30:38 +1200 Subject: [PATCH] Update exception message if KUBERNETES_SERVICE_PORT_HTTPS env variable is not set when using K8s::Client#in_cluster_config --- lib/k8s/transport.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/k8s/transport.rb b/lib/k8s/transport.rb index 1880ff1..894fb24 100644 --- a/lib/k8s/transport.rb +++ b/lib/k8s/transport.rb @@ -131,7 +131,7 @@ def self.in_cluster_config(**options) raise(K8s::Error::Configuration, "in_cluster_config failed: KUBERNETES_SERVICE_HOST environment not set") if host.empty? port = ENV['KUBERNETES_SERVICE_PORT_HTTPS'].to_s - raise(K8s::Error::Configuration, "in_cluster_config failed: KUBERNETES_SERVICE_HOST environment not set") if port.empty? + raise(K8s::Error::Configuration, "in_cluster_config failed: KUBERNETES_SERVICE_PORT_HTTPS environment not set") if port.empty? new( "https://#{host}:#{port}",