Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1119_uffizzi_platform] Add controller settings #453

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ def template_memory_module
module_class(:template_memory_module)
end

def controller_settings_service
return unless module_exists?(:controller_settings)

module_class(:controller_settings)
end

private

def module_exists?(module_name)
Expand Down
2 changes: 1 addition & 1 deletion core/app/services/uffizzi_core/controller_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def controller_client(deployable)
when UffizziCore::Deployment
Settings.controller
when UffizziCore::Cluster
Settings.vcluster_controller
controller_settings_service.vcluster(deployable)
else
raise StandardError, "Deployable #{deployable.class.name} undefined"
end
Expand Down
9 changes: 9 additions & 0 deletions core/app/services/uffizzi_core/controller_settings_service.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

class UffizziCore::ControllerSettingsService
class << self
def vcluster(_cluster)
Settings.vcluster_controller
end
end
end
1 change: 1 addition & 0 deletions core/lib/uffizzi_core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module UffizziCore
rbac: 'UffizziCore::Rbac::UserAccessService',
deployment_memory_module: 'UffizziCore::Deployment::MemoryService',
template_memory_module: 'UffizziCore::Template::MemoryService',
controller_settings: 'UffizziCore::ControllerSettingsService',
}
mattr_accessor :table_names, default: {
accounts: :uffizzi_core_accounts,
Expand Down
Loading