summaryrefslogtreecommitdiff
path: root/app/services/clusters
Commit message (Collapse)AuthorAgeFilesLines
* Bring method back that was mistakenly removedJoão Cunha2019-09-042-1/+9
| | | | - We're also improving specs to avoid this could happen again
* Merge branch '46686-move-k8s-services-out-of-gcp-namespace' into 'master'66783-usage-ping-for-slack-integrationsThong Kuah2019-09-019-250/+242
|\ | | | | | | | | Move generic k8s services out of GCP namespace See merge request gitlab-org/gitlab-ce!32310
| * Move generic k8s services out of GCP namespace46686-move-k8s-services-out-of-gcp-namespaceTiger2019-08-289-250/+242
| | | | | | | | | | These services aren't specific to GCP, and will be used for AWS as part of https://gitlab.com/gitlab-org/gitlab-ce/issues/46686
* | Remove :kubernetes_namespace_per_environment feature flag66139-remove-kubernetes_namespace_per_environment-feature-flagTiger2019-08-301-1/+1
| | | | | | | | Feature flag has been defaulting to `true` since 12.2
* | DRY check progress servicesJoão Cunha2019-08-293-63/+55
|/ | | | Extract duplicated code from two similar classes into a parent one.
* Use separate Kubernetes namespaces per environmentTiger Watson2019-08-073-6/+41
| | | | | | | | | | | | Kubernetes deployments on new clusters will now have a separate namespace per project environment, instead of sharing a single namespace for the project. Behaviour of existing clusters is unchanged. All new functionality is controlled by the :kubernetes_namespace_per_environment feature flag, which is safe to enable/disable at any time.
* Remove unused Clusters::RefreshServiceTiger2019-07-291-40/+0
| | | | | | Also removes all logic from ClusterConfigureWorker and ClusterProjectConfigureWorker, which are also no longer used.
* Enable GitLabb runner to be uninstalled from clusterJoão Cunha2019-07-161-0/+1
| | | | | | - Set as uninstallable app - Update docs - Adjust specs
* Merge branch '55623-group-cluster-apis' into 'master'Grzegorz Bizon2019-07-121-7/+10
|\ | | | | | | | | | | | | Resolve "API support for group-level clusters" Closes #55623 See merge request gitlab-org/gitlab-ce!30213
| * Refactor: model errors for multi cluster validationDylan Griffith2019-07-111-7/+10
| | | | | | | | | | | | | | | | | | | | | | The current approach requires catching exceptions to handle these errors and callers are already handling model validations so it seems more appropriate. Also it seemed to convoluted to add this logic directly to the model since the model needs to check too many possible associations to determine whether or not there are more than one cluster since the model doesn't know what it's being created on. Additionally we only wanted to validate during create to avoid the risk of existing models becoming invalid by many different edge cases.
* | Give Knative serving permissions to service accountHordur Freyr Yngvason2019-07-112-1/+42
|/ | | | | | | | GitLab uses a kubernetes service account to perform deployments. For serverless deployments to work as expected with externally created clusters with their own knative installations (e.g. via Cloud Run), this account requires additional permissions in the serving.knative.dev API group.
* Merge branch '60617-enable-project-cluster-jit' into 'master'Thong Kuah2019-06-241-3/+0
|\ | | | | | | | | Enable JIT Kubernetes resource creation for project level clusters See merge request gitlab-org/gitlab-ce!29515
| * Enable project-level JIT resource creation60617-enable-project-cluster-jitTiger2019-06-181-3/+0
| | | | | | | | | | | | | | | | | | | | Previously this behaviour was only available to group and instance-level clusters, as some project clusters relied on Kubernetes credentials being passed through to the runner instead of having their resources managed by GitLab (which is not available when using JIT). These clusters have been migrated to unmanaged, so resources can be created on demand for the remaining managed clusters.
* | Retry fetching Kubernetes Secret tokenDylan Griffith2019-06-211-3/+16
|/ | | | | | | | Since Kubernetes is creating the Secret and token asynchronously it is necessary that we implement some delay or retrying logic to avoid a race condition where we fetch a Secret before the token is even set. There does not appear to be any way for us to force it to be set with any synchronous API call so retrying seems to be the only option.
* Setup Git client for JupyterAmit Rathi2019-06-051-1/+1
|
* Stop configuring group clusters on creation60379-remove-ci-preparing-state-feature-flagTiger2019-05-161-5/+1
| | | | | | | | | | | Immediate configuration is not ideal for group and instance level clusters as projects that may never be deployed would still have Kubernetes namespaces and service accounts created for them. As of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25586 we now create only the resources that are required for the project being deployed, at the time of deployment.
* Instance level kubernetes clusters adminJames Fargher2019-05-072-0/+4
| | | | | Instance level clusters were already mostly supported, this change adds admin area controllers for cluster CRUD
* Add gitlab-managed option to clusters formMayra Cabrera2019-05-031-2/+2
| | | | | | | | When this option is enabled, GitLab will create namespaces and service accounts as usual. When disabled, GitLab wont create any project specific kubernetes resources Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56557
* Remove unncessary `to_time` in cluster servicesDylan Griffith2019-04-292-2/+2
|
* Internationalize errors CheckUninstallProgressServiceDylan Griffith2019-04-291-4/+4
|
* Rename #timeouted -> #timed_outDylan Griffith2019-04-292-4/+4
|
* Use #public_send instead #method.callDylan Griffith2019-04-293-4/+4
| | | | | | | 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.
* CheckUninstallProgressService remove unnecessary beginDylan Griffith2019-04-291-3/+1
|
* DELETE clusters/:id/:application endpointThong Kuah2019-04-291-0/+23
| | | | Add endpoint to delete/uninstall a cluster application
* Destroy app on successful uninstallationThong Kuah2019-04-291-1/+3
| | | | | | | | Rescue and put into :uninstall_errored if something goes wrong while destroying, which can happen. I think it is safe to expose the full error message from the destroy error. Remove the :uninstalled state as no longer used.
* Services to uninstall cluster applicationThong Kuah2019-04-292-0/+91
| | | | + to monitor progress of uninstallation pod
* Merge branch ↵Kamil Trzciński2019-04-171-1/+5
|\ | | | | | | | | | | | | | | | | '60500-disable-jit-kubernetes-resource-creation-for-project-level-clusters' into 'master' Disable JIT Kubernetes resource creation for project level clusters Closes #60500 See merge request gitlab-org/gitlab-ce!27352
| * Disable JIT resource creation for project clusters60500-disable-jit-kubernetes-resource-creation-for-project-level-clustersTiger2019-04-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | JIT resource creation blocks deployments if a user is self-managing their cluster, as it will fail the build if unable to create a namespace and service account. Using a custom namespace and service account was previously supported for project level clusters, so we should preserve this functionality. https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/27352
* | Externalize several strings inMartin Wortschack2019-04-163-6/+6
|/ | | | | | - app/services - app/controllers - app/presenters
* Do not rescue errors from state transitionsThong Kuah2019-04-123-19/+36
| | | | | | | As this are un-expected errors which we should hear about from Sentry. Still rescue StandardError when operating a Helm action as we can get non Kubeclient errors such as SSL certificate or network errors
* Add more info logging to cluster appsDylan Griffith2019-04-104-0/+20
| | | | | Log events so that it's easy to see when different requests are starting.
* Do not send error name and message to SentryThong Kuah2019-04-041-3/+3
| | | | | It's duplication information as we already send the full error object to Sentry.
* Don't send error backtrace to SentryThong Kuah2019-04-041-3/+6
| | | | As it already has the full error sent to it
* Show backtrace when logging to kubernetes.logThong Kuah2019-04-041-1/+2
| | | | | | Just the error message and error class alone makes it hard to determine the full context of any errors, so we need to know where the error is occuring as well.
* Dry up and remove responsibilitiesJoão Cunha2019-04-013-42/+25
| | | | | | - 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
* Allow runners to be installed on group clustersTiger Watson2019-03-261-2/+2
| | | | | A runner installed on a cluster will now use the cluster's `cluster_type` as its `runner_type`.
* Add support for ingress hostnamesingress-hostnameswalkafwalka2019-03-071-4/+12
|
* Remove unecessary begin..end blockJoão Cunha2019-03-062-24/+20
|
* Rename ClusterUpdateAppWorker to ClusterPatchAppWorkerJoão Cunha2019-03-051-1/+1
| | | | - This is to avoid colision with EE ClusterUpdateAppWorker
* Creates Clusterss::ApplciationsController update endpointJoão Cunha2019-03-055-54/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Get rid of ScheduleInstallationServiceJoão Cunha2019-02-262-33/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Upgrade cluster applications, starting with runnerThong Kuah2019-02-073-7/+56
|
* Port generic upgrade functionality to CE55544-port-upgrade-commandThong Kuah2019-01-151-0/+4
| | | | | | | | | | | | Port from EE generic upgrade related functionality used to upgrade Helm applications Remove memoization which could be incorrect It looks like we are memoizing without regard to the method's argument so this could result in an incorrect upgrade_command Remove `const_get` indirection now we are no longer in EE
* Rename `ClusterPlatformConfigureWorker`George Tsiolis2018-12-211-1/+1
|
* Add externalized strings for clusters error messagesGeorge Tsiolis2018-12-171-3/+3
|
* Minor refactor to GCP service classesMayra Cabrera2018-12-102-8/+23
| | | | | - Split logger call for readibility - Reduce code duplication by adding new method
* Add more structured JSON logging to Kubernetes classesDylan Griffith2018-12-102-0/+14
|
* Extract Clusters::BuildServiceDylan Griffith2018-12-101-0/+21
|
* Merge branch 'cert-manager-email' into 'master'Dmitriy Zaporozhets2018-12-071-1/+1
|\ | | | | | | | | Ability to override Issuer Email for Cert Manager See merge request gitlab-org/gitlab-ce!23503
| * Allows user to override default issuer email for cert managerAmit Rathi2018-12-071-1/+1
| |