Skip to content

Commit 7509254

Browse files
committed
feat: Add lastResync and Age as printcolumns
1 parent e330b06 commit 7509254

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

api/v1beta1/grafanacontactpoint_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ type GrafanaContactPointSpec struct {
5353
//+kubebuilder:subresource:status
5454

5555
// GrafanaContactPoint is the Schema for the grafanacontactpoints API
56+
// +kubebuilder:printcolumn:name="Last resync",type="date",format="date-time",JSONPath=".status.lastResync",description=""
57+
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""
5658
// +kubebuilder:resource:categories={grafana-operator}
5759
type GrafanaContactPoint struct {
5860
metav1.TypeMeta `json:",inline"`

config/crd/bases/grafana.integreatly.org_grafanacontactpoints.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ spec:
1616
singular: grafanacontactpoint
1717
scope: Namespaced
1818
versions:
19-
- name: v1beta1
19+
- additionalPrinterColumns:
20+
- format: date-time
21+
jsonPath: .status.lastResync
22+
name: Last resync
23+
type: date
24+
- jsonPath: .metadata.creationTimestamp
25+
name: Age
26+
type: date
27+
name: v1beta1
2028
schema:
2129
openAPIV3Schema:
2230
description: GrafanaContactPoint is the Schema for the grafanacontactpoints

deploy/helm/grafana-operator/crds/grafana.integreatly.org_grafanacontactpoints.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ spec:
1616
singular: grafanacontactpoint
1717
scope: Namespaced
1818
versions:
19-
- name: v1beta1
19+
- additionalPrinterColumns:
20+
- format: date-time
21+
jsonPath: .status.lastResync
22+
name: Last resync
23+
type: date
24+
- jsonPath: .metadata.creationTimestamp
25+
name: Age
26+
type: date
27+
name: v1beta1
2028
schema:
2129
openAPIV3Schema:
2230
description: GrafanaContactPoint is the Schema for the grafanacontactpoints

deploy/kustomize/base/crds.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,15 @@ spec:
335335
singular: grafanacontactpoint
336336
scope: Namespaced
337337
versions:
338-
- name: v1beta1
338+
- additionalPrinterColumns:
339+
- format: date-time
340+
jsonPath: .status.lastResync
341+
name: Last resync
342+
type: date
343+
- jsonPath: .metadata.creationTimestamp
344+
name: Age
345+
type: date
346+
name: v1beta1
339347
schema:
340348
openAPIV3Schema:
341349
description: GrafanaContactPoint is the Schema for the grafanacontactpoints

0 commit comments

Comments
 (0)