Commit Graph

15 Commits

Author SHA1 Message Date
GitLab Bot bd860c22f6 Add latest changes from gitlab-org/gitlab@master 2019-09-17 12:06:48 +00:00
Dylan Griffith a1c216e5e4 Use #public_send instead #method.call
These builder methods are using user provided input inside a public_send
but this is safe to do in this instance because before they are called
we check before calling them that they match an expected application
name.
2019-04-29 22:55:13 -07:00
João Cunha 5aade0b01c Dry up and remove responsibilities
- Dry create_service.rb and update_service.rb duplicated code
- Remove known list of applications responsibility from services
- Refactor the complex builders->builder call from base_service.rb
2019-04-01 13:32:20 +00:00
Tiger Watson 76d281881a Allow runners to be installed on group clusters
A runner installed on a cluster will now use the
cluster's `cluster_type` as its `runner_type`.
2019-03-26 09:59:48 +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
João Cunha 4c974f50f6 Get rid of ScheduleInstallationService
- deletes schedule_installation_service.rb
- moves schedule_installation_service.rb logic to create_service.rb
- moves specs as well

Removes code duplication

Remove unecessary spec block

Abide review suggestions

Test installable applications which are not associated to a cluster

Fix a typo

Removes duplciated expectation

Reuse variable instead of redefining

Remove method in favor of a local scoped lambda

Improve 'failing service' shared examples

Test the increase of status count

Remove duplicated test

Enable fronzen literal
2019-02-26 16:44:31 +00:00
Amit Rathi 1cdcf40265 Allows user to override default issuer email for cert manager 2018-12-07 21:40:03 +05:30
Amit Rathi 16248dc895 Addressing review comments 2018-11-23 01:22:52 +05:30
Amit Rathi c2407dab3e Merge branch 'master' into certmanager-temp 2018-11-12 12:06:59 +05:30
Thong Kuah fc0b8252df Do not allow applications for group clusters
These applications will need further work in future issues to enable
them to work with groups of projects.
2018-11-08 23:26:03 +13:00
Amit Rathi 8837519445 Pushing WIP state for backup 2018-11-03 09:08:21 +05:30
Chris Baumbauer 6aa0645fa7 Rename knative domainname field to hostname and fix changelog entry 2018-10-30 14:12:10 -07:00
Chris Baumbauer b5155b90ee Knative support 2018-10-24 22:38:44 -07:00
Thong Kuah 504cbb27c1 Remove un-used inheritance from service
Remove the inheritance from ::BaseService which is causing us to inherit
the initializer that has project as the first arg, as we will not have
access to project with forthcoming group clusters.

Also call install service from create service - 1 less thing to re-use

Extract TestRequest code into a spec helper. Given that we need
different behaviour for Rails 5.0 (and again in Rails 5.1!), it's handy
to have that branching behaviour in one place
2018-10-15 11:09:10 +13:00
Thong Kuah cc1ccbf83a Move non-controller code into dedicated service
This should help with code re-use when we create applications for group
level cluster next.

Change `find_or_initialize_by` to explicitly find or build the right
association based on the application name. The benefit here is that we
use the associations on @cluster rather than querying from the other
side of the association.
2018-10-15 11:07:47 +13:00