Documentation ¶
Index ¶
- Variables
- type BatchJobStatus
- type JobCode
- func (code JobCode) IsCompleted() bool
- func (code JobCode) IsInProgress() bool
- func (code JobCode) IsNotStarted() bool
- func (code JobCode) MarshalBinary() ([]byte, error)
- func (code JobCode) MarshalText() ([]byte, error)
- func (code JobCode) Message() string
- func (code JobCode) String() string
- func (code *JobCode) UnmarshalBinary(data []byte) error
- func (code *JobCode) UnmarshalText(text []byte) error
- type ReplicaCountType
- type ReplicaCounts
- type Status
- type TaskJobStatus
- type WorkerCounts
Constants ¶
This section is empty.
Variables ¶
View Source
var ReplicaCountTypes []ReplicaCountType = []ReplicaCountType{ ReplicaCountRequested, ReplicaCountPending, ReplicaCountCreating, ReplicaCountNotReady, ReplicaCountReady, ReplicaCountReadyOutOfDate, ReplicaCountErrImagePull, ReplicaCountTerminating, ReplicaCountFailed, ReplicaCountKilled, ReplicaCountKilledOOM, ReplicaCountStalled, ReplicaCountUnknown, }
Functions ¶
This section is empty.
Types ¶
type BatchJobStatus ¶ added in v0.27.0
type BatchJobStatus struct { spec.BatchJob Status JobCode `json:"status" yaml:"status"` EndTime *time.Time `json:"end_time,omitempty" yaml:"end_time,omitempty"` BatchesInQueue int `json:"batches_in_queue" yaml:"batches_in_queue"` WorkerCounts *WorkerCounts `json:"worker_counts,omitempty" yaml:"worker_counts,omitempty"` }
type JobCode ¶ added in v0.19.0
type JobCode int
JobCode is an enum to represent a job status +kubebuilder:validation:Type=string
const ( JobPending JobCode = iota // pending should be the first status in this list JobEnqueuing JobRunning JobEnqueueFailed JobCompletedWithFailures JobSucceeded JobUnexpectedError JobWorkerError JobWorkerOOM JobTimedOut JobStopped JobUnknown )
Possible values for JobCode
func (JobCode) IsCompleted ¶ added in v0.19.0
func (JobCode) IsInProgress ¶ added in v0.19.0
func (JobCode) IsNotStarted ¶ added in v0.35.0
func (JobCode) MarshalBinary ¶ added in v0.19.0
MarshalBinary satisfies BinaryMarshaler
func (JobCode) MarshalText ¶ added in v0.19.0
MarshalText satisfies TextMarshaler
func (*JobCode) UnmarshalBinary ¶ added in v0.19.0
UnmarshalBinary satisfies BinaryUnmarshaler Needed for msgpack
func (*JobCode) UnmarshalText ¶ added in v0.19.0
UnmarshalText satisfies TextUnmarshaler
type ReplicaCountType ¶ added in v0.40.0
type ReplicaCountType string
const ( ReplicaCountRequested ReplicaCountType = "Requested" // requested number of replicas (for up-to-date pods) ReplicaCountPending ReplicaCountType = "Pending" // pods that are in the pending state (for up-to-date pods) ReplicaCountCreating ReplicaCountType = "Creating" // pods that that have their init/non-init containers in the process of being created (for up-to-date pods) ReplicaCountNotReady ReplicaCountType = "NotReady" // pods that are not passing the readiness checks (for up-to-date pods) ReplicaCountReady ReplicaCountType = "Ready" // pods that are passing the readiness checks (for up-to-date pods) ReplicaCountReadyOutOfDate ReplicaCountType = "ReadyOutOfDate" // pods that are passing the readiness checks (for out-of-date pods) ReplicaCountErrImagePull ReplicaCountType = "ErrImagePull" // pods that couldn't pull the containers' images (for up-to-date pods) ReplicaCountTerminating ReplicaCountType = "Terminating" // pods that are in a terminating state (for up-to-date pods) ReplicaCountFailed ReplicaCountType = "Failed" // pods that have had their containers erroring (for up-to-date pods) ReplicaCountKilled ReplicaCountType = "Killed" // pods that have had their container processes killed (for up-to-date pods) ReplicaCountKilledOOM ReplicaCountType = "KilledOOM" // pods that have had their containers OOM (for up-to-date pods) ReplicaCountStalled ReplicaCountType = "Stalled" // pods that have been in a pending state for more than 15 mins (for up-to-date pods) ReplicaCountUnknown ReplicaCountType = "Unknown" // pods that are in an unknown state (for up-to-date pods) )
type ReplicaCounts ¶
type ReplicaCounts struct { Requested int32 `json:"requested" yaml:"requested"` Pending int32 `json:"pending" yaml:"pending"` Creating int32 `json:"creating" yaml:"creating"` NotReady int32 `json:"not_ready" yaml:"not_ready"` Ready int32 `json:"ready" yaml:"ready"` ReadyOutOfDate int32 `json:"ready_out_of_date" yaml:"ready_out_of_date"` ErrImagePull int32 `json:"err_image_pull" yaml:"err_image_pull"` Terminating int32 `json:"terminating" yaml:"terminating"` // includes up-to-date and out-of-date pods Failed int32 `json:"failed" yaml:"failed"` Killed int32 `json:"killed" yaml:"killed"` KilledOOM int32 `json:"killed_oom" yaml:"killed_oom"` Stalled int32 `json:"stalled" yaml:"stalled"` // pending for a long time Unknown int32 `json:"unknown" yaml:"unknown"` }
func (*ReplicaCounts) GetCountBy ¶ added in v0.40.0
func (counts *ReplicaCounts) GetCountBy(replicaType ReplicaCountType) int32
func (*ReplicaCounts) TotalFailed ¶ added in v0.40.0
func (counts *ReplicaCounts) TotalFailed() int32
type Status ¶
type Status struct { Ready int32 `json:"ready" yaml:"ready"` // deployment-reported number of ready replicas (latest + out of date) Requested int32 `json:"requested" yaml:"requested"` // deployment-reported number of requested replicas UpToDate int32 `json:"up_to_date" yaml:"up_to_date"` // deployment-reported number of up-to-date replicas (in whichever phase they are found in) ReplicaCounts *ReplicaCounts `json:"replica_counts,omitempty" yaml:"replica_counts,omitempty"` }
func FromDeployment ¶ added in v0.40.0
func FromDeployment(deployment *kapps.Deployment) *Status
type TaskJobStatus ¶ added in v0.27.0
type WorkerCounts ¶ added in v0.19.0
type WorkerCounts struct { Pending int32 `json:"pending,omitempty" yaml:"pending,omitempty"` Creating int32 `json:"creating,omitempty" yaml:"creating,omitempty"` NotReady int32 `json:"not_ready,omitempty" yaml:"not_ready,omitempty"` Ready int32 `json:"ready,omitempty" yaml:"ready,omitempty"` Succeeded int32 `json:"succeeded,omitempty" yaml:"succeeded,omitempty"` ErrImagePull int32 `json:"err_image_pull,omitempty" yaml:"err_image_pull,omitempty"` Terminating int32 `json:"terminating,omitempty" yaml:"terminating,omitempty"` Failed int32 `json:"failed,omitempty" yaml:"failed,omitempty"` Killed int32 `json:"killed,omitempty" yaml:"killed,omitempty"` KilledOOM int32 `json:"killed_oom,omitempty" yaml:"killed_oom,omitempty"` Stalled int32 `json:"stalled,omitempty" yaml:"stalled,omitempty"` // pending for a long time Unknown int32 `json:"unknown,omitempty" yaml:"unknown,omitempty"` }
Worker counts don't have as many failure variations because Jobs clean up dead pods, so counting different failure scenarios isn't interesting
Click to show internal directories.
Click to hide internal directories.