Skip to content

Commit

Permalink
Merge pull request #3030 from zendesk/grosser/err
Browse files Browse the repository at this point in the history
improve error message for replica count mismatch
  • Loading branch information
grosser authored Oct 30, 2018
2 parents 3eb9728 + ed706d2 commit a660ad0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/kubernetes/app/models/kubernetes/template_filler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ def validate_replica_target_is_supported
return if @doc.replica_target == 1 || (@doc.replica_target == 0 && @doc.delete_resource)
raise(
Samson::Hooks::UserError,
"A #{template[:kind]} can either have 1 replica or be marked for deletion."
"#{template[:kind]} #{@doc.kubernetes_role.resource_name} is set to #{@doc.replica_target} replicas, " \
"which is not supported. Set it to 1 replica to keep deploying it or marked it for deletion."
)
end

Expand Down

0 comments on commit a660ad0

Please sign in to comment.