Commit Graph

18 Commits

Author SHA1 Message Date
GitLab Bot 5c2377d195 Add latest changes from gitlab-org/gitlab@master 2020-09-29 18:09:52 +00:00
GitLab Bot c52b72f577 Add latest changes from gitlab-org/gitlab@master 2020-07-08 12:09:33 +00:00
GitLab Bot fa7ac2663b Add latest changes from gitlab-org/gitlab@master 2020-06-24 06:09:01 +00:00
GitLab Bot 874ead9c3a Add latest changes from gitlab-org/gitlab@master 2020-04-14 15:09:44 +00:00
GitLab Bot d7a028e20d Add latest changes from gitlab-org/gitlab@master 2020-03-31 15:07:53 +00:00
GitLab Bot c77fda905a Add latest changes from gitlab-org/gitlab@master 2020-02-27 21:09:17 +00:00
GitLab Bot 784fae4b9d Add latest changes from gitlab-org/gitlab@master 2019-12-12 12:07:33 +00:00
GitLab Bot 33813f993b Add latest changes from gitlab-org/gitlab@master 2019-10-24 12:06:03 +00:00
Tiger Watson 36a01a88ce Use separate Kubernetes namespaces per environment
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.
2019-08-07 04:40:29 +00:00
Dylan Griffith dacd0ee18b Refactor: model errors for multi cluster validation
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.
2019-07-11 17:22:58 +10:00
Dylan Griffith 29bd0775ff Tidy spec for API::ProjectClusters 2019-07-02 14:17:01 +10:00
Tiger 101c4480b3 Remove legacy Kubernetes #actual_namespace
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).
2019-05-21 11:38:11 -05:00
Mayra Cabrera 89132bbdd6 Add gitlab-managed option to clusters form
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
2019-05-03 01:05:53 +00:00
Thong Kuah 4ec16912b8 Autocorrect with RSpec/ExampleWording cop
- rewords examples starting with 'should'
- rewords examples starting with 'it'

Note: I had to manually fixup "onlies" to "only"
2019-04-05 08:43:27 +00:00
Mayra Cabrera b5e09a26de Include cluster domain into Project Cluster API
Domain was introduced on 11.8 and was not included on the
Project Cluster API. With this change user will be able to include
domain when adding and updating a cluster. Domain will also be included
on the GET calls.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59441
2019-04-01 16:29:05 +00:00
Tiger 759dab5b69 Add feature flag for build preparing state
The flag is on by default, but allows us to revert back
to the old behaviour if we encounter any problems.
2019-03-20 12:04:46 +11:00
Mayra Cabrera 8b2fe985dd Restrict multiple clusters through API
Modifies authorize! method to accept a third param, and then use it in
combination with 'add_cluster' policy to appropriately restrict adding
multiple clusters

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56110
2019-01-10 18:20:04 -06:00
Mayra Cabrera 013d262266 Include CRUD endpoints for Cluster API
Adds the following initial CRUD endpoints for Clusters API:

- GET list of clusters
- GET specific cluster
- POST add existing cluster (mimic of "Add cluster")
- PUT update cluser
- DELETE destroy cluster

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/40473
2019-01-04 15:12:44 -06:00