Class: UffizziCore::ComposeFile::ContainerService

Inherits:
Object
  • Object
show all
Defined in:
app/services/uffizzi_core/compose_file/container_service.rb

Class Method Summary collapse

Class Method Details

.has_secret?(container, secret) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
# File 'app/services/uffizzi_core/compose_file/container_service.rb', line 5

def has_secret?(container, secret)
  container['secret_variables'].any? { |container_secret| container_secret['name'] == secret['name'] }
end

.update_secret(container, secret) ⇒ Object



9
10
11
12
13
14
# File 'app/services/uffizzi_core/compose_file/container_service.rb', line 9

def update_secret(container, secret)
  secret_index = container['secret_variables'].find_index { |container_secret| container_secret['name'] == secret['name'] }
  container['secret_variables'][secret_index] = secret

  container
end