Sha256: 87b997e81a82c9c6d7ed74cd15505d1ef55efc0edf3e7afcbe317576be590c90

Contents?: true

Size: 298 Bytes

Versions: 3

Compression:

Stored size: 298 Bytes

Contents

class KuberKit::Shell::KubectlCommands
  def apply_file(shell, file_path, kubecfg_path: nil)
    command_parts = []
    if kubecfg_path
      command_parts << "KUBECFG=#{kubecfg_path}"
    end

    command_parts << "kubectl apply -f #{file_path}"

    shell.exec!(command_parts.join(" "))
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kuber_kit-0.1.2 lib/kuber_kit/shell/kubectl_commands.rb
kuber_kit-0.1.1 lib/kuber_kit/shell/kubectl_commands.rb
kuber_kit-0.1.0 lib/kuber_kit/shell/kubectl_commands.rb