Commit Graph

18 Commits

Author SHA1 Message Date
Thong Kuah 0e15eec86d Associate clusters model to groups
Even though we currently only should have one group for a cluster, we
allow the flexibility to associate to other groups in the future.

This also matches the runner <=> groups association.

- Adds Cluster#first_group, aliased to Cluster#group. For the
conceivable future, a cluster will have at most one group.

- Prevent mixing of group and project clusters. If project type
clusters, it should only have projects assigned.  Similarly with groups.

- Default cluster_type to :project_type. As it's very small table we can
set default and null: false in one release.
2018-10-29 16:21:31 +13:00
Thong Kuah 19e1024bb8 Pass in project as kwarg for CreateService
This enables us to have other options in the future such as passing in
`group:`.

Also, remove project arg from UpdateService, as un-used.

This will help group cluster controller to re-use this services.
2018-10-15 11:01:09 +13:00
gfyoung 265478ad74 Enable frozen string in apps/services/**/*.rb
For directories application_settings --> labels.

Partially addresses #47424.
2018-07-16 12:36:41 -07:00
Winnie Hellmann 0ecd759d73 Replace "cluster" with "Kubernetes cluster" 2018-02-06 10:05:02 +01:00
Matija Čupić daceafc440
Replace Exception with ArgumentError 2017-12-05 13:56:30 +01:00
Matija Čupić c407d611a9
Remove redundant return in Clusters::CreateService 2017-12-05 13:48:55 +01:00
Kamil Trzcinski 9429514e30 Merge branch '35616-move-k8-to-cluster-page' into cluster-page-with-list-clusters 2017-12-05 13:29:41 +01:00
Shinya Maeda f17375b9d0 Optimize Clusters::CreateService#execute 2017-12-04 22:18:58 +09:00
Matija Čupić 363c57468d
Raise error when trying to create second cluster 2017-12-03 17:33:38 +01:00
Matija Čupić 36d24c30a7
Simplify Clusters::CreateService cluster check 2017-11-24 20:17:00 +01:00
Matija Čupić 1a9cef7962
Limit projects to just one cluster 2017-11-18 21:04:13 +01:00
Shinya Maeda b129f06733 Fix out of sync with KubernetesService. Remove namespace pramas from controller. Use time_with_zone in schema. Remove Gcp::Clusters from safe_model_attributes.ym 2017-11-02 23:19:11 +09:00
Kamil Trzcinski ccf09824f6 Slim down Platforms::Kubernetes, and instead make it instrument KubernetesService 2017-11-01 13:57:32 +01:00
Shinya Maeda 6571efb6c3 Fix spec. Fix usage ping. Fix warnings by adding new models and attributes. 2017-11-01 16:12:44 +09:00
Shinya Maeda 253bf69dda specs for feature 2017-11-01 03:59:40 +09:00
Shinya Maeda 6a65e2f5f9 specs for controller. Improved validation 2017-10-31 17:47:48 +09:00
Shinya Maeda d0cff7f585 This works 2017-10-23 11:36:35 +03:00
Kamil Trzcinski e1d12ba9b9 Refactor Clusters to be consisted from GcpProvider and KubernetesPlatform 2017-10-23 08:57:52 +03:00