Commit Graph

24 Commits

Author SHA1 Message Date
Tiger 5aa9b710be Allow switching clusters between managed/unmanaged
Any resources created while the cluster was managed
will be untouched, allowing users to set/unset this
flag as they please.
2019-06-18 09:09:11 +10:00
Sarah Yasonik 3f5447dbbd Remove metrics_time_window feature flag 2019-06-07 08:48:10 +00:00
Mayra Cabrera 89132bbdd6 Add gitlab-managed option to clusters form
When this option is enabled, GitLab will create namespaces and service
accounts as usual. When disabled, GitLab wont create any project
specific kubernetes resources

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56557
2019-05-03 01:05:53 +00:00
Thong Kuah abb530a619 DELETE clusters/:id/:application endpoint
Add endpoint to delete/uninstall a cluster application
2019-04-29 22:55:12 -07:00
Jose Vargas 761fa97470 Make the monitoring bundle reusable
Also push the frontend flag in the clusters controller
2019-04-16 10:00:59 -05:00
Mayra Cabrera ab06d1eda2 Renames Cluster#managed? to provided_by_user?
This will allow to user the term managed? on
https://gitlab.com/gitlab-org/gitlab-ce/issues/56557. Managed? will be
used to distinct clusters that are automatically managed by GitLab
2019-03-29 18:23:18 +00:00
João Cunha f8234d9a08 Creates Clusterss::ApplciationsController update endpoint
- Creates new route
- Creates new controller action
- Creates call stack:
  Clusterss::ApplciationsController calls -->
  Clusters::Applications::UpdateService calls -->
  Clusters::Applications::ScheduleUpdateService calls -->
  ClusterUpdateAppWorker calls -->
  Clusters::Applications::PatchService -->
  ClusterWaitForAppInstallationWorker

DRY req params

Adds gcp_cluster:cluster_update_app queue

Schedule_update_service is uneeded

Extract common logic to a parent class (UpdateService will need it)

Introduce new UpdateService

Fix rescue class namespace

Fix RuboCop offenses

Adds BaseService for create and update services

Remove request_handler code duplication

Fixes update command

Move update_command to ApplicationCore so all apps can use it

Adds tests for Knative update_command

Adds specs for PatchService

Raise error if update receives an unistalled app

Adds update_service spec

Fix RuboCop offense

Use subject in favor of go

Adds update endpoint specs for project namespace

Adds update endpoint specs for group namespace
2019-03-05 08:32:51 +02:00
Rémy Coutable f49aeacdd0
Merge branch 'fix-misspellings-app-comments' into 'master'
Fix misspellings in app/spec comments

See merge request gitlab-org/gitlab-ce!25517
2019-02-26 12:25:01 +01:00
Michael Kozono cae2c33681
Revert "Merge branch 'fix-misspellings-app-comments' into 'master'"
This reverts commit 9202bbd129, reversing
changes made to 4b282e9ce1.
2019-02-25 12:53:09 -08:00
Takuya Noguchi bbf479a36c Fix misspellings in app/spec comments
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2019-02-25 17:25:19 +09:00
Mayra Cabrera 087af654bb Addresses backend/db review comments
- Fixes multiple typos on AutoDevops script
- Add an alias to Clusters::Cluster#domain as base_domain, so it's more
descriptive
- Removes unnecessary memoization on qa specs
- Changes migration to a post migration to deal better with traffic on
big instances (like gitlab.com)
2019-02-04 12:08:09 -06:00
Mayra Cabrera 8ff73614a1 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
2019-02-04 11:43:34 -06:00
Thong Kuah f82c9dbe44 Use finder to decide to show note to user
Given the note is about how to interpret ancestor clusters, use the
finder which actually knows if there are any ancestor clusters to find
out if the note should be shown, rather than passing the same info via a
view to a helper

Added note about Kaminari.paginate_array

Link to followup issue too
2018-12-17 09:51:53 +13:00
Thong Kuah 7e4f76ea89 Show clusters of ancestors in cluster list page
Show both the cluster(s) of the clusterable, and the cluster(s) of
ancestor groups.
2018-12-17 09:50:52 +13:00
Dylan Griffith ecda32eaa2 Extract Clusters::BuildService 2018-12-10 14:14:20 +01:00
Thong Kuah 01dc3c966f Refactor to re-use similar block 2018-12-10 13:57:19 +13:00
Thong Kuah 22289352be Set cluster_type for a new cluster
This enables #allow_user_defined_namespace? to work so that the form for
a group cluster will now longer show the "Project namespace" field.
2018-12-10 13:57:19 +13:00
Amit Rathi 1cdcf40265 Allows user to override default issuer email for cert manager 2018-12-07 21:40:03 +05:30
Thong Kuah 5a042ef2fb Only project clusters has Project Namespace field
Group clusters should not allow Project Namespace so don't show that
field input too
2018-11-08 23:28:30 +13:00
Thong Kuah 1a1fdf8efe Resolve controller sharing concern
Use ClustersController as base while having Projects::ClustersController
to inform what `clusterable` is. Thanks @ayufan for the great suggestion
!

- View changes to work with new approach

- Fix javascript for new approach

- Fix feature specs for new approach

- Fix QA
2018-11-01 19:37:33 +13:00
Thong Kuah 28dabc67f4 Restore 403 functionality for external auth (EE)
When we unhooked ClustersController from
Project::ApplicationsController, we missed an EE override to
handle_not_found_or_authorized.

Rather than carry on with override RoutingActions, make a specific proc
for Project that we override in EE instead. Use that proc in both
Clusters::BaseController and Project::ApplicationsController.
2018-11-01 19:37:32 +13:00
Thong Kuah 1163b23539 Move view and path concerns to presenters
- Move show path for cluster to ClusterPresenter

- Create ClusterablePresenter to encapsulate logic. Consolidates
scattered methods from BaseController and ClustersHelper into an object.
2018-11-01 19:37:32 +13:00
Thong Kuah 88800abcd8 Abstract out project out of ClustersController
To the extent possible swap out `project` with `clusterable`

- Abstract paths for showing cluster or clusters. This will allow us to
swap in alternative paths for group level cluster

- Push :project_id and :namespace_id params from the URL to the POST
body.

- Create a nice helper for to generate links for the destroy
action

For some reason, spec :project_id and :namespace_id param are not going
through `to_param` for a JSON format. Manually call `to_param` to fix
specs.

- Move :layout to BaseController
2018-11-01 19:36:58 +13:00
Thong Kuah 5b3c096c9e Convert clusters to use a top-level controller
In preparation so that we can create both cluster attached to project
and cluster attached to group.

- Move ClustersController to top level

- Move Clusters::ApplicationsController to top-level too

- Creates a Clusters::BaseController to share common functions

- Do not rely on @project ivar. Anything could set the ivar.

- Fix Vue page components due to new data-page value

Because of the controller change we have gone from
`projects:clusters:new` to `clusters:new`, so we need to update the file
location of the page components. There is somewhere a function that will
convert data-page to a file location.

On that note, projects/clusters/gcp/new/, translate to
Projects::Clusters::Gcp#new doesn't exist so replace that with
clusters/create_gcp/ and clusters/create_user/
2018-11-01 18:38:36 +13:00