uffizzi_core 0.1.8 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/serializers/uffizzi_core/controller/create_credential/credential_serializer.rb +0 -2
- data/app/serializers/uffizzi_core/controller/deploy_containers/container_serializer.rb +5 -4
- data/app/services/uffizzi_core/compose_file/ingress_options_service.rb +4 -2
- data/app/services/uffizzi_core/manage_activity_items_service.rb +8 -0
- data/config/locales/en.yml +1 -1
- data/lib/uffizzi_core/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48e413ec49645c1e18d15251bcfa9ceaf94309be078fd46befbfd97894d9318e
|
4
|
+
data.tar.gz: 213cd12f3c9216b851ccd16c44562da68c954a03f126fd35ec683119ee7b8755
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 339656968a5609d9674536a6bd36518f2efb33afe30bf77ef2c56d158fe3b1b7a9f27da8dd76dcc8c1f35ad5624121a2914482d296b0b2e5afe9025735dda974
|
7
|
+
data.tar.gz: b5369f15696f2e011b1be386c1ee1b4660a0e5733e09030d0af8095612337cf544e2be0adfce7b3410f0338bd64e7e0d479a0f0f779360d9c99eb6990261670f
|
@@ -12,8 +12,6 @@ class UffizziCore::Controller::CreateCredential::CredentialSerializer < UffizziC
|
|
12
12
|
def password
|
13
13
|
if object.amazon?
|
14
14
|
UffizziCore::Amazon::CredentialService.access_token(object)
|
15
|
-
elsif object.github_container_registry?
|
16
|
-
UffizziCore::GithubContainerRegistry::CredentialService.access_token(object, instance_options[:image])
|
17
15
|
else
|
18
16
|
object.password
|
19
17
|
end
|
@@ -20,16 +20,17 @@ class UffizziCore::Controller::DeployContainers::ContainerSerializer < UffizziCo
|
|
20
20
|
has_many :container_config_files
|
21
21
|
|
22
22
|
def image
|
23
|
-
|
23
|
+
repo = object.repo
|
24
|
+
credential = UffizziCore::RepoService.credential(repo)
|
24
25
|
|
25
|
-
case
|
26
|
+
case repo.type
|
26
27
|
when UffizziCore::Repo::Google.name, UffizziCore::Repo::Amazon.name, UffizziCore::Repo::Azure.name
|
27
28
|
registry_host = URI.parse(credential.registry_url).host
|
28
29
|
|
29
30
|
"#{registry_host}/#{object.image}"
|
30
31
|
when UffizziCore::Repo::GithubContainerRegistry.name
|
31
32
|
registry_host = URI.parse(credential.registry_url).host
|
32
|
-
"#{registry_host}/#{
|
33
|
+
"#{registry_host}/#{repo.namespace}/#{object.image}"
|
33
34
|
else
|
34
35
|
object.image
|
35
36
|
end
|
@@ -37,7 +38,7 @@ class UffizziCore::Controller::DeployContainers::ContainerSerializer < UffizziCo
|
|
37
38
|
|
38
39
|
def tag
|
39
40
|
case object.repo.type
|
40
|
-
when UffizziCore::Repo::Github.name
|
41
|
+
when UffizziCore::Repo::Github.name
|
41
42
|
UffizziCore::RepoService.tag(object.repo)
|
42
43
|
else
|
43
44
|
object.tag
|
@@ -39,8 +39,10 @@ class UffizziCore::ComposeFile::IngressOptionsService
|
|
39
39
|
|
40
40
|
raise UffizziCore::ComposeFile::ParseError, I18n.t('compose.invalid_integer', option: :port) unless port.is_a?(Integer)
|
41
41
|
|
42
|
-
|
43
|
-
|
42
|
+
port_min = Settings.compose.port_min_value
|
43
|
+
port_max = Settings.compose.port_max_value
|
44
|
+
if port < port_min || port > port_max
|
45
|
+
raise UffizziCore::ComposeFile::ParseError, I18n.t('compose.port_out_of_range', port_min: port_min, port_max: port_max)
|
44
46
|
end
|
45
47
|
|
46
48
|
port
|
@@ -116,18 +116,26 @@ class UffizziCore::ManageActivityItemsService
|
|
116
116
|
state = pod_container[:state][pod_container_status]
|
117
117
|
reason = state&.reason
|
118
118
|
|
119
|
+
Rails.logger.info("manage_activity_items get_status dep_id=#{container.deployment.id} pod_container_status: #{pod_container_status}")
|
120
|
+
Rails.logger.info("manage_activity_items get_status dep_id=#{container.deployment.id} state: #{state}")
|
121
|
+
ap pod_container[:state]
|
122
|
+
|
119
123
|
case pod_container_status.to_sym
|
120
124
|
when :running
|
125
|
+
Rails.logger.info("manage_activity_items get_status dep_id=#{container.deployment.id} running")
|
121
126
|
UffizziCore::Event.state.deployed
|
122
127
|
when :terminated
|
128
|
+
Rails.logger.info("manage_activity_items get_status dep_id=#{container.deployment.id} terminated")
|
123
129
|
UffizziCore::Event.state.failed
|
124
130
|
when :waiting
|
131
|
+
Rails.logger.info("manage_activity_items get_status dep_id=#{container.deployment.id} waiting")
|
125
132
|
return UffizziCore::Event.state.failed if ['CrashLoopBackOff'].include?(reason)
|
126
133
|
|
127
134
|
raise UffizziCore::Deployment::ImagePullError, @deployment.id if ['ErrImagePull', 'ImagePullBackOff'].include?(reason)
|
128
135
|
|
129
136
|
UffizziCore::Event.state.deploying
|
130
137
|
else
|
138
|
+
Rails.logger.info("manage_activity_items get_status dep_id=#{container.deployment.id} else")
|
131
139
|
UffizziCore::Event.state.deploying
|
132
140
|
end
|
133
141
|
end
|
data/config/locales/en.yml
CHANGED
@@ -25,7 +25,7 @@ en:
|
|
25
25
|
invalid_ingress_service: Invalid ingress service '%{value}'
|
26
26
|
no_variable_name: Invalid environment variable 'name=%{name}' 'value=%{value}'
|
27
27
|
invalid_config: Invalid config value 'source=%{source}' 'target=%{target}'
|
28
|
-
|
28
|
+
port_out_of_range: Port should be specified between %{port_min} - %{port_max}
|
29
29
|
invalid_memory_postfix: The specified value for memory '%{value}' should specify the units. The postfix should be one of the `b` `k` `m` `g` characters
|
30
30
|
invalid_memory_type: Memory '%{value}' contains an invalid type, it should be a string
|
31
31
|
invalid_memory_value: Invalid memory value '%{value}'
|
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: 0.1.
|
4
|
+
version: 0.1.11
|
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: 2022-05-
|
12
|
+
date: 2022-05-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aasm
|
@@ -451,6 +451,20 @@ dependencies:
|
|
451
451
|
- - "~>"
|
452
452
|
- !ruby/object:Gem::Version
|
453
453
|
version: 3.1.7
|
454
|
+
- !ruby/object:Gem::Dependency
|
455
|
+
name: bump
|
456
|
+
requirement: !ruby/object:Gem::Requirement
|
457
|
+
requirements:
|
458
|
+
- - ">="
|
459
|
+
- !ruby/object:Gem::Version
|
460
|
+
version: '0'
|
461
|
+
type: :development
|
462
|
+
prerelease: false
|
463
|
+
version_requirements: !ruby/object:Gem::Requirement
|
464
|
+
requirements:
|
465
|
+
- - ">="
|
466
|
+
- !ruby/object:Gem::Version
|
467
|
+
version: '0'
|
454
468
|
- !ruby/object:Gem::Dependency
|
455
469
|
name: bundler
|
456
470
|
requirement: !ruby/object:Gem::Requirement
|