Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
update openapi tag for SDK generating (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchihe authored and k8s-ci-robot committed Dec 8, 2019
1 parent 09e1ac1 commit c2d0bf3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion job_controller/api/v1/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

// +k8s:deepcopy-gen=package,register
// +k8s:defaulter-gen=TypeMeta
// +k8s:openapi-gen=true

// Package v1 is the v1 version of the API.
// +groupName=kubeflow.org
Expand Down
6 changes: 6 additions & 0 deletions job_controller/api/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=true
// JobStatus represents the current observed state of the training Job.
type JobStatus struct {
Expand All @@ -44,10 +45,12 @@ type JobStatus struct {
LastReconcileTime *metav1.Time `json:"lastReconcileTime,omitempty"`
}

// +k8s:openapi-gen=true
// ReplicaType represents the type of the replica. Each operator needs to define its
// own set of ReplicaTypes.
type ReplicaType string

// +k8s:openapi-gen=true
// ReplicaStatus represents the current observed state of the replica.
type ReplicaStatus struct {
// The number of actively running pods.
Expand All @@ -60,6 +63,7 @@ type ReplicaStatus struct {
Failed int32 `json:"failed,omitempty"`
}

// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=true
// ReplicaSpec is a description of the replica
type ReplicaSpec struct {
Expand All @@ -78,6 +82,7 @@ type ReplicaSpec struct {
RestartPolicy RestartPolicy `json:"restartPolicy,omitempty"`
}

// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=true
// JobCondition describes the state of the job at a certain point.
type JobCondition struct {
Expand Down Expand Up @@ -126,6 +131,7 @@ const (
JobFailed JobConditionType = "Failed"
)

// +k8s:openapi-gen=true
// CleanPodPolicy describes how to deal with pods when the job is finished.
type CleanPodPolicy string

Expand Down

0 comments on commit c2d0bf3

Please sign in to comment.