Class: CDK8sPlus25::K8S::ExecAction
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- CDK8sPlus25::K8S::ExecAction
- Defined in:
- k8_s/exec_action.rb
Overview
ExecAction describes a "run in container" action.
Instance Attribute Summary collapse
-
#command ⇒ Array<String>?
readonly
Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(command: nil) ⇒ ExecAction
constructor
A new instance of ExecAction.
- #to_jsii ⇒ Object
Constructor Details
#initialize(command: nil) ⇒ ExecAction
Returns a new instance of ExecAction.
8 9 10 11 |
# File 'k8_s/exec_action.rb', line 8 def initialize(command: nil) @command = command Jsii::Type.check_type(@command, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=", "command") unless @command.nil? end |
Instance Attribute Details
#command ⇒ Array<String>? (readonly)
Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
18 19 20 |
# File 'k8_s/exec_action.rb', line 18 def command @command end |
Class Method Details
.jsii_properties ⇒ Object
20 21 22 23 24 |
# File 'k8_s/exec_action.rb', line 20 def self.jsii_properties { :command => "command", } end |
Instance Method Details
#to_jsii ⇒ Object
26 27 28 29 30 31 32 |
# File 'k8_s/exec_action.rb', line 26 def to_jsii result = {} result.merge!({ "command" => @command, }) result.compact end |