Class: Porkadot::Assets::KubeletList
- Inherits:
-
Object
- Object
- Porkadot::Assets::KubeletList
- Defined in:
- lib/porkadot/assets/kubelet.rb
Instance Attribute Summary collapse
-
#global_config ⇒ Object
readonly
Returns the value of attribute global_config.
-
#kubelet_default ⇒ Object
readonly
Returns the value of attribute kubelet_default.
-
#kubelets ⇒ Object
readonly
Returns the value of attribute kubelets.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
- #[](name) ⇒ Object
-
#initialize(global_config) ⇒ KubeletList
constructor
A new instance of KubeletList.
- #render ⇒ Object
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_config ⇒ Object (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_default ⇒ Object (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 |
#kubelets ⇒ Object (readonly)
Returns the value of attribute kubelets.
11 12 13 |
# File 'lib/porkadot/assets/kubelet.rb', line 11 def kubelets @kubelets end |
#logger ⇒ Object (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 |
#render ⇒ Object
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 |