Class V1NeonNodeTask.TaskSpec
The node execute task specification.
Namespace: Neon.Kube.Resources.Cluster
Assembly: Neon.Kube.Resources.dll
Syntax
public class V1NeonNodeTask.TaskSpec
Properties
BashScript
Specifies the Bash script to be executed on the target node.
Declaration
[Required]
public string BashScript { get; set; }
Property Value
Type | Description |
---|---|
string |
CaptureOutput
Controls whether the command output is to be captured. This defaults to true
.
note
V1NeonNodeTask is designed to capture command output as UTF-8 or
ASCII text. Binary output or other text encodings are not supported. You
should set this to false
for commands with unsupported output or
when the command output may include secrets.
Declaration
[Required]
public bool CaptureOutput { get; set; }
Property Value
Type | Description |
---|---|
bool |
Node
Identifies the target node where the command will be executed.
Declaration
[Required]
public string Node { get; set; }
Property Value
Type | Description |
---|---|
string |
RetentionSeconds
Specifies the maximum time in seconds to retain the task after it has been ended, for any reason. neon-cluster-operator will add this to FinishTimestamp to determine when it should delete the task. This defaults to 10 minutes.
Declaration
[Required]
public int RetentionSeconds { get; set; }
Property Value
Type | Description |
---|---|
int |
StartAfterTimestamp
Optionally specifies that the task should be started after a specific time. This is intended to make it easier for operators to schedule tasks across the cluster nodes while reducing the chance that all of the tasks will execute at the same time.
note
This property only guarentees that the task will be started after the specified time, not at that time. Task execution may happen some minutes afterwards.
Declaration
[JsonConverter(typeof(JsonNullableDateTimeConverter))]
public DateTime? StartAfterTimestamp { get; set; }
Property Value
Type | Description |
---|---|
DateTime? |
StartBeforeTimestamp
Optionally specifies the time after which the task should not be executed. This is useful for ensuring that tasks don't accumulate for some reason and then perhaps, execute all at once.
Declaration
[JsonConverter(typeof(JsonNullableDateTimeConverter))]
public DateTime? StartBeforeTimestamp { get; set; }
Property Value
Type | Description |
---|---|
DateTime? |
TimeoutSeconds
Specifies the maximum time the command will be allowed to execute in seconds. Defaults to 5 minutes.
Declaration
[Required]
public int TimeoutSeconds { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
Validate()
Verifies that the specification properties are valid.
Declaration
public void Validate()
Exceptions
Type | Condition |
---|---|
CustomResourceException | Thrown when the resource is not valid. |