Class: Bcome::Node::Kube::Pod

Inherits:
Base
  • Object
show all
Defined in:
lib/objects/node/kube/pod.rb

Instance Attribute Summary

Attributes inherited from Base

#resources

Instance Method Summary collapse

Methods inherited from Base

#build, #initialize, #parent, #parse, #run

Constructor Details

This class inherits a constructor from Bcome::Node::Kube::Base

Instance Method Details

#child_node_klassObject



11
12
13
# File 'lib/objects/node/kube/pod.rb', line 11

def child_node_klass
  ::Bcome::Kube::Node::Container
end

#get_child_config_from_line(raw_line) ⇒ Object



19
20
21
22
# File 'lib/objects/node/kube/pod.rb', line 19

def get_child_config_from_line(raw_line)
  name = raw_line.split("\s")
  { name: name }
end

#get_child_node_commandObject

CONTAINS CONTAINERS



7
8
9
# File 'lib/objects/node/kube/pod.rb', line 7

def get_child_node_command
  "get pods #{name} -n #{parent.name} -o jsonpath=‘{.spec.containers[*].name}’"
end

#nameObject



15
16
17
# File 'lib/objects/node/kube/pod.rb', line 15

def name
  @config[:name]
end