Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit 9b78e6a

Browse files
committed
Add additionalPrinterColumns for custom resources
1 parent 0ae2170 commit 9b78e6a

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

api/v1beta1/scalewaycluster_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ type NetworkStatus struct {
328328

329329
//+kubebuilder:object:root=true
330330
//+kubebuilder:subresource:status
331+
//+kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".spec.controlPlaneEndpoint",description="Endpoint of the control plane"
332+
//+kubebuilder:printcolumn:name="Region",type="string",JSONPath=".spec.region",description="Region of the cluster"
331333

332334
// ScalewayCluster is the Schema for the scalewayclusters API
333335
type ScalewayCluster struct {

api/v1beta1/scalewaymachine_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ type ScalewayMachineStatus struct {
7171

7272
//+kubebuilder:object:root=true
7373
//+kubebuilder:subresource:status
74+
//+kubebuilder:printcolumn:name="ProviderID",type="string",JSONPath=".spec.providerID",description="Provider ID"
75+
//+kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type",description="Type of instance"
7476

7577
// ScalewayMachine is the Schema for the scalewaymachines API
7678
type ScalewayMachine struct {

config/crd/bases/infrastructure.cluster.x-k8s.io_scalewayclusters.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,16 @@ spec:
1414
singular: scalewaycluster
1515
scope: Namespaced
1616
versions:
17-
- name: v1beta1
17+
- additionalPrinterColumns:
18+
- description: Endpoint of the control plane
19+
jsonPath: .spec.controlPlaneEndpoint
20+
name: Endpoint
21+
type: string
22+
- description: Region of the cluster
23+
jsonPath: .spec.region
24+
name: Region
25+
type: string
26+
name: v1beta1
1827
schema:
1928
openAPIV3Schema:
2029
description: ScalewayCluster is the Schema for the scalewayclusters API

config/crd/bases/infrastructure.cluster.x-k8s.io_scalewaymachines.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,16 @@ spec:
1414
singular: scalewaymachine
1515
scope: Namespaced
1616
versions:
17-
- name: v1beta1
17+
- additionalPrinterColumns:
18+
- description: Provider ID
19+
jsonPath: .spec.providerID
20+
name: ProviderID
21+
type: string
22+
- description: Type of instance
23+
jsonPath: .spec.type
24+
name: Type
25+
type: string
26+
name: v1beta1
1827
schema:
1928
openAPIV3Schema:
2029
description: ScalewayMachine is the Schema for the scalewaymachines API

0 commit comments

Comments
 (0)