diff options
author | James Fargher <proglottis@gmail.com> | 2019-04-10 05:13:43 +0300 |
---|---|---|
committer | James Fargher <proglottis@gmail.com> | 2019-05-06 23:37:03 +0300 |
commit | 733da6d6a015e8c951dcc02250cfe1fab87789c0 (patch) | |
tree | 6be40311a4753767d7219f2cff21c4eccbe18a5f /app/controllers/admin/clusters_controller.rb | |
parent | 863f2bcfb6ef7c6d3ce5726fa1a602e12f05ef57 (diff) |
Instance level kubernetes clusters admin
Instance level clusters were already mostly supported, this change adds
admin area controllers for cluster CRUD
Diffstat (limited to 'app/controllers/admin/clusters_controller.rb')
-rw-r--r-- | app/controllers/admin/clusters_controller.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/controllers/admin/clusters_controller.rb b/app/controllers/admin/clusters_controller.rb new file mode 100644 index 00000000000..777bdf5c981 --- /dev/null +++ b/app/controllers/admin/clusters_controller.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class Admin::ClustersController < Clusters::ClustersController + prepend_before_action :check_instance_clusters_feature_flag! + + layout 'admin' + + private + + def clusterable + @clusterable ||= InstanceClusterablePresenter.fabricate(Clusters::Instance.new, current_user: current_user) + end + + def check_instance_clusters_feature_flag! + render_404 unless Feature.enabled?(:instance_clusters, default_enabled: true) + end +end |