From 9b2a19182386b98022c8091ccd8aad1bdc9c0dbb Mon Sep 17 00:00:00 2001 From: jerasmus Date: Mon, 18 Mar 2019 10:12:36 +0200 Subject: Add option to choose if cluster is managed by GL Added the option to choose if a cluster is managed by GitLab --- app/views/clusters/clusters/gcp/_form.html.haml | 9 +++++++++ app/views/clusters/clusters/user/_form.html.haml | 10 ++++++++++ app/views/clusters/platforms/kubernetes/_form.html.haml | 9 +++++++++ changelogs/unreleased/56557-allow-self-managed-ns-service.yml | 5 +++++ locale/gitlab.pot | 6 ++++++ 5 files changed, 39 insertions(+) create mode 100644 changelogs/unreleased/56557-allow-self-managed-ns-service.yml diff --git a/app/views/clusters/clusters/gcp/_form.html.haml b/app/views/clusters/clusters/gcp/_form.html.haml index 8ed4666e79a..c6661b9dc81 100644 --- a/app/views/clusters/clusters/gcp/_form.html.haml +++ b/app/views/clusters/clusters/gcp/_form.html.haml @@ -70,5 +70,14 @@ = s_('ClusterIntegration|This option will allow you to install applications on RBAC clusters.') = link_to _('More information'), help_page_path('user/project/clusters/index.md', anchor: 'role-based-access-control-rbac-core-only'), target: '_blank' + .form-group + .form-check + // TODO - replace `:legacy_abac` + = provider_gcp_field.check_box :legacy_abac, { class: 'form-check-input' }, false, true + = provider_gcp_field.label :legacy_abac, s_('ClusterIntegration|GitLab-managed cluster'), class: 'form-check-label label-bold' + .form-text.text-muted + = s_('ClusterIntegration|Allow GitLab to manage namespace and service accounts for this cluster.') + = link_to _('More information'), help_page_path('user/project/clusters/index.md', anchor: 'gitlab-managed-cluster'), target: '_blank' + .form-group = field.submit s_('ClusterIntegration|Create Kubernetes cluster'), class: 'js-gke-cluster-creation-submit btn btn-success', disabled: true diff --git a/app/views/clusters/clusters/user/_form.html.haml b/app/views/clusters/clusters/user/_form.html.haml index 9793c77fc2b..fd348d7f433 100644 --- a/app/views/clusters/clusters/user/_form.html.haml +++ b/app/views/clusters/clusters/user/_form.html.haml @@ -35,5 +35,15 @@ = s_('ClusterIntegration|This option will allow you to install applications on RBAC clusters.') = link_to _('More information'), help_page_path('user/project/clusters/index.md', anchor: 'role-based-access-control-rbac-core-only'), target: '_blank' + .form-group + .form-check + // TODO - replace `:authorization_type` + // TODO - replace `rbac` & `abac` + = platform_kubernetes_field.check_box :authorization_type, { class: 'form-check-input' }, 'rbac', 'abac' + = platform_kubernetes_field.label :authorization_type, s_('ClusterIntegration|GitLab-managed cluster'), class: 'form-check-label label-bold' + .form-text.text-muted + = s_('ClusterIntegration|Allow GitLab to manage namespace and service accounts for this cluster.') + = link_to _('More information'), help_page_path('user/project/clusters/index.md', anchor: 'gitlab-managed-cluster'), target: '_blank' + .form-group = field.submit s_('ClusterIntegration|Add Kubernetes cluster'), class: 'btn btn-success' diff --git a/app/views/clusters/platforms/kubernetes/_form.html.haml b/app/views/clusters/platforms/kubernetes/_form.html.haml index 4a452b83112..6b7494b172a 100644 --- a/app/views/clusters/platforms/kubernetes/_form.html.haml +++ b/app/views/clusters/platforms/kubernetes/_form.html.haml @@ -54,5 +54,14 @@ = s_('ClusterIntegration|Enable this setting if using role-based access control (RBAC).') = s_('ClusterIntegration|This option will allow you to install applications on RBAC clusters.') + .form-group + .form-check + // TODO - replace ':authorization_type' + = platform_field.check_box :authorization_type, { class: 'form-check-input', disabled: true }, 'managed', 'non-managed' + = platform_field.label :authorization_type, s_('ClusterIntegration|GitLab-managed cluster'), class: 'form-check-label label-bold' + .form-text.text-muted + = s_('ClusterIntegration|Allow GitLab to manage namespace and service accounts for this cluster.') + = link_to _('More information'), help_page_path('user/project/clusters/index.md', anchor: 'gitlab-managed-cluster'), target: '_blank' + .form-group = field.submit s_('ClusterIntegration|Save changes'), class: 'btn btn-success' diff --git a/changelogs/unreleased/56557-allow-self-managed-ns-service.yml b/changelogs/unreleased/56557-allow-self-managed-ns-service.yml new file mode 100644 index 00000000000..5bcbc2c27f6 --- /dev/null +++ b/changelogs/unreleased/56557-allow-self-managed-ns-service.yml @@ -0,0 +1,5 @@ +--- +title: Add the option to choose if a cluster is managed by GitLab +merge_request: 26096 +author: +type: added diff --git a/locale/gitlab.pot b/locale/gitlab.pot index c0c7041500d..fb03ec901a4 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -1665,6 +1665,9 @@ msgstr "" msgid "ClusterIntegration|Advanced options on this Kubernetes cluster's integration" msgstr "" +msgid "ClusterIntegration|Allow GitLab to manage namespace and service accounts for this cluster." +msgstr "" + msgid "ClusterIntegration|Alternatively" msgstr "" @@ -1782,6 +1785,9 @@ msgstr "" msgid "ClusterIntegration|GitLab Runner connects to this project's repository and executes CI/CD jobs, pushing results back and deploying, applications to production." msgstr "" +msgid "ClusterIntegration|GitLab-managed cluster" +msgstr "" + msgid "ClusterIntegration|Google Cloud Platform project" msgstr "" -- cgit v1.2.1