Commit graph

14 commits

Author SHA1 Message Date
GitLab Bot
33813f993b Add latest changes from gitlab-org/gitlab@master 2019-10-24 12:06:03 +00:00
GitLab Bot
24fe7aa2aa Add latest changes from gitlab-org/gitlab@master 2019-10-22 18:06:35 +00:00
GitLab Bot
e464f195ff Add latest changes from gitlab-org/gitlab@master 2019-10-14 12:06:14 +00:00
Ash McKenzie
19ff9d9899
Replace rails_helper.rb with spec_helper.rb
rails_helper.rb's only logic was to require
spec_helper.rb.
2019-08-30 12:26:18 +10:00
Heinrich Lee Yu
1ce5bcacdb Remove code related to object hierarchy in MySQL
These are not required because MySQL is not
supported anymore
2019-07-25 15:35:06 +08:00
Thong Kuah
88bf3fe8b4 Adds cluster_for_group factory for convienence
Also means we don't have to resort to an update statement to set parent
for child groups who also have clusters.

This is much shorter than

```
create(:cluster, :provided_by_gcp, :group, groups: [group])
```
2019-07-19 09:53:56 +12:00
Thong Kuah
90aafe78ae Removes clusters_cte feature flag
This has been enabled on production without issue

https://gitlab.com/gitlab-org/gitlab-ce/issues/64259
2019-07-17 20:01:08 +12:00
Thong Kuah
3bc76511a0 Create CTE query for clusters hierarchy
- This enables us to use a scope to query all clusters in group
hierarchy order in one query, and also enables us to union to instance
clusters later.

- Handle case where clusters not present at level. In which case the
query should go ahead and return the next level's clusters.

- Swap with new CTE query behind Feature flag. This FF is default
disabled.
2019-07-08 06:03:09 +00:00
Thong Kuah
3f759e1674 Remove group_clusters feature flag
Now we have terminals for instance and group clusters we can remove the
FF now. Deploying to group clusters has been working without complaints
too.
2019-06-28 00:28:03 +12:00
Tiger
da5c00d1c6 Remove Kubernetes service from deployment platform
This will no longer be used for deployments, as all
service templates have been migrated to clusters.
2019-06-21 11:35:13 +10:00
Thong Kuah
a2cfc150ce Add # frozen_string_literal to spec/models
Adds `# frozen_string_literal: true` to spec/models ruby files
2019-04-01 14:37:54 +13:00
Thong Kuah
ebf87fd9c2 Unify into :group_clusters feature flag
With this MR, group clusters is now functional, so default to enabled.

Have a single setting on the root ancestor group to enabled or disable
group clusters feature as a whole
2018-12-05 10:16:44 +13:00
Thong Kuah
5bb2814ae6 Deploy to clusters for a project's groups
Look for matching clusters starting from the closest ancestor, then go
up the ancestor tree.

Then use Ruby to get clusters for each group in order. Not that
efficient, considering we will doing up to `NUMBER_OF_ANCESTORS_ALLOWED`
number of queries, but it's a finite number

Explicitly order query by depth

This allows us to control ordering explicitly and also to reverse the
order which is useful to allow us to be consistent with
Clusters::Cluster.on_environment (EE) which does reverse ordering.

Puts querying group clusters behind Feature Flag. Just in case we have
issues with performance, we can easily disable this
2018-12-05 10:16:44 +13:00
Mayra Cabrera
93e9793ce3 Create Kubernetes based on Application Templates 2018-01-04 22:35:41 +00:00