Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ repos:
args: [--allow-multiple-documents]
exclude: ^helm-chart/|^mkdocs\.yml$|^benchmark/perf-tests/|^\.krew\.yaml$
- id: check-added-large-files
exclude: ^ray-operator/config/crd/bases/
- id: check-merge-conflict
- id: check-case-conflict
- id: check-vcs-permalinks
Expand Down
37 changes: 37 additions & 0 deletions docs/reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Package v1 contains API Schema definitions for the ray v1 API group

### Resource Types
- [RayCluster](#raycluster)
- [RayCronJob](#raycronjob)
- [RayJob](#rayjob)
- [RayService](#rayservice)

Expand Down Expand Up @@ -279,6 +280,41 @@ _Appears in:_
| `workerGroupSpecs` _[WorkerGroupSpec](#workergroupspec) array_ | WorkerGroupSpecs are the specs for the worker pods | | |


#### RayCronJob



RayCronJob is the Schema for the raycronjobs API





| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `apiVersion` _string_ | `ray.io/v1` | | |
| `kind` _string_ | `RayCronJob` | | |
| `spec` _[RayCronJobSpec](#raycronjobspec)_ | | | |
| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |


#### RayCronJobSpec



RayCronJobSpec defines the desired state of RayCronJob



_Appears in:_
- [RayCronJob](#raycronjob)

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `jobTemplate` _[RayJobSpec](#rayjobspec)_ | JobTemplate defines the job spec that will be created by cron scheduling | | |
| `schedule` _string_ | Schedule is the cron schedule string | | |


#### RayJob


Expand Down Expand Up @@ -306,6 +342,7 @@ RayJobSpec defines the desired state of RayJob


_Appears in:_
- [RayCronJobSpec](#raycronjobspec)
- [RayJob](#rayjob)

| Field | Description | Default | Validation |
Expand Down
9 changes: 9 additions & 0 deletions ray-operator/PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,13 @@ resources:
kind: RayJob
path: github.com/ray-project/kuberay/ray-operator/apis/ray/v1
version: v1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: io
group: ray
kind: RayCronJob
path: github.com/ray-project/kuberay/ray-operator/apis/ray/v1
version: v1
version: "3"
58 changes: 58 additions & 0 deletions ray-operator/apis/ray/v1/raycronjob_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package v1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// RayCronJobSpec defines the desired state of RayCronJob
type RayCronJobSpec struct {
// JobTemplate defines the job spec that will be created by cron scheduling
JobTemplate *RayJobSpec `json:"jobTemplate"`
// Schedule is the cron schedule string
Schedule string `json:"schedule"`
}

// The overall state of the RayCronJob.
type ScheduleStatus string

const (
StatusNew ScheduleStatus = ""
StatusScheduled ScheduleStatus = "Scheduled"
StatusValidationFailed ScheduleStatus = "ValidationFailed"
)

// RayCronJobStatus defines the observed state of RayCronJob
type RayCronJobStatus struct {
// LastScheduleTime is the last time the RayJob is being scheduled by this RayCronJob
// +optional
LastScheduleTime metav1.Time `json:"lastScheduleTime,omitempty"`
// +optional
ScheduleStatus ScheduleStatus `json:"scheduleStatus,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

// RayCronJob is the Schema for the raycronjobs API
type RayCronJob struct {
metav1.TypeMeta `json:",inline"`
Spec RayCronJobSpec `json:"spec,omitempty"`
Status RayCronJobStatus `json:"status,omitempty"`
metav1.ObjectMeta `json:"metadata,omitempty"`
}

//+kubebuilder:object:root=true

// RayCronJobList contains a list of RayCronJob
type RayCronJobList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []RayCronJob `json:"items"`
}

func init() {
SchemeBuilder.Register(&RayCronJob{}, &RayCronJobList{})
}
95 changes: 95 additions & 0 deletions ray-operator/apis/ray/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading