class Kubes::Kubectl::Args::Standard
Public Instance Methods
apply_args()
click to toggle source
# File lib/kubes/kubectl/args/standard.rb, line 3 def apply_args args = ["-f"] args << resource_path args end
Also aliased as: delete_args
get_args()
click to toggle source
# File lib/kubes/kubectl/args/standard.rb, line 10 def get_args args = ["--recursive -f"] args << resource_path args += ["-o #{@options[:output]}"] if @options[:output] args end
Also aliased as: describe_args
Private Instance Methods
resource()
click to toggle source
# File lib/kubes/kubectl/args/standard.rb, line 27 def resource return unless r = @options[:resource] # intentional assignment r.include?(".yaml") ? r : "#{r}.yaml" end
resource_path()
click to toggle source
# File lib/kubes/kubectl/args/standard.rb, line 19 def resource_path if @options[:file] # batch: apply and delete @options[:file] else # get [".kubes/output", @options[:role], resource].compact.join('/') end end