Class: DockerRailsProxy::Kubectl::SetKubeconfig

Inherits:
DockerRailsProxy::Kubectl show all
Defined in:
lib/docker_rails_proxy/commands/kubectl/set_kubeconfig.rb

Constant Summary

Constants inherited from DockerRailsProxy::Kubectl

KUBECONFIG_PATH

Constants included from Callbacks

Callbacks::INHERITABLE_CALLBACKS, Callbacks::UNINHERITABLE_CALLBACKS

Instance Attribute Summary collapse

Attributes inherited from Base

#additional_arguments, #additional_arguments_options, #arguments

Instance Method Summary collapse

Methods inherited from Base

build_path, call, command, execute, #initialize

Methods included from Logger

included, #logger

Methods included from Rsync

included, #sync

Methods included from Callbacks

included

Methods included from InheritableAttributes

included

Constructor Details

This class inherits a constructor from DockerRailsProxy::Base

Instance Attribute Details

#dataObject

Returns the value of attribute data.



7
8
9
# File 'lib/docker_rails_proxy/commands/kubectl/set_kubeconfig.rb', line 7

def data
  @data
end

#optionsObject

Returns the value of attribute options.



7
8
9
# File 'lib/docker_rails_proxy/commands/kubectl/set_kubeconfig.rb', line 7

def options
  @options
end

Instance Method Details

#processObject



60
61
62
63
# File 'lib/docker_rails_proxy/commands/kubectl/set_kubeconfig.rb', line 60

def process
  File.write(KUBECONFIG_PATH, data.to_yaml)
  puts 'kubeconfig was set correctly'
end