From 8152efbe2fc486520ec5cd11d54a49fbf7e554bf Mon Sep 17 00:00:00 2001 From: Thong Kuah Date: Fri, 28 Jun 2019 00:29:19 +1200 Subject: Remove instance_clusters feature_flag Now we have terminals for instance and group clusters we can remove the FF now. Deploying to instance clusters has been working without complaints too. --- app/models/clusters/instance.rb | 4 ---- app/models/concerns/deployment_platform.rb | 8 +------- app/policies/clusters/instance_policy.rb | 3 +-- 3 files changed, 2 insertions(+), 13 deletions(-) (limited to 'app') diff --git a/app/models/clusters/instance.rb b/app/models/clusters/instance.rb index d8a888d53ba..f21dbdf7f26 100644 --- a/app/models/clusters/instance.rb +++ b/app/models/clusters/instance.rb @@ -9,9 +9,5 @@ module Clusters def feature_available?(feature) ::Feature.enabled?(feature, default_enabled: true) end - - def self.enabled? - ::Feature.enabled?(:instance_clusters, default_enabled: true) - end end end diff --git a/app/models/concerns/deployment_platform.rb b/app/models/concerns/deployment_platform.rb index 0e9ddbe433b..5a358ae2ef6 100644 --- a/app/models/concerns/deployment_platform.rb +++ b/app/models/concerns/deployment_platform.rb @@ -14,7 +14,7 @@ module DeploymentPlatform def find_deployment_platform(environment) find_cluster_platform_kubernetes(environment: environment) || find_group_cluster_platform_kubernetes(environment: environment) || - find_instance_cluster_platform_kubernetes_with_feature_guard(environment: environment) + find_instance_cluster_platform_kubernetes(environment: environment) end # EE would override this and utilize environment argument @@ -29,12 +29,6 @@ module DeploymentPlatform .first&.platform_kubernetes end - def find_instance_cluster_platform_kubernetes_with_feature_guard(environment: nil) - return unless Clusters::Instance.enabled? - - find_instance_cluster_platform_kubernetes(environment: environment) - end - # EE would override this and utilize environment argument def find_instance_cluster_platform_kubernetes(environment: nil) Clusters::Instance.new.clusters.enabled.default_environment diff --git a/app/policies/clusters/instance_policy.rb b/app/policies/clusters/instance_policy.rb index e1045c85e6d..f72096e8fc6 100644 --- a/app/policies/clusters/instance_policy.rb +++ b/app/policies/clusters/instance_policy.rb @@ -6,9 +6,8 @@ module Clusters condition(:has_clusters, scope: :subject) { clusterable_has_clusters? } condition(:can_have_multiple_clusters) { multiple_clusters_available? } - condition(:instance_clusters_enabled) { Instance.enabled? } - rule { admin & instance_clusters_enabled }.policy do + rule { admin }.policy do enable :read_cluster enable :add_cluster enable :create_cluster -- cgit v1.2.1