class Kitchen::Transport::Kubernetes

Kubernetes transport for Kitchen. Uses kubectl exec.

@author Noah Kantrowitz <noah@coderanger> @since 1.0.0 @see Kitchen::Driver::Kubernetes

Public Instance Methods

connection(state, &block) click to toggle source

(see Base#connection)

# File lib/kitchen/transport/kubernetes.rb, line 38
def connection(state, &block)
  # No persistent anything so no need to reuse connections.
  Connection.new(
    pod_id: state[:pod_id],
    kubectl_command: config[:kubectl_command],
    rsync_command: config[:rsync_command],
    rsync_rsh: config[:rsync_rsh],
    log_level: config[:log_level],
    logger: logger
  ).tap do |conn|
    block.call(conn) if block
  end
end