summaryrefslogtreecommitdiff
path: root/app/models/clusters/applications
diff options
context:
space:
mode:
authorChris Baumbauer <cab@cabnetworks.net>2018-11-03 14:43:48 -0700
committerChris Baumbauer <cab@cabnetworks.net>2018-11-03 14:43:48 -0700
commit73789fdfd2a6e34c9a05cc9e65930146e23b3195 (patch)
tree4ada8e3d2bf813f4f1caa03734f628e2b4419db6 /app/models/clusters/applications
parentc10452d285134b7eac63551f5a09606fb5d4f5e0 (diff)
downloadgitlab-ce-73789fdfd2a6e34c9a05cc9e65930146e23b3195.tar.gz
Fix the way hostname is validated with the knative app
Diffstat (limited to 'app/models/clusters/applications')
-rw-r--r--app/models/clusters/applications/knative.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/clusters/applications/knative.rb b/app/models/clusters/applications/knative.rb
index ecb42f6011e..d5cf3a4bb07 100644
--- a/app/models/clusters/applications/knative.rb
+++ b/app/models/clusters/applications/knative.rb
@@ -20,8 +20,6 @@ module Clusters
default_value_for :version, VERSION
default_value_for :hostname, nil
- validates :hostname, presence: true
-
def chart
'knative/knative'
end
@@ -31,6 +29,10 @@ module Clusters
end
def install_command
+ if hostname.nil?
+ raise 'Hostname is required'
+ end
+
Gitlab::Kubernetes::Helm::InstallCommand.new(
name: name,
version: VERSION,