uffizzi_core 2.4.2 → 2.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/lib/uffizzi_core/concerns/models/deployment.rb +1 -1
- data/app/serializers/uffizzi_core/api/cli/v1/account_serializer.rb +12 -1
- data/app/serializers/uffizzi_core/controller/create_cluster/cluster_serializer.rb +1 -1
- data/app/serializers/uffizzi_core/controller/update_cluster/cluster_serializer.rb +1 -1
- data/app/services/uffizzi_core/controller_service.rb +2 -2
- data/app/services/uffizzi_core/controller_settings_service.rb +6 -2
- data/lib/uffizzi_core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ddd0b04cdd1184aac854bda590b5974a82ab9e487372436d2d324fdf0891230
|
4
|
+
data.tar.gz: 227ea9de7c5e0a165a81794e35dca890d07975dedfa75eff818381c3647f4cf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 742f5a2aac4a9968eb63eca265d56402e5ed9b56b43a4a48541f67c6408aed38334b5753ea26136bef84a2dbba10d20d0ddcc6f8b86c8487831c66ac30f2760d
|
7
|
+
data.tar.gz: eead9c79725fca592f3d7ecdf4ae4df12a512722d36603200fc20bfb3b34ad46a81c9ace30ff68977195841d6d48ce678107fb61fd9bf5ca1271ad873c5ecd65
|
@@ -72,7 +72,7 @@ module UffizziCore::Concerns::Models::Deployment
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def preview_url
|
75
|
-
managed_dns_zone = controller_settings_service.
|
75
|
+
managed_dns_zone = controller_settings_service.deployment_settings_by_deployment(self).managed_dns_zone
|
76
76
|
"#{subdomain}.#{managed_dns_zone}"
|
77
77
|
end
|
78
78
|
|
@@ -1,9 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
class UffizziCore::Api::Cli::V1::AccountSerializer < UffizziCore::BaseSerializer
|
4
|
+
include UffizziCore::DependencyInjectionConcern
|
5
|
+
include_module_if_exists('UffizziCore::Api::Cli::V1::AccountSerializerModule')
|
6
|
+
|
4
7
|
type :account
|
5
8
|
|
6
9
|
has_many :projects
|
7
10
|
|
8
|
-
attributes :id, :name
|
11
|
+
attributes :id, :name, :api_url, :vclusters_controller_url
|
12
|
+
|
13
|
+
def api_url
|
14
|
+
Settings.domain
|
15
|
+
end
|
16
|
+
|
17
|
+
def vclusters_controller_url
|
18
|
+
controller_settings_service.vcluster_settings_by_account(object).url
|
19
|
+
end
|
9
20
|
end
|
@@ -7,7 +7,7 @@ class UffizziCore::Controller::CreateCluster::ClusterSerializer < UffizziCore::B
|
|
7
7
|
attributes :name, :manifest, :base_ingress_host, :distro, :image
|
8
8
|
|
9
9
|
def base_ingress_host
|
10
|
-
managed_dns_zone = controller_settings_service.
|
10
|
+
managed_dns_zone = controller_settings_service.vcluster_settings_by_vcluster(object).managed_dns_zone
|
11
11
|
|
12
12
|
[object.namespace, managed_dns_zone].join('.')
|
13
13
|
end
|
@@ -7,7 +7,7 @@ class UffizziCore::Controller::UpdateCluster::ClusterSerializer < UffizziCore::B
|
|
7
7
|
attributes :name, :manifest, :base_ingress_host
|
8
8
|
|
9
9
|
def base_ingress_host
|
10
|
-
managed_dns_zone = controller_settings_service.
|
10
|
+
managed_dns_zone = controller_settings_service.vcluster_settings_by_vcluster(object).managed_dns_zone
|
11
11
|
|
12
12
|
[object.namespace, managed_dns_zone].join('.')
|
13
13
|
end
|
@@ -145,9 +145,9 @@ class UffizziCore::ControllerService
|
|
145
145
|
def controller_client(deployable)
|
146
146
|
settings = case deployable
|
147
147
|
when UffizziCore::Deployment
|
148
|
-
controller_settings_service.
|
148
|
+
controller_settings_service.deployment_settings_by_deployment(deployable)
|
149
149
|
when UffizziCore::Cluster
|
150
|
-
controller_settings_service.
|
150
|
+
controller_settings_service.vcluster_settings_by_vcluster(deployable)
|
151
151
|
else
|
152
152
|
raise StandardError, "Deployable #{deployable.class.name} undefined"
|
153
153
|
end
|
@@ -2,11 +2,15 @@
|
|
2
2
|
|
3
3
|
class UffizziCore::ControllerSettingsService
|
4
4
|
class << self
|
5
|
-
def
|
5
|
+
def vcluster_settings_by_vcluster(_cluster)
|
6
6
|
Settings.vcluster_controller
|
7
7
|
end
|
8
8
|
|
9
|
-
def
|
9
|
+
def vcluster_settings_by_account(_account)
|
10
|
+
Settings.vcluster_controller
|
11
|
+
end
|
12
|
+
|
13
|
+
def deployment_settings_by_deployment(_deployment)
|
10
14
|
Settings.controller.deep_dup.tap do |s|
|
11
15
|
s.managed_dns_zone = Settings.app.managed_dns_zone
|
12
16
|
end
|
data/lib/uffizzi_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uffizzi_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Thurman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-12-
|
12
|
+
date: 2023-12-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aasm
|