diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /app/models/clusters | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) | |
download | gitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'app/models/clusters')
-rw-r--r-- | app/models/clusters/agent.rb | 1 | ||||
-rw-r--r-- | app/models/clusters/applications/fluentd.rb | 6 | ||||
-rw-r--r-- | app/models/clusters/applications/ingress.rb | 7 | ||||
-rw-r--r-- | app/models/clusters/applications/prometheus.rb | 8 | ||||
-rw-r--r-- | app/models/clusters/applications/runner.rb | 2 | ||||
-rw-r--r-- | app/models/clusters/platforms/kubernetes.rb | 3 |
6 files changed, 22 insertions, 5 deletions
diff --git a/app/models/clusters/agent.rb b/app/models/clusters/agent.rb index 874415e7bf4..5feb3b0a1e6 100644 --- a/app/models/clusters/agent.rb +++ b/app/models/clusters/agent.rb @@ -8,6 +8,7 @@ module Clusters has_many :agent_tokens, class_name: 'Clusters::AgentToken' + scope :ordered_by_name, -> { order(:name) } scope :with_name, -> (name) { where(name: name) } validates :name, diff --git a/app/models/clusters/applications/fluentd.rb b/app/models/clusters/applications/fluentd.rb index 3fd6e870edc..c608d37be77 100644 --- a/app/models/clusters/applications/fluentd.rb +++ b/app/models/clusters/applications/fluentd.rb @@ -22,7 +22,11 @@ module Clusters validate :has_at_least_one_log_enabled? def chart - 'stable/fluentd' + 'fluentd/fluentd' + end + + def repository + 'https://gitlab-org.gitlab.io/cluster-integration/helm-stable-archive' end def install_command diff --git a/app/models/clusters/applications/ingress.rb b/app/models/clusters/applications/ingress.rb index 1d08f38a2f1..d5412714858 100644 --- a/app/models/clusters/applications/ingress.rb +++ b/app/models/clusters/applications/ingress.rb @@ -46,7 +46,11 @@ module Clusters end def chart - 'stable/nginx-ingress' + "#{name}/nginx-ingress" + end + + def repository + 'https://gitlab-org.gitlab.io/cluster-integration/helm-stable-archive' end def values @@ -60,6 +64,7 @@ module Clusters def install_command Gitlab::Kubernetes::Helm::InstallCommand.new( name: name, + repository: repository, version: VERSION, rbac: cluster.platform_kubernetes_rbac?, chart: chart, diff --git a/app/models/clusters/applications/prometheus.rb b/app/models/clusters/applications/prometheus.rb index dd6a4144608..7679296699f 100644 --- a/app/models/clusters/applications/prometheus.rb +++ b/app/models/clusters/applications/prometheus.rb @@ -51,7 +51,11 @@ module Clusters end def chart - 'stable/prometheus' + "#{name}/prometheus" + end + + def repository + 'https://gitlab-org.gitlab.io/cluster-integration/helm-stable-archive' end def service_name @@ -65,6 +69,7 @@ module Clusters def install_command Gitlab::Kubernetes::Helm::InstallCommand.new( name: name, + repository: repository, version: VERSION, rbac: cluster.platform_kubernetes_rbac?, chart: chart, @@ -76,6 +81,7 @@ module Clusters def patch_command(values) ::Gitlab::Kubernetes::Helm::PatchCommand.new( name: name, + repository: repository, version: version, rbac: cluster.platform_kubernetes_rbac?, chart: chart, diff --git a/app/models/clusters/applications/runner.rb b/app/models/clusters/applications/runner.rb index f0b3c11ba1d..d07ea7b71dc 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.20.2' + VERSION = '0.21.1' self.table_name = 'clusters_applications_runners' diff --git a/app/models/clusters/platforms/kubernetes.rb b/app/models/clusters/platforms/kubernetes.rb index 7af78960e35..b85a902d58b 100644 --- a/app/models/clusters/platforms/kubernetes.rb +++ b/app/models/clusters/platforms/kubernetes.rb @@ -11,6 +11,7 @@ module Clusters RESERVED_NAMESPACES = %w(gitlab-managed-apps).freeze self.table_name = 'cluster_platforms_kubernetes' + self.reactive_cache_work_type = :external_dependency belongs_to :cluster, inverse_of: :platform_kubernetes, class_name: 'Clusters::Cluster' @@ -101,7 +102,7 @@ module Clusters def terminals(environment, data) pods = filter_by_project_environment(data[:pods], environment.project.full_path_slug, environment.slug) terminals = pods.flat_map { |pod| terminals_for_pod(api_url, environment.deployment_namespace, pod) }.compact - terminals.each { |terminal| add_terminal_auth(terminal, terminal_auth) } + terminals.each { |terminal| add_terminal_auth(terminal, **terminal_auth) } end def kubeclient |