summaryrefslogtreecommitdiff
path: root/app/services/clusters
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '34758-refactor-cluster-services' into 'master'Dmitriy Zaporozhets2018-10-152-19/+23
|\ | | | | | | | | Refactor Cluster services to enable groups or projects See merge request gitlab-org/gitlab-ce!22181
| * Pass in project as kwarg for CreateServiceThong Kuah2018-10-152-19/+23
| | | | | | | | | | | | | | | | | | 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.
* | Remove un-used inheritance from serviceThong Kuah2018-10-152-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Move non-controller code into dedicated serviceThong Kuah2018-10-151-0/+66
|/ | | | | | | | | | 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.
* Do not persist errors from Kubernetes callsMayra Cabrera2018-09-172-7/+7
|
* Kubernetes secret are namespaced, so must always pass a namespace arg.Thong Kuah2018-09-143-6/+7
| | | | In our case it's 'default'.
* Add FE option for users to choose to create a fully RBAC-enabled cluster or not.Thong Kuah2018-09-141-5/+0
| | | | This is similar to the option in the Add Existing cluster form
* Always create `gitlab` service account and service account token regardless ↵Thong Kuah2018-09-144-32/+31
| | | | | | | | | | | of ABAC/RBAC This also solves the async nature of the automatic creation of default service tokens for service accounts. It also makes explicit which service account token we always use. create cluster role binding only if the provider has legacy_abac disabled.
* Drive creation of a rbac platform_kubernetes off provider#legacy_abac so ↵Thong Kuah2018-09-141-5/+5
| | | | that there is one single source of truth.
* ABAC: fetch default service account token; RBAC: fetch gitlab service acount ↵Thong Kuah2018-09-142-4/+7
| | | | | | token Keeps existing behaviour for ABAC cluster
* Create a GKE cluster with legacy_abac disabled when the `:rbac_clusters` ↵Thong Kuah2018-09-142-1/+6
| | | | | | feature flag is enabled Explicitly persist the legacy_abac value of the cluster_provider_gcp so that we can disable abac if the `:rbac_clusters` feature flag is enabled
* Teach GoogleApi::CloudPlatform::Client#projects_zones_clusters_create about ↵Thong Kuah2018-09-141-1/+3
| | | | | | | | | legacy_abac argument Fix spec warning: removing `initialize' may cause serious problems Actually verify that `service.create_cluster` is called with expected request_body and other args
* Only create new service account with cluster-admin clusterrolebinding for ↵Thong Kuah2018-09-141-2/+8
| | | | | | when we have the rbac cluster FF enabled. This syncs up with `authorization_type`.
* Set RBAC support behind a feature flag.Thong Kuah2018-09-141-2/+1
| | | | This is the same as with adding an existing cluster
* Refactor to DRY out building of kube_client into originator serviceThong Kuah2018-09-143-82/+42
|
* When provisioning a new cluster, create gitlab service account so that ↵Thong Kuah2018-09-144-1/+99
| | | | | | | GitLab can perform operations in a RBAC-enabled cluster. Correspondingly, use the token of the gitlab service account, vs the default service account token which will have no privs.
* Move FetchKubernetesTokenService to under the Clusters::Gcp::Kubernetes ↵Thong Kuah2018-09-142-1/+75
| | | | | | | namespace This is in preparation to share some common code with another service which will also need a kubeclient utilizing master username and password
* Merge branch 'timeouted' into 'master'Grzegorz Bizon2018-08-011-1/+1
|\ | | | | | | | | correct error message on helm tiller installation timeout See merge request gitlab-org/gitlab-ce!20683
| * correct error messageDiana Stanley2018-07-171-1/+1
| |
* | Backports relevant changes made in ↵Tiago Botelho2018-07-251-3/+3
|/ | | | https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5163 to CE
* Enable frozen string in apps/services/**/*.rbrepo-forks/gitlab-ce-frozen-string-enable-apps-services-innergfyoung2018-07-1611-0/+22
| | | | | | For directories application_settings --> labels. Partially addresses #47424.
* Add support for Jupyter in GitLab via KubernetesDmitriy Zaporozhets2018-05-251-2/+2
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Refactor code around scheduling cluster installationsdz-refactor-cluster-apps-scheduleDmitriy Zaporozhets2018-05-241-14/+3
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Resolve "Make a Rubocop that forbids returning from a block"🙈 jacopo beschi 🙉2018-04-181-1/+1
|
* Replace 'GKE' with 'Google Kubernetes Engine'Taurie Davis2018-04-171-1/+1
|
* Replace KubeException with Kubeclient::HttpError (kubeclient 3.0)Pirate Praveen2018-03-152-2/+2
|
* Increase lease timeout for CheckIngressIpAddressService to reduce polling ↵Dylan Griffith2018-02-251-1/+1
| | | | frequency (#42643)
* Merge branch 'master' into 42643-persist-external-ip-of-ingress-controller-gkeDylan Griffith2018-02-231-2/+2
|\
| * Modify cluster creation API method to enable legacy_apac as defaultMayra Cabrera2018-02-221-2/+2
| | | | | | | | | | | | | | | | | | | | GKE 1.8 has RBAC on by default, since GKE has bumped the default version to 1.8.7 RBAC is now on, and we don't support that out of the box. This was also avoiding cluster applications (tiller, prometheus, etc), to be installed. Closes #41619
* | Simplify retrying for ClusterWaitForIngressIpAddressWorker and style changesDylan Griffith2018-02-231-16/+11
| | | | | | | | (#42643)
* | Refactor ingress IP address waiting code (#42643)Dylan Griffith2018-02-202-15/+9
| |
* | Ensure CheckIngressIpAddressService obtains exclusive lease per ingress ↵Dylan Griffith2018-02-151-0/+9
| | | | | | | | controller (#42643)
* | Persist external IP of ingress controller created for GKE (#42643)Dylan Griffith2018-02-152-0/+38
|/
* Replace "cluster" with "Kubernetes cluster"winh-kubernetes-clustersWinnie Hellmann2018-02-062-2/+2
|
* Extend Cluster Applications to allow installation of PrometheusMayra Cabrera2017-12-221-1/+1
|
* Replace Exception with ArgumentErrorMatija Čupić2017-12-051-1/+1
|
* Remove redundant return in Clusters::CreateServiceMatija Čupić2017-12-051-1/+1
|
* Merge branch '35616-move-k8-to-cluster-page' into ↵Kamil Trzcinski2017-12-051-1/+1
|\ | | | | | | cluster-page-with-list-clusters
| * Optimize Clusters::CreateService#executeShinya Maeda2017-12-041-1/+1
| |
* | Raise error when trying to create second clusterMatija Čupić2017-12-031-1/+1
| |
* | Simplify Clusters::CreateService cluster checkMatija Čupić2017-11-241-5/+1
| |
* | Limit projects to just one clusterMatija Čupić2017-11-181-0/+10
|/
* Add Helm InstallCommandAlessio Caiazza2017-11-073-4/+8
|
* Remove Clusters::Applications::FinalizeInstallationServiceAlessio Caiazza2017-11-072-18/+23
|
* Add Clusters::Applications services testsAlessio Caiazza2017-11-064-31/+10
|
* Add Clusters::Appplications::CheckInstallationProgressService testsAlessio Caiazza2017-11-061-2/+2
|
* Fix typosAlessio Caiazza2017-11-031-1/+1
|
* Schedule k8s application installation with a serviceAlessio Caiazza2017-11-031-0/+27
|
* Merge branch 'refactor-clusters' into 38464-k8s-appsAlessio Caiazza2017-11-032-10/+5
|\
| * Fix out of sync with KubernetesService. Remove namespace pramas from ↵Shinya Maeda2017-11-022-10/+5
| | | | | | | | controller. Use time_with_zone in schema. Remove Gcp::Clusters from safe_model_attributes.ym