Skip to content

Commit ec27db3

Browse files
committed
Surface the association in kubectl get output
The AttachedTo printer column shows status.associatedTo.name — without it the association, a load-bearing part of the address lifecycle, was invisible except through -o yaml. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
1 parent 9bda93d commit ec27db3

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎api/v1alpha1/ipaddress_types.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ type IPAddressStatus struct {
164164
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
165165
// +kubebuilder:printcolumn:name="ClaimNamespace",type=string,JSONPath=`.spec.claimRef.namespace`
166166
// +kubebuilder:printcolumn:name="Claim",type=string,JSONPath=`.spec.claimRef.name`
167+
// +kubebuilder:printcolumn:name="AttachedTo",type=string,JSONPath=`.status.associatedTo.name`
167168
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
168169

169170
// IPAddress is a concrete address the cluster owns — the inventory object,

‎chart/address-controller/crds/local.sdn.cozystack.io_ipaddresses.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ spec:
3030
- jsonPath: .spec.claimRef.name
3131
name: Claim
3232
type: string
33+
- jsonPath: .status.associatedTo.name
34+
name: AttachedTo
35+
type: string
3336
- jsonPath: .metadata.creationTimestamp
3437
name: Age
3538
type: date

0 commit comments

Comments
 (0)