'ClusterIntegration|We could not verify that one of your projects on GCP has billing enabled. Please try again.',
);
}
returnsprintf(
s__(
'This project does not have billing enabled. To create a cluster, <a href=%{linkToBilling} target="_blank" rel="noopener noreferrer">enable billing <i class="fa fa-external-link" aria-hidden="true"></i></a> and try again.',
@@ -37,21 +36,6 @@ class Projects::Clusters::GcpController < Projects::ApplicationController
private
defverify_billing
casegoogle_project_billing_status
whennil
flash.now[:alert]=_('We could not verify that one of your projects on GCP has billing enabled. Please try again.')
whenfalse
flash.now[:alert]=_('Please <a href=%{link_to_billing} target="_blank" rel="noopener noreferrer">enable billing for one of your projects to be able to create a Kubernetes cluster</a>, then try again.').html_safe%{link_to_billing: "https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral"}
whentrue
return
end
@cluster=::Clusters::Cluster.new(create_params)
render:new
end
defcreate_params
params.require(:cluster).permit(
:enabled,
...
...
@@ -75,18 +59,8 @@ class Projects::Clusters::GcpController < Projects::ApplicationController
| `repository_size_limit` | integer | no | Size limit per repository (MB) |
| `repository_storages` | array of strings | no | A list of names of enabled storage paths, taken from `gitlab.yml`. New projects will be created in one of these stores, chosen at random. |
| `require_two_factor_authentication` | boolean | no | Require all users to setup Two-factor authentication |
| `restricted_visibility_levels` | array of strings | no | Selected levels cannot be used by non-admin users for projects or snippets. Can take `private`, `internal` and `public` as a parameter. Default is null which means there is no restriction. |
| `restricted_visibility_levels` | array of strings | no | Selected levels cannot be used by non-admin users for groups, projects or snippets. Can take `private`, `internal` and `public` as a parameter. Default is null which means there is no restriction. |
| `rsa_key_restriction` | integer | no | The minimum allowed bit length of an uploaded RSA key. Default is `0` (no restriction). `-1` disables RSA keys. |
| `send_user_confirmation_email` | boolean | no | Send confirmation email on sign-up |
| `sentry_dsn` | string | yes (if `sentry_enabled` is true) | Sentry Data Source Name |
optional:default_project_visibility,type: String,values: Gitlab::VisibilityLevel.string_values,desc: 'The default project visibility'
optional:default_snippet_visibility,type: String,values: Gitlab::VisibilityLevel.string_values,desc: 'The default snippet visibility'
optional:default_group_visibility,type: String,values: Gitlab::VisibilityLevel.string_values,desc: 'The default group visibility'
optional:restricted_visibility_levels,type: Array[String],desc: 'Selected levels cannot be used by non-admin users for projects or snippets. If the public level is restricted, user profiles are only visible to logged in users.'
optional:restricted_visibility_levels,type: Array[String],desc: 'Selected levels cannot be used by non-admin users for groups, projects or snippets. If the public level is restricted, user profiles are only visible to logged in users.'