summaryrefslogtreecommitdiff
path: root/app/views/clusters
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2019-01-23 10:28:19 -0600
committerMayra Cabrera <mcabrera@gitlab.com>2019-02-04 11:43:34 -0600
commit8ff73614a1466ffc39e4464462719e7456c03e29 (patch)
tree8573da7dc5ea258c1aa7bd373b757b4b0e6cf996 /app/views/clusters
parent280b6f6f8d038c4c28b32c5965e8a052adf4a052 (diff)
downloadgitlab-ce-8ff73614a1466ffc39e4464462719e7456c03e29.tar.gz
Moves domain setting to Cluster setting
Changes domain field to be on the Cluster page show, removing it from Auto DevOps setting. Also injects the new environment variable KUBE_INGRESS_BASE_DOMAIN into kubernetes#predefined_variables. Migration to move the information from ProjectAutoDevops#domain to Clusters::Cluster#domain. As well as necessary modifications to qa selectors Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52363
Diffstat (limited to 'app/views/clusters')
-rw-r--r--app/views/clusters/clusters/_form.html.haml18
1 files changed, 17 insertions, 1 deletions
diff --git a/app/views/clusters/clusters/_form.html.haml b/app/views/clusters/clusters/_form.html.haml
index 4c47e11927e..068f14364ec 100644
--- a/app/views/clusters/clusters/_form.html.haml
+++ b/app/views/clusters/clusters/_form.html.haml
@@ -20,12 +20,28 @@
.form-text.text-muted= s_("ClusterIntegration|Choose which of your environments will use this cluster.")
- else
= text_field_tag :environment_scope, '*', class: 'col-md-6 form-control disabled', placeholder: s_('ClusterIntegration|Environment scope'), disabled: true
- - environment_scope_url = 'https://docs.gitlab.com/ee/user/project/clusters/#setting-the-environment-scope-premium'
+ - environment_scope_url = 'https://docs.gitlab.com/ee/user/project/clusters/#base-domain'
- environment_scope_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: environment_scope_url }
.form-text.text-muted
%code *
= s_("ClusterIntegration| is the default environment scope for this cluster. This means that all jobs, regardless of their environment, will use this cluster. %{environment_scope_start}More information%{environment_scope_end}").html_safe % { environment_scope_start: environment_scope_start, environment_scope_end: '</a>'.html_safe }
+ .form-group
+ %h5= s_('ClusterIntegration|Base domain')
+ = field.text_field :domain, class: 'col-md-6 form-control js-select-on-focus'
+ .form-text.text-muted
+ - if @cluster.application_ingress_external_ip.present?
+ - auto_devops_url = 'https://docs.gitlab.com/ee/topics/autodevops/'
+ - auto_devops_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: auto_devops_url }
+ = s_('ClusterIntegration|Specifying a domain will allow you to use Auto Review Apps and Auto Deploy stages for %{auto_devops_start}Auto DevOps%{auto_devops_end}. The domain should have a wildcard DNS configured to the Ingress IP Address below.').html_safe % { auto_devops_start: auto_devops_start, auto_devops_end: '</a>'.html_safe }
+ = s_('ClusterIntegration|Alternatively')
+ %code #{@cluster.application_ingress_external_ip}.nip.io
+ - custom_domain_url = 'https://docs.gitlab.com/ee/user/project/clusters/#pointing-your-dns-at-the-cluster-ip'
+ - custom_domain_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: custom_domain_url }
+ = s_('ClusterIntegration| can be used instead of a custom domain. %{custom_domain_start}More information%{custom_domain_end}').html_safe % { custom_domain_start: custom_domain_start, custom_domain_end: '</a>'.html_safe }
+ - else
+ = s_('ClusterIntegration|Before setting a domain, you must first install Ingress on your cluster below.')
+
- if can?(current_user, :update_cluster, @cluster)
.form-group
= field.submit _('Save changes'), class: 'btn btn-success'