cmd/k8s-operator: display Tailnet status with kubectl (#18401)

This commit modifies the `Tailnet` CRD to display its status when it
is queried using `kubectl get tailnets` and associated commands. This
allows users to see the status of their tailnets at a glance.

Updates: https://github.com/tailscale/corp/issues/34561

Signed-off-by: David Bond <davidsbond93@gmail.com>
pull/18416/head
David Bond 3 days ago committed by David Bond
parent 4ced75e9d9
commit 078dd6cf42
No known key found for this signature in database
GPG Key ID: A35B34F344ED7AFE

@ -19,6 +19,10 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: Status of the deployed Tailnet resources.
jsonPath: .status.conditions[?(@.type == "TailnetReady")].reason
name: Status
type: string
name: v1alpha1
schema:
openAPIV3Schema:

@ -5104,6 +5104,10 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: Status of the deployed Tailnet resources.
jsonPath: .status.conditions[?(@.type == "TailnetReady")].reason
name: Status
type: string
name: v1alpha1
schema:
openAPIV3Schema:

@ -18,6 +18,7 @@ var TailnetKind = "Tailnet"
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster,shortName=tn
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.conditions[?(@.type == "TailnetReady")].reason`,description="Status of the deployed Tailnet resources."
type Tailnet struct {
metav1.TypeMeta `json:",inline"`

Loading…
Cancel
Save