36 lines
2.4 KiB
Text
36 lines
2.4 KiB
Text
|
%p
|
||
|
- link_to_help_page = link_to(s_('ClusterIntegration|help page'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer')
|
||
|
= s_('ClusterIntegration|Read our %{link_to_help_page} on Kubernetes cluster integration.').html_safe % { link_to_help_page: link_to_help_page}
|
||
|
|
||
|
= form_for @cluster, html: { class: 'prepend-top-20' }, url: gcp_namespace_project_clusters_path(@project.namespace, @project), as: :cluster do |field|
|
||
|
= form_errors(@cluster)
|
||
|
.form-group
|
||
|
= field.label :name, s_('ClusterIntegration|Kubernetes cluster name')
|
||
|
= field.text_field :name, class: 'form-control', placeholder: s_('ClusterIntegration|Kubernetes cluster name')
|
||
|
.form-group
|
||
|
= field.label :environment_scope, s_('ClusterIntegration|Environment scope')
|
||
|
= field.text_field :environment_scope, class: 'form-control', readonly: !has_multiple_clusters?(@project), placeholder: s_('ClusterIntegration|Environment scope')
|
||
|
|
||
|
= field.fields_for :provider_gcp, @cluster.provider_gcp do |provider_gcp_field|
|
||
|
.form-group
|
||
|
= provider_gcp_field.label :gcp_project_id, s_('ClusterIntegration|Google Cloud Platform project ID')
|
||
|
= link_to(s_('ClusterIntegration|See your projects'), 'https://console.cloud.google.com/home/dashboard', target: '_blank', rel: 'noopener noreferrer')
|
||
|
= provider_gcp_field.text_field :gcp_project_id, class: 'form-control', placeholder: s_('ClusterIntegration|Project ID')
|
||
|
|
||
|
.form-group
|
||
|
= provider_gcp_field.label :zone, s_('ClusterIntegration|Zone')
|
||
|
= link_to(s_('ClusterIntegration|See zones'), 'https://cloud.google.com/compute/docs/regions-zones/regions-zones', target: '_blank', rel: 'noopener noreferrer')
|
||
|
= provider_gcp_field.text_field :zone, class: 'form-control', placeholder: 'us-central1-a'
|
||
|
|
||
|
.form-group
|
||
|
= provider_gcp_field.label :num_nodes, s_('ClusterIntegration|Number of nodes')
|
||
|
= provider_gcp_field.text_field :num_nodes, class: 'form-control', placeholder: '3'
|
||
|
|
||
|
.form-group
|
||
|
= provider_gcp_field.label :machine_type, s_('ClusterIntegration|Machine type')
|
||
|
= link_to(s_('ClusterIntegration|See machine types'), 'https://cloud.google.com/compute/docs/machine-types', target: '_blank', rel: 'noopener noreferrer')
|
||
|
= provider_gcp_field.text_field :machine_type, class: 'form-control', placeholder: 'n1-standard-4'
|
||
|
|
||
|
.form-group
|
||
|
= field.submit s_('ClusterIntegration|Create Kubernetes cluster'), class: 'btn btn-success'
|