diff options
author | Chris Baumbauer <cab@cabnetworks.net> | 2018-11-03 14:43:48 -0700 |
---|---|---|
committer | Chris Baumbauer <cab@cabnetworks.net> | 2018-11-03 14:43:48 -0700 |
commit | 73789fdfd2a6e34c9a05cc9e65930146e23b3195 (patch) | |
tree | 4ada8e3d2bf813f4f1caa03734f628e2b4419db6 /app | |
parent | c10452d285134b7eac63551f5a09606fb5d4f5e0 (diff) | |
download | gitlab-ce-73789fdfd2a6e34c9a05cc9e65930146e23b3195.tar.gz |
Fix the way hostname is validated with the knative app
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/clusters/stores/clusters_store.js | 6 | ||||
-rw-r--r-- | app/models/clusters/applications/knative.rb | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/app/assets/javascripts/clusters/stores/clusters_store.js b/app/assets/javascripts/clusters/stores/clusters_store.js index 26566b60ba6..f4a016f3ef1 100644 --- a/app/assets/javascripts/clusters/stores/clusters_store.js +++ b/app/assets/javascripts/clusters/stores/clusters_store.js @@ -52,7 +52,7 @@ export default class ClusterStore { statusReason: null, requestStatus: null, requestReason: null, - hostname: null + hostname: null, }, }, }; @@ -102,7 +102,9 @@ export default class ClusterStore { ? `jupyter.${this.state.applications.ingress.externalIp}.nip.io` : ''); } else if (appId === KNATIVE) { - this.state.applications.knative.hostname = serverAppEntry.hostname ? serverAppEntry.hostname : null; + this.state.applications.knative.hostname = serverAppEntry.hostname + ? serverAppEntry.hostname + : null; } }); } 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, |