Skip to content

Commit c0873c2

Browse files
authored
fix: add ready to printcolumn output for subgraph resources (#43)
1 parent 904f47b commit c0873c2

3 files changed

Lines changed: 25 additions & 2 deletions

File tree

api/v1beta1/subgraph_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import (
66

77
// +kubebuilder:object:root=true
88
// +kubebuilder:subresource:status
9+
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",description=""
10+
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].message",description=""
11+
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""
912
type SubGraph struct {
1013
metav1.TypeMeta `json:",inline"`
1114
metav1.ObjectMeta `json:"metadata,omitempty"`

chart/apollo-controller/crds/apollo.infra.doodle.com_subgraphs.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,17 @@ spec:
1414
singular: subgraph
1515
scope: Namespaced
1616
versions:
17-
- name: v1beta1
17+
- additionalPrinterColumns:
18+
- jsonPath: .status.conditions[?(@.type=="Ready")].status
19+
name: Ready
20+
type: string
21+
- jsonPath: .status.conditions[?(@.type=="Ready")].message
22+
name: Status
23+
type: string
24+
- jsonPath: .metadata.creationTimestamp
25+
name: Age
26+
type: date
27+
name: v1beta1
1828
schema:
1929
openAPIV3Schema:
2030
properties:

config/base/crd/bases/apollo.infra.doodle.com_subgraphs.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,17 @@ spec:
1414
singular: subgraph
1515
scope: Namespaced
1616
versions:
17-
- name: v1beta1
17+
- additionalPrinterColumns:
18+
- jsonPath: .status.conditions[?(@.type=="Ready")].status
19+
name: Ready
20+
type: string
21+
- jsonPath: .status.conditions[?(@.type=="Ready")].message
22+
name: Status
23+
type: string
24+
- jsonPath: .metadata.creationTimestamp
25+
name: Age
26+
type: date
27+
name: v1beta1
1828
schema:
1929
openAPIV3Schema:
2030
properties:

0 commit comments

Comments
 (0)