Class: Orchparty::Kubernetes::ServiceBuilder

Inherits:
CommonBuilder show all
Defined in:
lib/orchparty/dsl_parser_kubernetes.rb

Instance Method Summary collapse

Methods inherited from CommonBuilder

#_build, #method_missing, #mix, #variables

Methods inherited from Builder

#assign_or_merge, build

Constructor Details

#initialize(name, type) ⇒ ServiceBuilder

Returns a new instance of ServiceBuilder.



324
325
326
327
# File 'lib/orchparty/dsl_parser_kubernetes.rb', line 324

def initialize(name, type)
  super AST.service(name:, _type: type)
  @node.files = {}
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Orchparty::Kubernetes::CommonBuilder

Instance Method Details

#environment_secrets(&block) ⇒ Object

  1. rememebring the secrets in environment_secrets (so these environments can be created differentyly

  2. create Secret sections



331
332
333
334
335
# File 'lib/orchparty/dsl_parser_kubernetes.rb', line 331

def environment_secrets(&block)
  result = HashBuilder.build(block)
  @node.environment_secrets = result
  self
end

#file(name, volume, &block) ⇒ Object



337
338
339
340
341
# File 'lib/orchparty/dsl_parser_kubernetes.rb', line 337

def file(name, volume, &block)
  result = FileBuilder.build(name, volume, block)
  @node.files[name] = result
  self
end