uffizzi_core 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/uffizzi_core/dependency_injection_concern.rb +4 -0
- data/app/forms/uffizzi_core/api/cli/v1/deployment/create_form.rb +1 -0
- data/app/forms/uffizzi_core/api/cli/v1/deployment/update_form.rb +1 -0
- data/app/forms/uffizzi_core/api/cli/v1/template/create_form.rb +1 -0
- data/app/serializers/uffizzi_core/controller/deploy_containers/container_serializer.rb +2 -1
- data/app/services/uffizzi_core/compose_file/builders/container_builder_service.rb +2 -0
- data/app/services/uffizzi_core/compose_file/parsers/ingress_parser_service.rb +6 -1
- data/app/services/uffizzi_core/compose_file_service.rb +14 -1
- data/app/services/uffizzi_core/manage_activity_items_service.rb +1 -1
- data/db/migrate/20220927113647_add_additional_subdomains_to_containers.rb +7 -0
- data/lib/uffizzi_core/version.rb +1 -1
- metadata +16 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a1fdc0ffa4aadeeeac07ab3776a7f2dcc63f19968accc8d1820bb6b842a0877
|
4
|
+
data.tar.gz: 992b23980cc8e63db90b835f967bf2c1771d51019a17f805783fb6b2c4550b4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dac4d2ec9bbae5bb2f322ed3311cc48b3471a3f05d13fa6e650e1c16e4f1f722318df5c2d20c31e77435bfa5aea91a4b7e0405276f2c4ea1800687e88e891f7
|
7
|
+
data.tar.gz: 3579e513b890716d21ae35c21bdb500eab2ee1677d49e6cffeffd75f5ef4c5aeddfbbf4e3563a544bf9d02a210a00424ea38980346d9fc7f6e1992dd96832ea5
|
@@ -18,6 +18,7 @@ class UffizziCore::Api::Cli::V1::Deployment::CreateForm < UffizziCore::Deploymen
|
|
18
18
|
:receive_incoming_requests,
|
19
19
|
:continuously_deploy,
|
20
20
|
{ variables: [:name, :value],
|
21
|
+
additional_subdomains: [],
|
21
22
|
secret_variables: [:name, :value],
|
22
23
|
volumes: [:source, :target, :type, :read_only],
|
23
24
|
healthcheck: [:test, :interval, :timeout, :retries, :start_period, :disable, { test: [] }],
|
@@ -17,6 +17,7 @@ class UffizziCore::Api::Cli::V1::Deployment::UpdateForm < UffizziCore::Deploymen
|
|
17
17
|
:receive_incoming_requests,
|
18
18
|
:continuously_deploy,
|
19
19
|
{ variables: [:name, :value],
|
20
|
+
additional_subdomains: [],
|
20
21
|
secret_variables: [:name, :value],
|
21
22
|
volumes: [:source, :target, :type, :read_only],
|
22
23
|
healthcheck: [:test, :interval, :timeout, :retries, :start_period, :disable, { test: [] }],
|
@@ -19,6 +19,7 @@ class UffizziCore::Api::Cli::V1::Template::CreateForm < UffizziCore::Template
|
|
19
19
|
:service_name,
|
20
20
|
:name,
|
21
21
|
{ variables: [:name, :value],
|
22
|
+
additional_subdomains: [],
|
22
23
|
secret_variables: [:name, :value],
|
23
24
|
volumes: [:source, :target, :type, :read_only],
|
24
25
|
healthcheck: [:test, :interval, :timeout, :retries, :start_period, :disable, { test: [] }],
|
@@ -27,6 +27,7 @@ class UffizziCore::ComposeFile::Builders::ContainerBuilderService
|
|
27
27
|
container_name)
|
28
28
|
is_ingress = ingress_container?(container_name, ingress_data)
|
29
29
|
repo_attributes = repo_attributes(container_data, continuous_preview_global_data)
|
30
|
+
additional_subdomains = is_ingress ? ingress_data[:additional_subdomains] : []
|
30
31
|
|
31
32
|
{
|
32
33
|
tag: tag(image_data, repo_attributes),
|
@@ -47,6 +48,7 @@ class UffizziCore::ComposeFile::Builders::ContainerBuilderService
|
|
47
48
|
name: container_name,
|
48
49
|
healthcheck: healthcheck_data,
|
49
50
|
volumes: volumes_data,
|
51
|
+
additional_subdomains: additional_subdomains,
|
50
52
|
}
|
51
53
|
end
|
52
54
|
# rubocop:enable Metrics/PerceivedComplexity
|
@@ -7,11 +7,12 @@ class UffizziCore::ComposeFile::Parsers::IngressParserService
|
|
7
7
|
|
8
8
|
container_name = container_name(ingress_data, services_data)
|
9
9
|
port = port(ingress_data)
|
10
|
+
additional_attributes = build_additional_attributes(ingress_data, services_data)
|
10
11
|
|
11
12
|
{
|
12
13
|
container_name: container_name,
|
13
14
|
port: port,
|
14
|
-
}
|
15
|
+
}.merge(additional_attributes)
|
15
16
|
end
|
16
17
|
|
17
18
|
private
|
@@ -47,5 +48,9 @@ class UffizziCore::ComposeFile::Parsers::IngressParserService
|
|
47
48
|
|
48
49
|
port
|
49
50
|
end
|
51
|
+
|
52
|
+
def build_additional_attributes(*)
|
53
|
+
{}
|
54
|
+
end
|
50
55
|
end
|
51
56
|
end
|
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
class UffizziCore::ComposeFileService
|
4
4
|
class << self
|
5
|
+
include UffizziCore::DependencyInjectionConcern
|
6
|
+
|
5
7
|
def create(params, kind)
|
6
8
|
compose_file_form = create_compose_form(params, kind)
|
7
9
|
|
@@ -31,7 +33,7 @@ class UffizziCore::ComposeFileService
|
|
31
33
|
continuous_preview_data = UffizziCore::ComposeFile::Parsers::ContinuousPreviewParserService.parse(continuous_preview_option)
|
32
34
|
|
33
35
|
ingress_option = UffizziCore::ComposeFile::ConfigOptionService.ingress_option(compose_data)
|
34
|
-
ingress_data =
|
36
|
+
ingress_data = parse_ingress(ingress_option, compose_data)
|
35
37
|
|
36
38
|
{
|
37
39
|
containers: containers_data,
|
@@ -40,6 +42,17 @@ class UffizziCore::ComposeFileService
|
|
40
42
|
}
|
41
43
|
end
|
42
44
|
|
45
|
+
def parse_ingress(ingress_option, compose_data)
|
46
|
+
ingress_parser_module = find_ingress_parser_module
|
47
|
+
|
48
|
+
unless ingress_parser_module
|
49
|
+
return UffizziCore::ComposeFile::Parsers::IngressParserService.parse(ingress_option,
|
50
|
+
compose_data['services'])
|
51
|
+
end
|
52
|
+
|
53
|
+
ingress_parser_module.parse(ingress_option, compose_data['services'])
|
54
|
+
end
|
55
|
+
|
43
56
|
def build_template_attributes(compose_data, source, credentials, project, compose_dependencies = [], compose_repositories = [])
|
44
57
|
builder = UffizziCore::ComposeFile::Builders::TemplateBuilderService.new(credentials, project, compose_repositories)
|
45
58
|
|
@@ -142,6 +142,6 @@ class UffizziCore::ManageActivityItemsService
|
|
142
142
|
end
|
143
143
|
|
144
144
|
def deployment_network_connectivity
|
145
|
-
namespace_data&.metadata&.annotations&.network_connectivity || '{}'
|
145
|
+
namespace_data&.metadata&.annotations&.network_connectivity.presence || '{}'
|
146
146
|
end
|
147
147
|
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.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Thurman
|
@@ -521,6 +521,20 @@ dependencies:
|
|
521
521
|
- - ">="
|
522
522
|
- !ruby/object:Gem::Version
|
523
523
|
version: '0'
|
524
|
+
- !ruby/object:Gem::Dependency
|
525
|
+
name: deepsort
|
526
|
+
requirement: !ruby/object:Gem::Requirement
|
527
|
+
requirements:
|
528
|
+
- - "~>"
|
529
|
+
- !ruby/object:Gem::Version
|
530
|
+
version: 0.4.5
|
531
|
+
type: :development
|
532
|
+
prerelease: false
|
533
|
+
version_requirements: !ruby/object:Gem::Requirement
|
534
|
+
requirements:
|
535
|
+
- - "~>"
|
536
|
+
- !ruby/object:Gem::Version
|
537
|
+
version: 0.4.5
|
524
538
|
- !ruby/object:Gem::Dependency
|
525
539
|
name: factory_bot
|
526
540
|
requirement: !ruby/object:Gem::Requirement
|
@@ -987,6 +1001,7 @@ files:
|
|
987
1001
|
- db/migrate/20220525113412_rename_name_to_uffizzi_containers.rb
|
988
1002
|
- db/migrate/20220704135629_add_disabled_at_to_deployments.rb
|
989
1003
|
- db/migrate/20220805164628_add_metadata_to_deployment.rb
|
1004
|
+
- db/migrate/20220927113647_add_additional_subdomains_to_containers.rb
|
990
1005
|
- db/seeds.rb
|
991
1006
|
- lib/tasks/uffizzi_core_tasks.rake
|
992
1007
|
- lib/uffizzi_core.rb
|