k8s-operator: add age column to all custom resources (#15663)

This change introduces an Age column in the output for all custom
resources to enhance visibility into their lifecycle status.

Fixes #15499

Signed-off-by: satyampsoni <satyampsoni@gmail.com>
This commit is contained in:
Satyam Soni 2025-04-15 20:13:56 +01:00 committed by GitHub
parent 7833145289
commit b926cd7fc6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 35 additions and 0 deletions

View File

@ -32,6 +32,9 @@ spec:
jsonPath: .status.conditions[?(@.type == "ConnectorReady")].reason jsonPath: .status.conditions[?(@.type == "ConnectorReady")].reason
name: Status name: Status
type: string type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1 name: v1alpha1
schema: schema:
openAPIV3Schema: openAPIV3Schema:

View File

@ -20,6 +20,9 @@ spec:
jsonPath: .status.nameserver.ip jsonPath: .status.nameserver.ip
name: NameserverIP name: NameserverIP
type: string type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1 name: v1alpha1
schema: schema:
openAPIV3Schema: openAPIV3Schema:

View File

@ -18,6 +18,9 @@ spec:
jsonPath: .status.conditions[?(@.type == "ProxyClassReady")].reason jsonPath: .status.conditions[?(@.type == "ProxyClassReady")].reason
name: Status name: Status
type: string type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1 name: v1alpha1
schema: schema:
openAPIV3Schema: openAPIV3Schema:

View File

@ -24,6 +24,9 @@ spec:
jsonPath: .spec.type jsonPath: .spec.type
name: Type name: Type
type: string type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1 name: v1alpha1
schema: schema:
openAPIV3Schema: openAPIV3Schema:

View File

@ -24,6 +24,9 @@ spec:
jsonPath: .status.devices[?(@.url != "")].url jsonPath: .status.devices[?(@.url != "")].url
name: URL name: URL
type: string type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1 name: v1alpha1
schema: schema:
openAPIV3Schema: openAPIV3Schema:

View File

@ -61,6 +61,9 @@ spec:
jsonPath: .status.conditions[?(@.type == "ConnectorReady")].reason jsonPath: .status.conditions[?(@.type == "ConnectorReady")].reason
name: Status name: Status
type: string type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1 name: v1alpha1
schema: schema:
openAPIV3Schema: openAPIV3Schema:
@ -312,6 +315,9 @@ spec:
jsonPath: .status.nameserver.ip jsonPath: .status.nameserver.ip
name: NameserverIP name: NameserverIP
type: string type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1 name: v1alpha1
schema: schema:
openAPIV3Schema: openAPIV3Schema:
@ -492,6 +498,9 @@ spec:
jsonPath: .status.conditions[?(@.type == "ProxyClassReady")].reason jsonPath: .status.conditions[?(@.type == "ProxyClassReady")].reason
name: Status name: Status
type: string type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1 name: v1alpha1
schema: schema:
openAPIV3Schema: openAPIV3Schema:
@ -2803,6 +2812,9 @@ spec:
jsonPath: .spec.type jsonPath: .spec.type
name: Type name: Type
type: string type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1 name: v1alpha1
schema: schema:
openAPIV3Schema: openAPIV3Schema:
@ -3013,6 +3025,9 @@ spec:
jsonPath: .status.devices[?(@.url != "")].url jsonPath: .status.devices[?(@.url != "")].url
name: URL name: URL
type: string type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1 name: v1alpha1
schema: schema:
openAPIV3Schema: openAPIV3Schema:

View File

@ -24,6 +24,7 @@ var ConnectorKind = "Connector"
// +kubebuilder:printcolumn:name="IsExitNode",type="string",JSONPath=`.status.isExitNode`,description="Whether this Connector instance defines an exit node." // +kubebuilder:printcolumn:name="IsExitNode",type="string",JSONPath=`.status.isExitNode`,description="Whether this Connector instance defines an exit node."
// +kubebuilder:printcolumn:name="IsAppConnector",type="string",JSONPath=`.status.isAppConnector`,description="Whether this Connector instance is an app connector." // +kubebuilder:printcolumn:name="IsAppConnector",type="string",JSONPath=`.status.isAppConnector`,description="Whether this Connector instance is an app connector."
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.conditions[?(@.type == "ConnectorReady")].reason`,description="Status of the deployed Connector resources." // +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.conditions[?(@.type == "ConnectorReady")].reason`,description="Status of the deployed Connector resources."
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// Connector defines a Tailscale node that will be deployed in the cluster. The // Connector defines a Tailscale node that will be deployed in the cluster. The
// node can be configured to act as a Tailscale subnet router and/or a Tailscale // node can be configured to act as a Tailscale subnet router and/or a Tailscale

View File

@ -16,6 +16,7 @@ var ProxyClassKind = "ProxyClass"
// +kubebuilder:subresource:status // +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster // +kubebuilder:resource:scope=Cluster
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.conditions[?(@.type == "ProxyClassReady")].reason`,description="Status of the ProxyClass." // +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.conditions[?(@.type == "ProxyClassReady")].reason`,description="Status of the ProxyClass."
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// ProxyClass describes a set of configuration parameters that can be applied to // ProxyClass describes a set of configuration parameters that can be applied to
// proxy resources created by the Tailscale Kubernetes operator. // proxy resources created by the Tailscale Kubernetes operator.

View File

@ -14,6 +14,7 @@ import (
// +kubebuilder:resource:scope=Cluster,shortName=pg // +kubebuilder:resource:scope=Cluster,shortName=pg
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.conditions[?(@.type == "ProxyGroupReady")].reason`,description="Status of the deployed ProxyGroup resources." // +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.conditions[?(@.type == "ProxyGroupReady")].reason`,description="Status of the deployed ProxyGroup resources."
// +kubebuilder:printcolumn:name="Type",type="string",JSONPath=`.spec.type`,description="ProxyGroup type." // +kubebuilder:printcolumn:name="Type",type="string",JSONPath=`.spec.type`,description="ProxyGroup type."
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// ProxyGroup defines a set of Tailscale devices that will act as proxies. // ProxyGroup defines a set of Tailscale devices that will act as proxies.
// Currently only egress ProxyGroups are supported. // Currently only egress ProxyGroups are supported.

View File

@ -15,6 +15,7 @@ import (
// +kubebuilder:resource:scope=Cluster,shortName=rec // +kubebuilder:resource:scope=Cluster,shortName=rec
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.conditions[?(@.type == "RecorderReady")].reason`,description="Status of the deployed Recorder resources." // +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.conditions[?(@.type == "RecorderReady")].reason`,description="Status of the deployed Recorder resources."
// +kubebuilder:printcolumn:name="URL",type="string",JSONPath=`.status.devices[?(@.url != "")].url`,description="URL on which the UI is exposed if enabled." // +kubebuilder:printcolumn:name="URL",type="string",JSONPath=`.status.devices[?(@.url != "")].url`,description="URL on which the UI is exposed if enabled."
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// Recorder defines a tsrecorder device for recording SSH sessions. By default, // Recorder defines a tsrecorder device for recording SSH sessions. By default,
// it will store recordings in a local ephemeral volume. If you want to persist // it will store recordings in a local ephemeral volume. If you want to persist

View File

@ -18,6 +18,7 @@ var DNSConfigKind = "DNSConfig"
// +kubebuilder:subresource:status // +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster,shortName=dc // +kubebuilder:resource:scope=Cluster,shortName=dc
// +kubebuilder:printcolumn:name="NameserverIP",type="string",JSONPath=`.status.nameserver.ip`,description="Service IP address of the nameserver" // +kubebuilder:printcolumn:name="NameserverIP",type="string",JSONPath=`.status.nameserver.ip`,description="Service IP address of the nameserver"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// DNSConfig can be deployed to cluster to make a subset of Tailscale MagicDNS // DNSConfig can be deployed to cluster to make a subset of Tailscale MagicDNS
// names resolvable by cluster workloads. Use this if: A) you need to refer to // names resolvable by cluster workloads. Use this if: A) you need to refer to