Documentation ¶
Index ¶
- type BatchScheduleDescription
- type FailurePolicy
- type FailurePolicyRule
- type FailurePolicyRuleAction
- type FailurePolicyRuleOnExitCodes
- type FailurePolicyRuleOnExitCodesOperator
- type JobScheduleDescription
- type Node
- type RadixJobComponentConfig
- type ResourceList
- type Resources
- type Status
- type StatusReason
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchScheduleDescription ¶
type BatchScheduleDescription struct { // Defines a user defined ID of the batch. // // required: false // example: 'batch-id-1' BatchId string `json:"batchId,omitempty"` // JobScheduleDescriptions descriptions of jobs to schedule within the batch // // required: true JobScheduleDescriptions []JobScheduleDescription `json:"jobScheduleDescriptions" yaml:"jobScheduleDescriptions"` // DefaultRadixJobComponentConfig default resources configuration // // required: false DefaultRadixJobComponentConfig *RadixJobComponentConfig `json:"defaultRadixJobComponentConfig,omitempty" yaml:"defaultRadixJobComponentConfig,omitempty"` }
BatchScheduleDescription holds description about batch scheduling job swagger:model BatchScheduleDescription
type FailurePolicy ¶ added in v1.13.0
type FailurePolicy struct { // A list of failure policy rules. The rules are evaluated in order. // Once a rule matches a job replica failure, the remaining of the rules are ignored. // When no rule matches the failure, the default handling applies - the // counter of failures is incremented and it is checked against // the backoffLimit. // // maxItems: 20 // required: true Rules []FailurePolicyRule `json:"rules"` }
FailurePolicy describes how failed job replicas influence the backoffLimit.
func (*FailurePolicy) MapToRadixFailurePolicy ¶ added in v1.13.0
func (f *FailurePolicy) MapToRadixFailurePolicy() *radixv1.RadixJobComponentFailurePolicy
MapToRadixFailurePolicy maps the object to a RadixJobComponentFailurePolicy object
type FailurePolicyRule ¶ added in v1.13.0
type FailurePolicyRule struct { // Specifies the action taken on a job replica failure when the onExitCodes requirements are satisfied. // // required: true Action FailurePolicyRuleAction `json:"action"` // Represents the requirement on the job replica exit codes. // // required: true OnExitCodes FailurePolicyRuleOnExitCodes `json:"onExitCodes"` }
FailurePolicyRule describes how a job replica failure is handled when the onExitCodes rules are met.
type FailurePolicyRuleAction ¶ added in v1.13.0
type FailurePolicyRuleAction string
swagger:enum FailurePolicyRuleAction
const ( // This is an action which might be taken on a job replica failure - mark the // job as Failed and terminate all running pods. FailurePolicyRuleActionFailJob FailurePolicyRuleAction = "FailJob" // This is an action which might be taken on a job replica failure - the counter towards // .backoffLimit is not incremented and a replacement replica is created. FailurePolicyRuleActionIgnore FailurePolicyRuleAction = "Ignore" // This is an action which might be taken on a job replica failure - the replica failure // is handled in the default way - the counter towards .backoffLimit is incremented. FailurePolicyRuleActionCount FailurePolicyRuleAction = "Count" )
type FailurePolicyRuleOnExitCodes ¶ added in v1.13.0
type FailurePolicyRuleOnExitCodes struct { // Represents the relationship between the job replica's exit code and the // specified values. Replicas completed with success (exit code 0) are // excluded from the requirement check. // // required: true Operator FailurePolicyRuleOnExitCodesOperator `json:"operator"` // Specifies the set of values. The job replica's exit code is checked against this set of // values with respect to the operator. The list must not contain duplicates. // Value '0' cannot be used for the In operator. // // minItems: 1 // maxItems: 255 // minimum: 0 // required: true Values []int32 `json:"values"` }
FailurePolicyRuleOnExitCodes describes the requirement for handling a failed job replica based on its exit code.
type FailurePolicyRuleOnExitCodesOperator ¶ added in v1.13.0
type FailurePolicyRuleOnExitCodesOperator string
swagger:enum FailurePolicyRuleOnExitCodesOperator
const ( // The requirement is satisfied if the job replica's exit code is in the set of specified values. FailurePolicyRuleOnExitCodesOpIn FailurePolicyRuleOnExitCodesOperator = "In" // The requirement is satisfied if the job replica's exit code is not in the set of specified values. FailurePolicyRuleOnExitCodesOpNotIn FailurePolicyRuleOnExitCodesOperator = "NotIn" )
type JobScheduleDescription ¶
type JobScheduleDescription struct { // JobId Optional ID of a job // // required: false // example: 'job1' JobId string `json:"jobId,omitempty"` // Payload holding json data to be mapped to component // // required: false // example: {'data':'value'} Payload string `json:"payload"` // RadixJobComponentConfig holding data relating to resource configuration // // required: false RadixJobComponentConfig `json:",inline"` }
JobScheduleDescription holds description about scheduling job swagger:model JobScheduleDescription
type Node ¶ added in v1.13.0
type Node struct { // Defines rules for allowed GPU types. // // required: false Gpu string `json:"gpu,omitempty"` // Defines minimum number of required GPUs. // // required: false GpuCount string `json:"gpuCount,omitempty"` }
Node defines node attributes, where container should be scheduled
func (*Node) MapToRadixNode ¶ added in v1.13.0
MapToRadixNode maps the object to a RadixNode object
type RadixJobComponentConfig ¶
type RadixJobComponentConfig struct { // Resource describes the compute resource requirements. // // required: false Resources *Resources `json:"resources,omitempty"` // Node defines node attributes, where container should be scheduled // // required: false Node *Node `json:"node,omitempty"` // TimeLimitSeconds defines maximum job run time. Corresponds to ActiveDeadlineSeconds in K8s. // // required: false TimeLimitSeconds *int64 `json:"timeLimitSeconds,omitempty"` // BackoffLimit defines attempts to restart job if it fails. Corresponds to BackoffLimit in K8s. // // required: false BackoffLimit *int32 `json:"backoffLimit,omitempty"` // FailurePolicy defines how failed job replicas influence the backoffLimit. // // required: false FailurePolicy *FailurePolicy `json:"failurePolicy,omitempty"` // ImageTagName defines the image tag name to use for the job image // // required: false ImageTagName string `json:"imageTagName,omitempty"` }
RadixJobComponentConfig holds description of RadixJobComponent
type ResourceList ¶ added in v1.13.0
type Resources ¶ added in v1.13.0
type Resources struct { // Limits describes the maximum amount of compute resources allowed. // // required: false Limits ResourceList `json:"limits,omitempty"` // Requests describes the minimum amount of compute resources required. // If Requests is omitted for a container, it defaults to Limits if // that is explicitly specified, otherwise to an implementation-defined value. // // required: false Requests ResourceList `json:"requests,omitempty"` }
Resources describes the compute resource requirements.
func (*Resources) MapToRadixResourceRequirements ¶ added in v1.13.0
func (r *Resources) MapToRadixResourceRequirements() *radixv1.ResourceRequirements
MapToRadixResourceRequirements maps the object to a ResourceRequirements object
type Status ¶
type Status struct { // Status of the operation. // One of: "Success" or "Failure". // example: Failure Status string `json:"status,omitempty"` // A human-readable description of the status of this operation. // required: false // example: job job123 is not found Message string `json:"message,omitempty"` // A machine-readable description of why this operation is in the // "Failure" status. If this value is empty there // is no information available. A Reason clarifies an HTTP status // code but does not override it. // required: false // example: NotFound Reason StatusReason `json:"reason,omitempty"` // Suggested HTTP return code for this status, 0 if not set. // required: false // example: 404 Code int `json:"code,omitempty"` }
Status is a return value for calls that don't return other objects or when a request returns an error swagger:model Status
type StatusReason ¶
type StatusReason string
const ( StatusSuccess = "Success" StatusFailure = "Failure" // StatusReasonUnknown means the server has declined to indicate a specific reason. // Status code 500. StatusReasonUnknown StatusReason = "InternalError" // StatusReasonBadRequest means that the operation could not be fulfilled. // Status code 400 StatusReasonBadRequest StatusReason = "BadRequest" // StatusReasonNotFound means one or more resources required for this operation // could not be found. // Status code 404 StatusReasonNotFound StatusReason = "NotFound" // StatusReasonInvalid means the requested create or update operation cannot be // completed due to invalid data provided as part of the request. The client may // need to alter the request. // Status code 422 StatusReasonInvalid StatusReason = "Invalid" )