Commit graph

10 commits

Author SHA1 Message Date
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