Skip to content

Commit

Permalink
Update exception message if KUBERNETES_SERVICE_PORT_HTTPS env variabl…
Browse files Browse the repository at this point in the history
…e is not set when using K8s::Client#in_cluster_config (#143)
  • Loading branch information
theomarkkuspaul authored and Kimmo Lehto committed Jul 29, 2019
1 parent 9a50d8c commit ae4dd8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/k8s/transport.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
Expand Down

0 comments on commit ae4dd8f

Please sign in to comment.