Commit 4e8b00f1 authored by Hordur Freyr Yngvason's avatar Hordur Freyr Yngvason Committed by Heinrich Lee Yu

Move local Tiller FF check to cluster level

So that we can scope the feature flag to the entity that owns the
cluster (project, group or instance).
parent 9af9ec98
...@@ -7,7 +7,7 @@ class Clusters::BaseController < ApplicationController ...@@ -7,7 +7,7 @@ class Clusters::BaseController < ApplicationController
before_action :authorize_read_cluster! before_action :authorize_read_cluster!
before_action do before_action do
push_frontend_feature_flag(:managed_apps_local_tiller) push_frontend_feature_flag(:managed_apps_local_tiller, clusterable)
end end
helper_method :clusterable helper_method :clusterable
......
...@@ -38,7 +38,8 @@ module Clusters ...@@ -38,7 +38,8 @@ module Clusters
chart: chart, chart: chart,
files: files.merge(cluster_issuer_file), files: files.merge(cluster_issuer_file),
preinstall: pre_install_script, preinstall: pre_install_script,
postinstall: post_install_script postinstall: post_install_script,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
...@@ -47,7 +48,8 @@ module Clusters ...@@ -47,7 +48,8 @@ module Clusters
name: 'certmanager', name: 'certmanager',
rbac: cluster.platform_kubernetes_rbac?, rbac: cluster.platform_kubernetes_rbac?,
files: files, files: files,
postdelete: post_delete_script postdelete: post_delete_script,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
......
...@@ -35,7 +35,8 @@ module Clusters ...@@ -35,7 +35,8 @@ module Clusters
version: VERSION, version: VERSION,
rbac: cluster.platform_kubernetes_rbac?, rbac: cluster.platform_kubernetes_rbac?,
chart: chart, chart: chart,
files: files files: files,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
......
...@@ -34,7 +34,8 @@ module Clusters ...@@ -34,7 +34,8 @@ module Clusters
repository: repository, repository: repository,
files: files, files: files,
preinstall: migrate_to_3_script, preinstall: migrate_to_3_script,
postinstall: post_install_script postinstall: post_install_script,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
...@@ -43,7 +44,8 @@ module Clusters ...@@ -43,7 +44,8 @@ module Clusters
name: 'elastic-stack', name: 'elastic-stack',
rbac: cluster.platform_kubernetes_rbac?, rbac: cluster.platform_kubernetes_rbac?,
files: files, files: files,
postdelete: post_delete_script postdelete: post_delete_script,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
...@@ -118,7 +120,8 @@ module Clusters ...@@ -118,7 +120,8 @@ module Clusters
Gitlab::Kubernetes::Helm::DeleteCommand.new( Gitlab::Kubernetes::Helm::DeleteCommand.new(
name: 'elastic-stack', name: 'elastic-stack',
rbac: cluster.platform_kubernetes_rbac?, rbac: cluster.platform_kubernetes_rbac?,
files: files files: files,
local_tiller_enabled: cluster.local_tiller_enabled?
).delete_command, ).delete_command,
Gitlab::Kubernetes::KubectlCmd.delete("pvc", "--selector", "release=elastic-stack", "--namespace", Gitlab::Kubernetes::Helm::NAMESPACE) Gitlab::Kubernetes::KubectlCmd.delete("pvc", "--selector", "release=elastic-stack", "--namespace", Gitlab::Kubernetes::Helm::NAMESPACE)
] ]
......
...@@ -32,7 +32,8 @@ module Clusters ...@@ -32,7 +32,8 @@ module Clusters
version: VERSION, version: VERSION,
rbac: cluster.platform_kubernetes_rbac?, rbac: cluster.platform_kubernetes_rbac?,
chart: chart, chart: chart,
files: files files: files,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
......
...@@ -52,7 +52,8 @@ module Clusters ...@@ -52,7 +52,8 @@ module Clusters
Gitlab::Kubernetes::Helm::InitCommand.new( Gitlab::Kubernetes::Helm::InitCommand.new(
name: name, name: name,
files: files, files: files,
rbac: cluster.platform_kubernetes_rbac? rbac: cluster.platform_kubernetes_rbac?,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
...@@ -60,7 +61,8 @@ module Clusters ...@@ -60,7 +61,8 @@ module Clusters
Gitlab::Kubernetes::Helm::ResetCommand.new( Gitlab::Kubernetes::Helm::ResetCommand.new(
name: name, name: name,
files: files, files: files,
rbac: cluster.platform_kubernetes_rbac? rbac: cluster.platform_kubernetes_rbac?,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
......
...@@ -63,7 +63,8 @@ module Clusters ...@@ -63,7 +63,8 @@ module Clusters
version: VERSION, version: VERSION,
rbac: cluster.platform_kubernetes_rbac?, rbac: cluster.platform_kubernetes_rbac?,
chart: chart, chart: chart,
files: files files: files,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
......
...@@ -45,7 +45,8 @@ module Clusters ...@@ -45,7 +45,8 @@ module Clusters
rbac: cluster.platform_kubernetes_rbac?, rbac: cluster.platform_kubernetes_rbac?,
chart: chart, chart: chart,
files: files, files: files,
repository: repository repository: repository,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
......
...@@ -77,7 +77,8 @@ module Clusters ...@@ -77,7 +77,8 @@ module Clusters
chart: chart, chart: chart,
files: files, files: files,
repository: REPOSITORY, repository: REPOSITORY,
postinstall: install_knative_metrics postinstall: install_knative_metrics,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
...@@ -99,7 +100,8 @@ module Clusters ...@@ -99,7 +100,8 @@ module Clusters
rbac: cluster.platform_kubernetes_rbac?, rbac: cluster.platform_kubernetes_rbac?,
files: files, files: files,
predelete: delete_knative_services_and_metrics, predelete: delete_knative_services_and_metrics,
postdelete: delete_knative_istio_leftovers postdelete: delete_knative_istio_leftovers,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
......
...@@ -66,7 +66,8 @@ module Clusters ...@@ -66,7 +66,8 @@ module Clusters
rbac: cluster.platform_kubernetes_rbac?, rbac: cluster.platform_kubernetes_rbac?,
chart: chart, chart: chart,
files: files, files: files,
postinstall: install_knative_metrics postinstall: install_knative_metrics,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
...@@ -76,7 +77,8 @@ module Clusters ...@@ -76,7 +77,8 @@ module Clusters
version: version, version: version,
rbac: cluster.platform_kubernetes_rbac?, rbac: cluster.platform_kubernetes_rbac?,
chart: chart, chart: chart,
files: files_with_replaced_values(values) files: files_with_replaced_values(values),
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
...@@ -85,7 +87,8 @@ module Clusters ...@@ -85,7 +87,8 @@ module Clusters
name: name, name: name,
rbac: cluster.platform_kubernetes_rbac?, rbac: cluster.platform_kubernetes_rbac?,
files: files, files: files,
predelete: delete_knative_istio_metrics predelete: delete_knative_istio_metrics,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
......
...@@ -36,7 +36,8 @@ module Clusters ...@@ -36,7 +36,8 @@ module Clusters
rbac: cluster.platform_kubernetes_rbac?, rbac: cluster.platform_kubernetes_rbac?,
chart: chart, chart: chart,
files: files, files: files,
repository: repository repository: repository,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
......
...@@ -326,6 +326,10 @@ module Clusters ...@@ -326,6 +326,10 @@ module Clusters
end end
end end
def local_tiller_enabled?
Feature.enabled?(:managed_apps_local_tiller, clusterable, default_enabled: false)
end
private private
def unique_management_project_environment_scope def unique_management_project_environment_scope
......
...@@ -15,7 +15,7 @@ module Clusters ...@@ -15,7 +15,7 @@ module Clusters
def set_initial_status def set_initial_status
return unless not_installable? return unless not_installable?
self.status = status_states[:installable] if cluster&.application_helm_available? || ::Gitlab::Kubernetes::Helm.local_tiller_enabled? self.status = status_states[:installable] if cluster&.application_helm_available? || cluster&.local_tiller_enabled?
end end
def can_uninstall? def can_uninstall?
......
...@@ -7,7 +7,8 @@ module Clusters ...@@ -7,7 +7,8 @@ module Clusters
Gitlab::Kubernetes::Helm::DeleteCommand.new( Gitlab::Kubernetes::Helm::DeleteCommand.new(
name: name, name: name,
rbac: cluster.platform_kubernetes_rbac?, rbac: cluster.platform_kubernetes_rbac?,
files: files files: files,
local_tiller_enabled: cluster.local_tiller_enabled?
) )
end end
...@@ -32,7 +33,7 @@ module Clusters ...@@ -32,7 +33,7 @@ module Clusters
private private
def use_tiller_ssl? def use_tiller_ssl?
return false if ::Gitlab::Kubernetes::Helm.local_tiller_enabled? return false if cluster.local_tiller_enabled?
cluster.application_helm.has_ssl? cluster.application_helm.has_ssl?
end end
......
...@@ -98,7 +98,7 @@ module Clusters ...@@ -98,7 +98,7 @@ module Clusters
end end
before_transition any => [:installed, :updated] do |application, transition| before_transition any => [:installed, :updated] do |application, transition|
unless ::Gitlab::Kubernetes::Helm.local_tiller_enabled? || application.is_a?(Clusters::Applications::Helm) unless application.cluster.local_tiller_enabled? || application.is_a?(Clusters::Applications::Helm)
if transition.event == :make_externally_installed if transition.event == :make_externally_installed
# If an application is externally installed # If an application is externally installed
# We assume the helm application is externally installed too # We assume the helm application is externally installed too
......
...@@ -10,12 +10,6 @@ module Gitlab ...@@ -10,12 +10,6 @@ module Gitlab
SERVICE_ACCOUNT = 'tiller' SERVICE_ACCOUNT = 'tiller'
CLUSTER_ROLE_BINDING = 'tiller-admin' CLUSTER_ROLE_BINDING = 'tiller-admin'
CLUSTER_ROLE = 'cluster-admin' CLUSTER_ROLE = 'cluster-admin'
MANAGED_APPS_LOCAL_TILLER_FEATURE_FLAG = :managed_apps_local_tiller
def self.local_tiller_enabled?
Feature.enabled?(MANAGED_APPS_LOCAL_TILLER_FEATURE_FLAG)
end
end end
end end
end end
...@@ -3,7 +3,24 @@ ...@@ -3,7 +3,24 @@
module Gitlab module Gitlab
module Kubernetes module Kubernetes
module Helm module Helm
module BaseCommand class BaseCommand
attr_reader :name, :files
def initialize(rbac:, name:, files:, local_tiller_enabled:)
@rbac = rbac
@name = name
@files = files
@local_tiller_enabled = local_tiller_enabled
end
def rbac?
@rbac
end
def local_tiller_enabled?
@local_tiller_enabled
end
def pod_resource def pod_resource
pod_service_account_name = rbac? ? service_account_name : nil pod_service_account_name = rbac? ? service_account_name : nil
...@@ -46,18 +63,6 @@ module Gitlab ...@@ -46,18 +63,6 @@ module Gitlab
files.keys files.keys
end end
def name
raise "Not implemented"
end
def rbac?
raise "Not implemented"
end
def files
raise "Not implemented"
end
private private
def files_dir def files_dir
......
...@@ -57,10 +57,6 @@ module Gitlab ...@@ -57,10 +57,6 @@ module Gitlab
'--tls-key', "#{files_dir}/key.pem" '--tls-key', "#{files_dir}/key.pem"
] ]
end end
def local_tiller_enabled?
::Gitlab::Kubernetes::Helm.local_tiller_enabled?
end
end end
end end
end end
......
...@@ -3,17 +3,13 @@ ...@@ -3,17 +3,13 @@
module Gitlab module Gitlab
module Kubernetes module Kubernetes
module Helm module Helm
class DeleteCommand class DeleteCommand < BaseCommand
include BaseCommand
include ClientCommand include ClientCommand
attr_reader :predelete, :postdelete attr_reader :predelete, :postdelete
attr_accessor :name, :files
def initialize(name:, rbac:, files:, predelete: nil, postdelete: nil) def initialize(predelete: nil, postdelete: nil, **args)
@name = name super(**args)
@files = files
@rbac = rbac
@predelete = predelete @predelete = predelete
@postdelete = postdelete @postdelete = postdelete
end end
...@@ -32,10 +28,6 @@ module Gitlab ...@@ -32,10 +28,6 @@ module Gitlab
"uninstall-#{name}" "uninstall-#{name}"
end end
def rbac?
@rbac
end
def delete_command def delete_command
command = ['helm', 'delete', '--purge', name] + tls_flags_if_remote_tiller command = ['helm', 'delete', '--purge', name] + tls_flags_if_remote_tiller
......
...@@ -3,27 +3,13 @@ ...@@ -3,27 +3,13 @@
module Gitlab module Gitlab
module Kubernetes module Kubernetes
module Helm module Helm
class InitCommand class InitCommand < BaseCommand
include BaseCommand
attr_reader :name, :files
def initialize(name:, files:, rbac:)
@name = name
@files = files
@rbac = rbac
end
def generate_script def generate_script
super + [ super + [
init_helm_command init_helm_command
].join("\n") ].join("\n")
end end
def rbac?
@rbac
end
private private
def init_helm_command def init_helm_command
......
...@@ -3,19 +3,16 @@ ...@@ -3,19 +3,16 @@
module Gitlab module Gitlab
module Kubernetes module Kubernetes
module Helm module Helm
class InstallCommand class InstallCommand < BaseCommand
include BaseCommand
include ClientCommand include ClientCommand
attr_reader :name, :files, :chart, :repository, :preinstall, :postinstall attr_reader :chart, :repository, :preinstall, :postinstall
attr_accessor :version attr_accessor :version
def initialize(name:, chart:, files:, rbac:, version: nil, repository: nil, preinstall: nil, postinstall: nil) def initialize(chart:, version: nil, repository: nil, preinstall: nil, postinstall: nil, **args)
@name = name super(**args)
@chart = chart @chart = chart
@version = version @version = version
@rbac = rbac
@files = files
@repository = repository @repository = repository
@preinstall = preinstall @preinstall = preinstall
@postinstall = postinstall @postinstall = postinstall
...@@ -33,10 +30,6 @@ module Gitlab ...@@ -33,10 +30,6 @@ module Gitlab
].compact.join("\n") ].compact.join("\n")
end end
def rbac?
@rbac
end
private private
# Uses `helm upgrade --install` which means we can use this for both # Uses `helm upgrade --install` which means we can use this for both
......
...@@ -5,23 +5,21 @@ ...@@ -5,23 +5,21 @@
module Gitlab module Gitlab
module Kubernetes module Kubernetes
module Helm module Helm
class PatchCommand class PatchCommand < BaseCommand
include BaseCommand
include ClientCommand include ClientCommand
attr_reader :name, :files, :chart, :repository attr_reader :chart, :repository
attr_accessor :version attr_accessor :version
def initialize(name:, chart:, files:, rbac:, version:, repository: nil) def initialize(chart:, version:, repository: nil, **args)
super(**args)
# version is mandatory to prevent chart mismatches # version is mandatory to prevent chart mismatches
# we do not want our values interpreted in the context of the wrong version # we do not want our values interpreted in the context of the wrong version
raise ArgumentError, 'version is required' if version.blank? raise ArgumentError, 'version is required' if version.blank?
@name = name
@chart = chart @chart = chart
@version = version @version = version
@rbac = rbac
@files = files
@repository = repository @repository = repository
end end
...@@ -35,10 +33,6 @@ module Gitlab ...@@ -35,10 +33,6 @@ module Gitlab
].compact.join("\n") ].compact.join("\n")
end end
def rbac?
@rbac
end
private private
def upgrade_command def upgrade_command
......
...@@ -3,18 +3,9 @@ ...@@ -3,18 +3,9 @@
module Gitlab module Gitlab
module Kubernetes module Kubernetes
module Helm module Helm
class ResetCommand class ResetCommand < BaseCommand
include BaseCommand
include ClientCommand include ClientCommand
attr_reader :name, :files
def initialize(name:, rbac:, files:)
@name = name
@files = files
@rbac = rbac
end
def generate_script def generate_script
super + [ super + [
reset_helm_command, reset_helm_command,
...@@ -23,10 +14,6 @@ module Gitlab ...@@ -23,10 +14,6 @@ module Gitlab
].join("\n") ].join("\n")
end end
def rbac?
@rbac
end
def pod_name def pod_name
"uninstall-#{name}" "uninstall-#{name}"
end end
......
...@@ -17,7 +17,8 @@ describe Gitlab::Kubernetes::Helm::API do ...@@ -17,7 +17,8 @@ describe Gitlab::Kubernetes::Helm::API do
name: application_name, name: application_name,
chart: 'chart-name', chart: 'chart-name',
rbac: rbac, rbac: rbac,
files: files files: files,
local_tiller_enabled: true
) )
end end
...@@ -142,7 +143,7 @@ describe Gitlab::Kubernetes::Helm::API do ...@@ -142,7 +143,7 @@ describe Gitlab::Kubernetes::Helm::API do
end end
context 'with a service account' do context 'with a service account' do
let(:command) { Gitlab::Kubernetes::Helm::InitCommand.new(name: application_name, files: files, rbac: rbac) } let(:command) { Gitlab::Kubernetes::Helm::InitCommand.new(name: application_name, files: files, rbac: rbac, local_tiller_enabled: true) }
context 'rbac-enabled cluster' do context 'rbac-enabled cluster' do
let(:rbac) { true } let(:rbac) { true }
......
...@@ -11,25 +11,14 @@ describe Gitlab::Kubernetes::Helm::BaseCommand do ...@@ -11,25 +11,14 @@ describe Gitlab::Kubernetes::Helm::BaseCommand do
let(:rbac) { false } let(:rbac) { false }
let(:test_class) do let(:test_class) do
Class.new do Class.new(Gitlab::Kubernetes::Helm::BaseCommand) do
include Gitlab::Kubernetes::Helm::BaseCommand
def initialize(rbac) def initialize(rbac)
@rbac = rbac super(
end name: 'test-class-name',
rbac: rbac,
def name files: { some: 'value' },
"test-class-name" local_tiller_enabled: false
end )
def rbac?
@rbac
end
def files
{
some: 'value'
}
end end
end end
end end
......
...@@ -3,11 +3,12 @@ ...@@ -3,11 +3,12 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::Kubernetes::Helm::DeleteCommand do describe Gitlab::Kubernetes::Helm::DeleteCommand do
subject(:delete_command) { described_class.new(name: app_name, rbac: rbac, files: files) } subject(:delete_command) { described_class.new(name: app_name, rbac: rbac, files: files, local_tiller_enabled: local_tiller_enabled) }
let(:app_name) { 'app-name' } let(:app_name) { 'app-name' }
let(:rbac) { true } let(:rbac) { true }
let(:files) { {} } let(:files) { {} }
let(:local_tiller_enabled) { true }
it_behaves_like 'helm command generator' do it_behaves_like 'helm command generator' do
let(:commands) do let(:commands) do
...@@ -21,9 +22,7 @@ describe Gitlab::Kubernetes::Helm::DeleteCommand do ...@@ -21,9 +22,7 @@ describe Gitlab::Kubernetes::Helm::DeleteCommand do
end end
context 'tillerless feature disabled' do context 'tillerless feature disabled' do
before do let(:local_tiller_enabled) { false }
stub_feature_flags(managed_apps_local_tiller: false)
end
it_behaves_like 'helm command generator' do it_behaves_like 'helm command generator' do
let(:commands) do let(:commands) do
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::Kubernetes::Helm::InitCommand do describe Gitlab::Kubernetes::Helm::InitCommand do
subject(:init_command) { described_class.new(name: application.name, files: files, rbac: rbac) } subject(:init_command) { described_class.new(name: application.name, files: files, rbac: rbac, local_tiller_enabled: false) }
let(:application) { create(:clusters_applications_helm) } let(:application) { create(:clusters_applications_helm) }
let(:rbac) { false } let(:rbac) { false }
......
...@@ -12,7 +12,8 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do ...@@ -12,7 +12,8 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
version: version, version: version,
repository: repository, repository: repository,
preinstall: preinstall, preinstall: preinstall,
postinstall: postinstall postinstall: postinstall,
local_tiller_enabled: local_tiller_enabled
) )
end end
...@@ -22,6 +23,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do ...@@ -22,6 +23,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
let(:version) { '1.2.3' } let(:version) { '1.2.3' }
let(:preinstall) { nil } let(:preinstall) { nil }
let(:postinstall) { nil } let(:postinstall) { nil }
let(:local_tiller_enabled) { true }
it_behaves_like 'helm command generator' do it_behaves_like 'helm command generator' do
let(:commands) do let(:commands) do
...@@ -51,9 +53,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do ...@@ -51,9 +53,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
end end
context 'tillerless feature disabled' do context 'tillerless feature disabled' do
before do let(:local_tiller_enabled) { false }
stub_feature_flags(managed_apps_local_tiller: false)
end
let(:tls_flags) do let(:tls_flags) do
<<~EOS.squish <<~EOS.squish
......
...@@ -7,6 +7,7 @@ describe Gitlab::Kubernetes::Helm::PatchCommand do ...@@ -7,6 +7,7 @@ describe Gitlab::Kubernetes::Helm::PatchCommand do
let(:repository) { 'https://repository.example.com' } let(:repository) { 'https://repository.example.com' }
let(:rbac) { false } let(:rbac) { false }
let(:version) { '1.2.3' } let(:version) { '1.2.3' }
let(:local_tiller_enabled) { true }
subject(:patch_command) do subject(:patch_command) do
described_class.new( described_class.new(
...@@ -15,14 +16,13 @@ describe Gitlab::Kubernetes::Helm::PatchCommand do ...@@ -15,14 +16,13 @@ describe Gitlab::Kubernetes::Helm::PatchCommand do
rbac: rbac, rbac: rbac,
files: files, files: files,
version: version, version: version,
repository: repository repository: repository,
local_tiller_enabled: local_tiller_enabled
) )
end end
context 'when local tiller feature is disabled' do context 'when local tiller feature is disabled' do
before do let(:local_tiller_enabled) { false }
stub_feature_flags(managed_apps_local_tiller: false)
end
let(:tls_flags) do let(:tls_flags) do
<<~EOS.squish <<~EOS.squish
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::Kubernetes::Helm::ResetCommand do describe Gitlab::Kubernetes::Helm::ResetCommand do
subject(:reset_command) { described_class.new(name: name, rbac: rbac, files: files) } subject(:reset_command) { described_class.new(name: name, rbac: rbac, files: files, local_tiller_enabled: false) }
let(:rbac) { true } let(:rbac) { true }
let(:name) { 'helm' } let(:name) { 'helm' }
......
...@@ -54,7 +54,7 @@ RSpec.shared_examples 'cluster application helm specs' do |application_name| ...@@ -54,7 +54,7 @@ RSpec.shared_examples 'cluster application helm specs' do |application_name|
context 'managed_apps_local_tiller feature flag is enabled' do context 'managed_apps_local_tiller feature flag is enabled' do
before do before do
stub_feature_flags(managed_apps_local_tiller: true) stub_feature_flags(managed_apps_local_tiller: application.cluster.clusterable)
end end
it 'does not include cert files' do it 'does not include cert files' do
......
...@@ -18,7 +18,7 @@ RSpec.shared_examples 'cluster application initial status specs' do ...@@ -18,7 +18,7 @@ RSpec.shared_examples 'cluster application initial status specs' do
context 'local tiller feature flag is enabled' do context 'local tiller feature flag is enabled' do
before do before do
stub_feature_flags(managed_apps_local_tiller: true) stub_feature_flags(managed_apps_local_tiller: cluster.clusterable)
end end
it 'sets a default status' do it 'sets a default status' do
......
...@@ -66,7 +66,7 @@ RSpec.shared_examples 'cluster application status specs' do |application_name| ...@@ -66,7 +66,7 @@ RSpec.shared_examples 'cluster application status specs' do |application_name|
context 'managed_apps_local_tiller feature flag enabled' do context 'managed_apps_local_tiller feature flag enabled' do
before do before do
stub_feature_flags(managed_apps_local_tiller: true) stub_feature_flags(managed_apps_local_tiller: subject.cluster.clusterable)
end end
it 'does not update the helm version' do it 'does not update the helm version' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment