Class: Porkadot::Assets::KubeletList

Inherits:
Object
  • Object
show all
Defined in:
lib/porkadot/assets/kubelet.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(global_config) ⇒ KubeletList

Returns a new instance of KubeletList.



13
14
15
16
17
18
19
20
21
# File 'lib/porkadot/assets/kubelet.rb', line 13

def initialize global_config
  @global_config = global_config
  @logger = global_config.logger
  @kubelet_default = KubeletDefault.new(global_config.kubelet_default)
  @kubelets = {}
  global_config.nodes.each do |k, config|
    @kubelets[k] = Kubelet.new(config)
  end
end

Instance Attribute Details

#global_configObject (readonly)

Returns the value of attribute global_config.



8
9
10
# File 'lib/porkadot/assets/kubelet.rb', line 8

def global_config
  @global_config
end

#kubelet_defaultObject (readonly)

Returns the value of attribute kubelet_default.



10
11
12
# File 'lib/porkadot/assets/kubelet.rb', line 10

def kubelet_default
  @kubelet_default
end

#kubeletsObject (readonly)

Returns the value of attribute kubelets.



11
12
13
# File 'lib/porkadot/assets/kubelet.rb', line 11

def kubelets
  @kubelets
end

#loggerObject (readonly)

Returns the value of attribute logger.



9
10
11
# File 'lib/porkadot/assets/kubelet.rb', line 9

def logger
  @logger
end

Instance Method Details

#[](name) ⇒ Object



30
31
32
# File 'lib/porkadot/assets/kubelet.rb', line 30

def [](name)
  self.kubelets[name]
end

#renderObject



23
24
25
26
27
28
# File 'lib/porkadot/assets/kubelet.rb', line 23

def render
  self.kubelet_default.render
  self.kubelets.each do |_, v|
    v.render
  end
end