diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 13:37:47 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 13:37:47 +0000 |
commit | aee0a117a889461ce8ced6fcf73207fe017f1d99 (patch) | |
tree | 891d9ef189227a8445d83f35c1b0fc99573f4380 /app/models/clusters/applications | |
parent | 8d46af3258650d305f53b819eabf7ab18d22f59e (diff) | |
download | gitlab-ce-aee0a117a889461ce8ced6fcf73207fe017f1d99.tar.gz |
Add latest changes from gitlab-org/gitlab@14-6-stable-eev14.6.0-rc42
Diffstat (limited to 'app/models/clusters/applications')
-rw-r--r-- | app/models/clusters/applications/runner.rb | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/app/models/clusters/applications/runner.rb b/app/models/clusters/applications/runner.rb index 59a9251d6b7..b57a24dead0 100644 --- a/app/models/clusters/applications/runner.rb +++ b/app/models/clusters/applications/runner.rb @@ -3,7 +3,7 @@ module Clusters module Applications class Runner < ApplicationRecord - VERSION = '0.34.0' + VERSION = '0.35.0' self.table_name = 'clusters_applications_runners' @@ -50,34 +50,6 @@ module Clusters private - def ensure_runner - runner || create_and_assign_runner - end - - def create_and_assign_runner - transaction do - Ci::Runner.create!(runner_create_params).tap do |runner| - update!(runner_id: runner.id) - end - end - end - - def runner_create_params - attributes = { - name: 'kubernetes-cluster', - runner_type: cluster.cluster_type, - tag_list: %w[kubernetes cluster] - } - - if cluster.group_type? - attributes[:runner_namespaces] = [::Ci::RunnerNamespace.new(namespace: group)] - elsif cluster.project_type? - attributes[:runner_projects] = [::Ci::RunnerProject.new(project: project)] - end - - attributes - end - def gitlab_url Gitlab::Routing.url_helpers.root_url(only_path: false) end @@ -85,7 +57,6 @@ module Clusters def specification { "gitlabUrl" => gitlab_url, - "runnerToken" => ensure_runner.token, "runners" => { "privileged" => privileged } } end |