| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
- We're also improving specs to avoid this could happen again
|
| |\
| |
| |
| |
| | |
Move generic k8s services out of GCP namespace
See merge request gitlab-org/gitlab-ce!32310
|
| | |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| | |
Feature flag has been defaulting to `true` since 12.2
|
| |/
|
|
| |
Extract duplicated code from two similar classes into a parent one.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Also removes all logic from ClusterConfigureWorker
and ClusterProjectConfigureWorker, which are also
no longer used.
|
| |
|
|
|
|
| |
- Set as uninstallable app
- Update docs
- Adjust specs
|
| |\
| |
| |
| |
| |
| |
| | |
Resolve "API support for group-level clusters"
Closes #55623
See merge request gitlab-org/gitlab-ce!30213
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |/
|
|
|
|
|
|
| |
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.
|
| |\
| |
| |
| |
| | |
Enable JIT Kubernetes resource creation for project level clusters
See merge request gitlab-org/gitlab-ce!29515
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |/
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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 clusters were already mostly supported, this change adds
admin area controllers for cluster CRUD
|
| |
|
|
|
|
|
|
| |
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
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
Add endpoint to delete/uninstall a cluster application
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
+ to monitor progress of uninstallation pod
|
| |\
| |
| |
| |
| |
| |
| |
| |
| | |
'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
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |/
|
|
|
|
| |
- app/services
- app/controllers
- app/presenters
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Log events so that it's easy to see
when different requests are starting.
|
| |
|
|
|
| |
It's duplication information as we already send the full error object to
Sentry.
|
| |
|
|
| |
As it already has the full error sent to it
|
| |
|
|
|
|
| |
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 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
|
| |
|
|
|
| |
A runner installed on a cluster will now use the
cluster's `cluster_type` as its `runner_type`.
|
| | |
|
| | |
|
| |
|
|
| |
- This is to avoid colision with EE ClusterUpdateAppWorker
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| | |
|
| |
|
|
|
| |
- Split logger call for readibility
- Reduce code duplication by adding new method
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
Ability to override Issuer Email for Cert Manager
See merge request gitlab-org/gitlab-ce!23503
|
| | | |
|