Skip to content

ActionsOwner

Gregory Nickonov edited this page Mar 12, 2019 · 1 revision

Quick Start

R.deployment :backend do
  container do
    liveness_probe.use_http '/api/status/liveness'

    lifecycle.post_start.use_command 'rm', '/data/lock'
  end
end

ActionsOwner

Property Kubernetes property Type
exec exec ExecAction
http_get httpGet HTTPGetAction
tcp_socket tcpSocket TCPSocketAction

use_command

Creates, configures and assigns ExecAction with the specified command and arguments:

container do
  liveness_probe do
    use_command 'ls', '-ld', '/data/output.data'
  end
end

use_http

Creates, configures and assigns HTTPGetAction with path and optional port, providing ability to continue configuration in block:

container do
  liveness_probe do
    # Check /api/status endpoint
    use_http '/api/status'

    # Check /api/status endpoint at port 8080
    use_http '/api/status', 8080

    # Check /api/status endpoint passing Host header
    use_http '/api/status' do
      header Host: 'www.example.org'
    end
  end
end

use_tcp

Creates and assigns TCPSocketAction with the provided port and optional host:

container do
  liveness_probe do
    # Check port 5432
    use_tcp 5432

    # Check port 5432 of host gamma.example.org
    use_tcp 5432, 'gamma.example.org'
  end
end

ExecAction

Kubernetes Documentation

Property Kubernetes property Type
command command Array of String

HTTPGetAction

Kubernetes Documentation

Property Kubernetes property Type
host host String
http_headers httpHeaders Array of HTTPHeader
path path String
scheme scheme String

headers

Add set of headers to the http_headers array. An alias header is provided for aesthetic purposes:

http_get '/api/status' do
  headers Host: 'www.example.org',
          'Content-Type': 'application/json'
end

HTTPHeader

Kubernetes Documentation

Property Kubernetes property Type
name name String
value value String

TCPSocketAction

Kubernetes Documentation

Property Kubernetes property Type
host host String
port port Integer or String
Clone this wiki locally