summaryrefslogtreecommitdiff
path: root/spec/models/clusters
Commit message (Collapse)AuthorAgeFilesLines
* Remove code related to object hierarchy in MySQLremove-nested-groups-checksHeinrich Lee Yu2019-07-251-1/+1
| | | | | These are not required because MySQL is not supported anymore
* Enable GitLabb runner to be uninstalled from clusterJoão Cunha2019-07-161-1/+32
| | | | | | - Set as uninstallable app - Update docs - Adjust specs
* Create CTE query for clusters hierarchyThong Kuah2019-07-081-0/+73
| | | | | | | | | | | | - 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.
* Enables ingress for uninstallationJoão Cunha2019-07-021-1/+15
| | | | - JupyterHub must not be available (installed or updated)
* Allow JupyterHub to be uninstalledJoão Cunha2019-07-011-1/+1
| | | | | | - enabled uninstallation - give it a specific uninstall message - ajust specs
* Move terminal construction logic to Environment61156-instance-level-cluster-pod-terminal-accessTiger2019-06-251-28/+15
| | | | | | | | This enables terminals for group and project level clusters. Previously there was no way to determine which project (and therefore kubernetes namespace) to connect to, moving this logic onto Environment means the assoicated project can be used to look up the correct namespace.
* Merge branch '60617-enable-project-cluster-jit' into 'master'Thong Kuah2019-06-241-23/+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-23/+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.
* | Remove project-level cluster credential fallbackTiger Watson2019-06-211-29/+3
| | | | | | | | | | | | Project-level clusters that made use of this legacy behaviour have been migrated to unmanaged clusters, so we are now free to remove this fallback.
* | Knative version bump 0.5 -> 0.6Chris Baumbauer2019-06-191-1/+1
|/
* Merge branch ↵Thong Kuah2019-06-181-0/+40
|\ | | | | | | | | | | | | | | | | '60617-allow-switching-from-gitlab-managed-to-unmanaged-clusters' into 'master' Allow switching clusters between managed/unmanaged Closes #60617 See merge request gitlab-org/gitlab-ce!29322
| * Allow switching clusters between managed/unmanagedTiger2019-06-181-0/+40
| | | | | | | | | | | | Any resources created while the cluster was managed will be untouched, allowing users to set/unset this flag as they please.
* | Merge branch 'migrate_k8s_service_integration' into 'master'Thong Kuah2019-06-171-5/+29
|\ \ | |/ |/| | | | | Migrate Kubernetes service integration templates to clusters See merge request gitlab-org/gitlab-ce!28534
| * Allow a user defined namespace on non-gitlab managed clustersJames Fargher2019-05-301-5/+29
| | | | | | | | | | Since they are not GitLab managed we wont make assumptions about the namespaces used
* | Don't use Kubernetes namespaces with no token63079-exclude-k8s-namespaces-with-no-service-account-tokenTiger2019-06-172-1/+72
| | | | | | | | | | | | | | | | | | | | Whenever we are selecting a namespace to use for a deployment or to query a cluster we want to exclude Kubernetes namespace records that don't have a token set as they will not have the required permissions. However when configuring clusters, we want to use the original namespace record even if it has no token, as a namespace has to be unique on a cluster.
* | Setup Git client for JupyterAmit Rathi2019-06-051-0/+2
| |
* | Move file one folder level up to avoid namespace conflict58941-use-gitlab-serverless-with-existing-knative-installationJoão Cunha2019-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clusters::Cluster::KnativeServicesFinder becomes Clusters::KnativeServicesFinder This is to avoid loading race condition between: ``` module Clusters class Cluster < ApplicationRecord ``` and ``` module Clusters class Cluster ```
* | Adapt functions to work for external KnativeJoão Cunha2019-05-292-76/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove Kn services cache from Clusters::Application::Knative Knative function can exist even if user did not installed Knative via GitLab managed apps. -> Move responsibility of finding services into the Cluster -> Responsability is inside Clusters::Cluster::KnativeServiceFinder -> Projects::Serverless::FunctionsFinder now calls depends solely on a cluster to find the Kn services. -> Detect Knative by resource presence instead of service presence -> Mock knative_installed response temporarily for frontend to develop Display loader while `installed === 'checking'` Added frontend work to determine if Knative is installed Memoize with_reactive_cache(*args, &block) to avoid race conditions When calling with_reactive_cache more than once, it's possible that the second call will already have the value populated. Therefore, in cases where we need the sequential calls to have consistent results, we'd fall under a race condition. Check knative installation via Knative resource presence Only load pods if Knative is discovered Always return a response in FunctionsController#index - Always indicate if Knative is installed, not installed or checking - Always indicate the partial response for functions. Final response is guaranteed when knative_installed is either true | false. Adds specs for Clusters::Cluster#knative_services_finder Fix method name when calling on specs Add an explicit check for functions Added an explicit check to see if there are any functions available Fix Serverless feature spec - we don't find knative installation via database anymore, rather via Knative resource Display error message for request timeouts Display an error message if the request times out Adds feature specs for when functions exist Remove a test purposed hardcoded flag Add ability to partially load functions Added the ability to partially load functions on the frontend Add frontend unit tests Added tests for the new frontend additions Generate new translations Generated new frontend translations Address review comments Cleaned up the frontend unit test. Added computed prop for `isInstalled`. Move string to constant Simplify nil to array conversion Put knative_installed states in a frozen hash for better read Pluralize list of Knative states Quey services and pods filtering name This way we don't need to filter the namespace in memory. Also, the data we get from the network is much smaller. Simplify cache_key and fix bug - Simplifies the cache_key by removing namespace duplicate - Fixes a bug with reactive_cache memoization
* Add changelog entryJacques Erasmus2019-05-271-24/+139
| | | | Added a changelog entry for the feature
* Stop emitting AUTO_DEVOPS_DOMAIN Ci variableThong Kuah2019-05-241-53/+6
| | | | Update documentation to reflect removal
* Merge branch 'sh-bump-shoulda-matcher' into 'master'Jan Provaznik2019-05-221-0/+2
|\ | | | | | | | | Bump shoulda-matchers to 4.0.1 See merge request gitlab-org/gitlab-ce!28443
| * Ensure subject passes validationsStan Hu2019-05-211-0/+2
| | | | | | | | | | Rails 5 requires that belongs_to associations have the associated record present. These tests were failing because they had nil values.
* | Remove legacy Kubernetes #actual_namespace61935-remove-code-left-over-from-when-clusters-were-always-project-specificTiger2019-05-213-15/+16
|/ | | | | | | | | | | | | | | | | | When Kubernetes clusters were originally built they could only exist at the project level, and so there was logic included that assumed there would only ever be a single Kubernetes namespace per cluster. We now support clusters at the group and instance level, which allows multiple namespaces. This change consolidates various project-specific fallbacks to generate namespaces, and hands all responsibility to the Clusters::KubernetesNamespace model. There is now no concept of a single namespace for a Clusters::Platforms::Kubernetes; to retrieve a namespace a project must now be supplied in all cases. This simplifies upcoming work to use a separate Kubernetes namespace per project environment (instead of a namespace per project).
* Allow projects to use instance level clustersJames Fargher2019-05-071-0/+9
| | | | | | There are two cluster hierarchies one for the deployment platform and one for controllers. The main difference is that deployment platforms do not check user permissions and only return the first match.
* Instance level kubernetes clusters adminJames Fargher2019-05-071-3/+15
| | | | | 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-032-0/+30
| | | | | | | | 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
* Minor refactor of prometheus_specDylan Griffith2019-04-291-4/+2
|
* In Prometheus use update! instead of updateDylan Griffith2019-04-291-1/+1
| | | | | In order to not miss any errors since we are not checking the return value of update
* Deactivate any prometheus_service upon destroyThong Kuah2019-04-291-0/+17
| | | | Basically does the reverse of after_transition to :installed.
* Teach Prometheus about #uninstall_commandThong Kuah2019-04-291-0/+28
| | | | Add specs
* Expose can_uninstall in cluster_status.jsonThong Kuah2019-04-297-0/+51
| | | | | | | | Only prometheus can be uninstalled atm, the rest will be dealt with later. Presumption is that new application types will have uninstallation implmemented at the same time.
* Use constants for assertion for helm chart testSteve Azzopardi2019-04-241-2/+2
| | | | | | | We are duplicating the value from the constant `Clusters::Applications::Runner::VERSION` inside of the tests which results into developers having to update the tests as well when they want to upgrade the Helm chart used for GitLab Runner
* Update GitLab Runner Helm Chart to 0.4.0update-gitlab-runner-helm-chart-to-0-4-0Steve Azzopardi2019-04-191-2/+2
|
* Bump version of knative from 0.3 -> 0.5Chris Baumbauer2019-04-171-1/+1
|
* Autocorrect with RSpec/ExampleWording copThong Kuah2019-04-0510-44/+44
| | | | | | | - rewords examples starting with 'should' - rewords examples starting with 'it' Note: I had to manually fixup "onlies" to "only"
* Fix cert_manager_spec to not modify StringThong Kuah2019-04-011-3/+24
| | | | Also break up long string to be readable
* Add # frozen_string_literal to spec/modelsThong Kuah2019-04-0110-0/+20
| | | | Adds `# frozen_string_literal: true` to spec/models ruby files
* Renames Cluster#managed? to provided_by_user?Mayra Cabrera2019-03-292-1/+17
| | | | | | This will allow to user the term managed? on https://gitlab.com/gitlab-org/gitlab-ce/issues/56557. Managed? will be used to distinct clusters that are automatically managed by GitLab
* Knative version bump 0.2.2 -> 0.3.0Chris Baumbauer2019-03-281-1/+1
|
* Allow runners to be installed on group clustersTiger Watson2019-03-261-11/+32
| | | | | A runner installed on a cluster will now use the cluster's `cluster_type` as its `runner_type`.
* Update GitLab Runner Helm Chart to 0.3.0Tomasz Maczukin2019-03-221-2/+2
|
* Update dashboards to additionally use new environment selectorJames Fargher2019-03-211-3/+3
| | | | | Deploy boards now will check for app.gitlab.com/env and app.gitlab.com/app
* Add support for ingress hostnamesingress-hostnameswalkafwalka2019-03-074-0/+24
|
* Resolve "Mask the existing variables"Matija Čupić2019-03-072-6/+6
|
* Merge branch 'restrict-jupyter-login' of ↵Amit Rathi2019-03-071-2/+3
| | | | https://gitlab.com/amit1rrr/gitlab-ce into restrict-jupyter-login
* Merge branch '56937-edit-knative-domain' into 'master'Grzegorz Bizon2019-03-071-4/+22
|\ | | | | | | | | | | | | Edit Knative domain after it has been deployed Closes #56937 See merge request gitlab-org/gitlab-ce!25386
| * Creates Clusterss::ApplciationsController update endpointJoão Cunha2019-03-051-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | Merge branch 'security-kubernetes-local-ssrf' into 'master'Yorick Peterse2019-03-041-0/+16
|\ \ | |/ |/| | | | | Block local URLs for Kubernetes integration See merge request gitlab/gitlabhq!2901
| * Do not allow local urls in Kubernetes formThong Kuah2019-02-211-0/+16
| | | | | | | | | | | | | | | | | | | | | | Use existing `public_url` validation to block various local urls. Note that this validation will allow local urls if the "Allow requests to the local network from hooks and services" admin setting is enabled. Block KubeClient from using local addresses It will also respect `allow_local_requests_from_hooks_and_services` so if that is enabled KubeClinet will allow local addresses
* | Update GitLab Runner Helm Chart to 0.2.0Tomasz Maczukin2019-02-221-2/+2
| |