Class: Kuby::Kubernetes::DockerConfig

Inherits:
Object
  • Object
show all
Extended by:
KubeDSL::ValueFields
Defined in:
lib/kuby/kubernetes/docker_config.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ DockerConfig

Returns a new instance of DockerConfig.



13
14
15
# File 'lib/kuby/kubernetes/docker_config.rb', line 13

def initialize(&block)
  instance_eval(&block) if block
end

Instance Method Details

#serializeObject



17
18
19
20
21
22
23
24
25
26
# File 'lib/kuby/kubernetes/docker_config.rb', line 17

def serialize
  {
    registry_host.to_sym => {
      username: username,
      password: password,
      email:    email,
      auth:     Base64.strict_encode64("#{username}:#{password}")
    }
  }
end