Skip to content

Commit

Permalink
Fix requires_endpoints? condition
Browse files Browse the repository at this point in the history
  • Loading branch information
maxlaverse committed Dec 18, 2017
1 parent 7fb623b commit 066138b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/kubernetes-deploy/kubernetes_resource/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ def exposes_zero_replica_deployment?
end

def requires_endpoints?
return false if external_name_svc? || @related_deployment_replicas.blank?
# Service of type External don't have endpoints
return false if external_name_svc?

# problem counting replicas - by default, assume endpoints are required
return true if @related_deployment_replicas.blank?

@related_deployment_replicas > 0
end

Expand Down

0 comments on commit 066138b

Please sign in to comment.