Sha256: f135544593625f0a3098b268ca1f2fbc8166e19f8e69f1c617094d658acc3e4c

Contents?: true

Size: 632 Bytes

Versions: 58

Compression:

Stored size: 632 Bytes

Contents

module Kubes::Kubectl::Args
  class Kustomize < Base
    def apply_args
      args = ["-k"]
      args << resource_path
      args
    end
    alias_method :delete_args, :apply_args

    def get_args
      args = ["-k"]
      args << resource_path
      args += ["-o #{@options[:output]}"] if @options[:output]
      args
    end
    alias_method :describe_args, :get_args

  private
    def resource_path
      [".kubes/output", @options[:role], resource].compact.join('/')
    end

    def resource
      return unless r = @options[:resource] # intentional assignment
      r.include?(".yaml") ? r : "#{r}.yaml"
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
kubes-0.9.3 lib/kubes/kubectl/args/kustomize.rb
kubes-0.9.2 lib/kubes/kubectl/args/kustomize.rb
kubes-0.9.1 lib/kubes/kubectl/args/kustomize.rb
kubes-0.9.0 lib/kubes/kubectl/args/kustomize.rb
kubes-0.8.10 lib/kubes/kubectl/args/kustomize.rb
kubes-0.8.9 lib/kubes/kubectl/args/kustomize.rb
kubes-0.8.8 lib/kubes/kubectl/args/kustomize.rb
kubes-0.8.7 lib/kubes/kubectl/args/kustomize.rb
kubes-0.8.6 lib/kubes/kubectl/args/kustomize.rb
kubes-0.8.5 lib/kubes/kubectl/args/kustomize.rb
kubes-0.8.4 lib/kubes/kubectl/args/kustomize.rb
kubes-0.8.3 lib/kubes/kubectl/args/kustomize.rb
kubes-0.8.2 lib/kubes/kubectl/args/kustomize.rb
kubes-0.8.1 lib/kubes/kubectl/args/kustomize.rb
kubes-0.8.0 lib/kubes/kubectl/args/kustomize.rb
kubes-0.7.10 lib/kubes/kubectl/args/kustomize.rb
kubes-0.7.9 lib/kubes/kubectl/args/kustomize.rb
kubes-0.7.8 lib/kubes/kubectl/args/kustomize.rb
kubes-0.7.7 lib/kubes/kubectl/args/kustomize.rb
kubes-0.7.6 lib/kubes/kubectl/args/kustomize.rb