Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: generate printer columns for job crds #1451

Merged
merged 2 commits into from
Oct 27, 2021
Merged
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
9 changes: 8 additions & 1 deletion manifests/base/crds/kubeflow.org_mxjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ spec:
singular: mxjob
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.conditions[-1:].type
name: State
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1
schema:
openAPIV3Schema:
description: MXJob is the Schema for the mxjobs API
Expand Down
9 changes: 8 additions & 1 deletion manifests/base/crds/kubeflow.org_pytorchjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ spec:
singular: pytorchjob
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if Is it generated by kubebuilder?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is automatically generated by kubebuilder. Maybe it is just sorted by alphabetical order..?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM!

- jsonPath: .status.conditions[-1:].type
name: State
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1
schema:
openAPIV3Schema:
description: PyTorchJob Represents a PyTorchJob resource.
Expand Down
9 changes: 8 additions & 1 deletion manifests/base/crds/kubeflow.org_tfjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ spec:
singular: tfjob
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.conditions[-1:].type
name: State
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1
schema:
openAPIV3Schema:
description: TFJob represents a TFJob resource.
Expand Down
9 changes: 8 additions & 1 deletion manifests/base/crds/kubeflow.org_xgboostjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ spec:
singular: xgboostjob
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .status.conditions[-1:].type
name: State
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1
schema:
openAPIV3Schema:
description: XGBoostJob is the Schema for the xgboostjobs API
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/mxnet/v1/mxjob_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ type MXJobStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.conditions[-1:].type`
//+kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

// MXJob is the Schema for the mxjobs API
type MXJob struct {
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/pytorch/v1/pytorchjob_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (
// +resource:path=pytorchjob
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.conditions[-1:].type`
//+kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

// PyTorchJob Represents a PyTorchJob resource.
type PyTorchJob struct {
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/tensorflow/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (
// +resource:path=tfjob
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.conditions[-1:].type`
//+kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

// TFJob represents a TFJob resource.
type TFJob struct {
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/xgboost/v1/xgboostjob_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ type XGBoostJobSpec struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.conditions[-1:].type`
//+kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

Expand Down