Skip to content

Commit

Permalink
Adding additional printer columns to display status (kubeflow#2609)
Browse files Browse the repository at this point in the history
* Adding additional printer columns to display status

* Fixing tests
  • Loading branch information
johnugeorge authored and k8s-ci-robot committed Mar 4, 2019
1 parent 87bc107 commit 5612aef
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 1 deletion.
12 changes: 12 additions & 0 deletions kubeflow/pytorch-job/pytorch-operator.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@
subresources: {
status: {},
},
additionalPrinterColumns: [
{
JSONPath: ".status.conditions[-1:].type",
name: "State",
type: "string",
},
{
JSONPath: ".metadata.creationTimestamp",
name: "Age",
type: "date",
},
],
validation: {
openAPIV3Schema: {
properties: {
Expand Down
12 changes: 12 additions & 0 deletions kubeflow/pytorch-job/tests/pytorch-job_test.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ local expectedCrdV1beta2 = {
subresources: {
status: {},
},
additionalPrinterColumns: [
{
JSONPath: ".status.conditions[-1:].type",
name: "State",
type: "string",
},
{
JSONPath: ".metadata.creationTimestamp",
name: "Age",
type: "date",
},
],
validation: {
openAPIV3Schema: {
properties: {
Expand Down
12 changes: 12 additions & 0 deletions kubeflow/tf-training/tests/tf-job_test.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ std.assertEqual(
subresources: {
status: {},
},
additionalPrinterColumns: [
{
JSONPath: ".status.conditions[-1:].type",
name: "State",
type: "string",
},
{
JSONPath: ".metadata.creationTimestamp",
name: "Age",
type: "date",
},
],
validation: {
openAPIV3Schema: {
properties: {
Expand Down
14 changes: 13 additions & 1 deletion kubeflow/tf-training/tf-job-operator.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@
subresources: {
status: {},
},
additionalPrinterColumns: [
{
JSONPath: ".status.conditions[-1:].type",
name: "State",
type: "string",
},
{
JSONPath: ".metadata.creationTimestamp",
name: "Age",
type: "date",
},
],
validation: { openAPIV3Schema: openAPIV3Schema },
versions: [
{
Expand All @@ -79,7 +91,7 @@
served: true,
storage: false,
},
],
],
},
},
tfJobCrd:: tfJobCrd,
Expand Down

0 comments on commit 5612aef

Please sign in to comment.