Class: Rhea::Kubernetes::Commands::Delete

Inherits:
Base
  • Object
show all
Defined in:
lib/rhea/kubernetes/commands/delete.rb

Constant Summary

Constants inherited from Base

Base::NAMESPACE

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command_attributes) ⇒ Delete

Returns a new instance of Delete.



7
8
9
# File 'lib/rhea/kubernetes/commands/delete.rb', line 7

def initialize(command_attributes)
  self.command = Command.new(command_attributes)
end

Instance Attribute Details

#commandObject

Returns the value of attribute command.



5
6
7
# File 'lib/rhea/kubernetes/commands/delete.rb', line 5

def command
  @command
end

Instance Method Details

#performObject



11
12
13
14
# File 'lib/rhea/kubernetes/commands/delete.rb', line 11

def perform
  # NOTE: Deleting the rc sends a kill signal that doesn't gracefully stop Resque worker processes.
  api.delete_replication_controller(command.key, NAMESPACE)
end