Class: Kubernetes::Container

Inherits:
Object
  • Object
show all
Defined in:
lib/kubernetes/container.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Container

Returns a new instance of Container.


6
7
8
9
10
11
12
13
14
# File 'lib/kubernetes/container.rb', line 6

def initialize(data)
  @name = data.fetch("name")
  @image = data.fetch("image")
  @command = data.fetch("command", [])
  @args = data.fetch("args", [])
  @working_dir = data.fetch("workingDir", nil)
  @image_pull_policy = data.fetch("imagePullPolicy")
  @termination_message_path = data.fetch("terminationMessagePath")
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.


3
4
5
# File 'lib/kubernetes/container.rb', line 3

def args
  @args
end

#commandObject (readonly)

Returns the value of attribute command.


3
4
5
# File 'lib/kubernetes/container.rb', line 3

def command
  @command
end

#imageObject (readonly)

Returns the value of attribute image.


3
4
5
# File 'lib/kubernetes/container.rb', line 3

def image
  @image
end

#image_pull_policyObject (readonly)

Returns the value of attribute image_pull_policy.


4
5
6
# File 'lib/kubernetes/container.rb', line 4

def image_pull_policy
  @image_pull_policy
end

#nameObject (readonly)

Returns the value of attribute name.


3
4
5
# File 'lib/kubernetes/container.rb', line 3

def name
  @name
end

#termination_message_pathObject (readonly)

Returns the value of attribute termination_message_path.


4
5
6
# File 'lib/kubernetes/container.rb', line 4

def termination_message_path
  @termination_message_path
end

#working_dirObject (readonly)

Returns the value of attribute working_dir.


3
4
5
# File 'lib/kubernetes/container.rb', line 3

def working_dir
  @working_dir
end