uffizzi_core 2.3.1 → 2.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3850d2cd7d36ca24933339885fe25fb104362e70a23c0b5145ab4711d8ce7ac9
4
- data.tar.gz: 4872ba53b94906dc638b2a34875cd59876b074a8d815754b662320bf3119b87a
3
+ metadata.gz: 81b82f01fa3b61eea7546716b1d7bd696ada00810ab5ce6ca72bc6c609bb7266
4
+ data.tar.gz: da50fab31a969b5169a8025034603fb9500dc40c220a17a8fb98667f4ed14f3e
5
5
  SHA512:
6
- metadata.gz: d54a01d42754e16b6d351aff2eb87a7dbcccd65344c3e61b3ff21f4a299755604aa330cfdfa7029038747b465c35d8694523e3f85c5f93763860565df76f0b9e
7
- data.tar.gz: ad6654bb2bf294fa609ef61de08130ffba6071fcf600faad72c274093df1048f7adb16e53a49e552cbc94c5b3cf0b70ee40bf46188a66eda4518e57d693bb1db
6
+ metadata.gz: e2116c59a1f5d6f49f76bc08506e55a67bf7a8ebd4d38d5288f0d6f7664d36182206e30d33c42d88909ac7b9510122df3aa2c38cd6fd3ad6137640e213fb6a5d
7
+ data.tar.gz: 3573e168fe9af86a4d49b38b0d416cf856434c1d6a2d04ff7d1634f1947e3b25d0a34fdd72366c1f7b0e173d6a4718ed453e5f1c744b9d52a2b2e1a19c4bb360
@@ -2,6 +2,7 @@
2
2
 
3
3
  module UffizziCore::Concerns::Models::Container
4
4
  extend ActiveSupport::Concern
5
+ REQUEST_MEMORY_RATIO = 4
5
6
 
6
7
  # rubocop:disable Metrics/BlockLength
7
8
  included do
@@ -29,6 +29,7 @@ class UffizziCore::ComposeFile::Builders::ContainerBuilderService
29
29
  is_ingress = ingress_container?(container_name, ingress_data)
30
30
  repo_attributes = repo_attributes(container_data, continuous_preview_global_data)
31
31
  additional_subdomains = is_ingress ? ingress_data.fetch(:additional_subdomains, []) : []
32
+ memory_limit = memory_limit(deploy_data)
32
33
 
33
34
  {
34
35
  tag: tag(image_data, repo_attributes),
@@ -40,8 +41,8 @@ class UffizziCore::ComposeFile::Builders::ContainerBuilderService
40
41
  command: command(container_data),
41
42
  variables: variables(environment, env_file_dependencies),
42
43
  secret_variables: secret_variables(secrets),
43
- memory_limit: memory(deploy_data),
44
- memory_request: memory(deploy_data),
44
+ memory_limit: memory_limit,
45
+ memory_request: memory_request(memory_limit),
45
46
  repo_attributes: repo_attributes,
46
47
  continuously_deploy: continuously_deploy(deploy_data),
47
48
  receive_incoming_requests: is_ingress,
@@ -161,7 +162,7 @@ class UffizziCore::ComposeFile::Builders::ContainerBuilderService
161
162
  command_data[:command_args].to_s
162
163
  end
163
164
 
164
- def memory(deploy_data)
165
+ def memory_limit(deploy_data)
165
166
  memory = deploy_data[:memory]
166
167
  return Settings.compose.default_memory if memory.nil?
167
168
 
@@ -184,6 +185,10 @@ class UffizziCore::ComposeFile::Builders::ContainerBuilderService
184
185
  memory_value
185
186
  end
186
187
 
188
+ def memory_request(memory)
189
+ memory / UffizziCore::Container::REQUEST_MEMORY_RATIO
190
+ end
191
+
187
192
  def continuously_deploy(deploy_data)
188
193
  return :disabled if deploy_data[:auto] == false
189
194
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UffizziCore
4
- VERSION = '2.3.1'
4
+ VERSION = '2.3.2'
5
5
  end
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.3.1
4
+ version: 2.3.2
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-11-28 00:00:00.000000000 Z
12
+ date: 2023-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aasm