mirror of
https://github.com/siderolabs/sidero.git
synced 2026-05-06 04:46:29 +02:00
feat: additional printer colums
Add additional printer columns Signed-off-by: Noel Georgi <git@frezbo.dev>
This commit is contained in:
parent
189793e47f
commit
025ff047d0
@ -31,6 +31,7 @@ type MetalClusterStatus struct {
|
||||
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this MetalCluster belongs"
|
||||
// +kubebuilder:printcolumn:name="Ready",type="boolean",JSONPath=".status.ready"
|
||||
// +kubebuilder:printcolumn:name="Endpoint",type="string",priority=1,JSONPath=".spec.controlPlaneEndpoint.host",description="Control Plane Endpoint"
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="The age of this resource"
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:subresource:status
|
||||
|
||||
|
||||
@ -76,6 +76,7 @@ type MetalMachineStatus struct {
|
||||
// +kubebuilder:printcolumn:name="Cluster",type="string",priority=1,JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this MetalMachine belongs"
|
||||
// +kubebuilder:printcolumn:name="Machine",type="string",priority=1,JSONPath=".metadata.ownerReferences[?(@.kind==\"Machine\")].name",description="Machine object to which this MetalMachine belongs"
|
||||
// +kubebuilder:printcolumn:name="Server",type="string",priority=1,JSONPath=".spec.serverRef.name",description="Server ID"
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="The age of this resource"
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:subresource:status
|
||||
|
||||
|
||||
@ -44,6 +44,7 @@ type ServerBindingState struct {
|
||||
// +kubebuilder:printcolumn:name="ServerClass",type="string",priority=1,JSONPath=".spec.serverClassRef.name",description="Server Class"
|
||||
// +kubebuilder:printcolumn:name="MetalMachine",type="string",priority=1,JSONPath=".spec.metalMachineRef.name",description="Metal Machine"
|
||||
// +kubebuilder:printcolumn:name="Cluster",type="string",priority=1,JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this ServerBinding belongs"
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="The age of this resource"
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:subresource:status
|
||||
|
||||
|
||||
@ -95,6 +95,10 @@ spec:
|
||||
name: Endpoint
|
||||
priority: 1
|
||||
type: string
|
||||
- description: The age of this resource
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1alpha3
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
||||
@ -165,6 +165,10 @@ spec:
|
||||
name: Server
|
||||
priority: 1
|
||||
type: string
|
||||
- description: The age of this resource
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1alpha3
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
||||
@ -41,6 +41,10 @@ spec:
|
||||
name: Cluster
|
||||
priority: 1
|
||||
type: string
|
||||
- description: The age of this resource
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1alpha3
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
||||
@ -53,6 +53,7 @@ type EnvironmentStatus struct {
|
||||
// +kubebuilder:printcolumn:name="Kernel",type="string",JSONPath=".spec.kernel.url",description="the kernel for the environment"
|
||||
// +kubebuilder:printcolumn:name="Initrd",type="string",JSONPath=".spec.initrd.url",description="the initrd for the environment"
|
||||
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",description="indicates the readiness of the environment"
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="The age of this resource"
|
||||
|
||||
// Environment is the Schema for the environments API.
|
||||
type Environment struct {
|
||||
|
||||
@ -192,11 +192,13 @@ type ServerStatus struct {
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:resource:scope=Cluster
|
||||
// +kubebuilder:printcolumn:name="Hostname",type="string",JSONPath=".spec.hostname",description="server hostname"
|
||||
// +kubebuilder:printcolumn:name="BMC IP",type="string",priority=1,JSONPath=".spec.bmc.endpoint",description="BMC IP"
|
||||
// +kubebuilder:printcolumn:name="Accepted",type="boolean",JSONPath=".spec.accepted",description="indicates if the server is accepted"
|
||||
// +kubebuilder:printcolumn:name="Cordoned",type="boolean",JSONPath=".spec.cordoned",description="indicates if the server is cordoned"
|
||||
// +kubebuilder:printcolumn:name="Allocated",type="boolean",JSONPath=".status.inUse",description="indicates that the server has been allocated"
|
||||
// +kubebuilder:printcolumn:name="Clean",type="boolean",JSONPath=".status.isClean",description="indicates if the server is clean or not"
|
||||
// +kubebuilder:printcolumn:name="Power",type="string",JSONPath=".status.power",description="display the current power status"
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="The age of this resource"
|
||||
|
||||
// Server is the Schema for the servers API.
|
||||
type Server struct {
|
||||
|
||||
@ -50,6 +50,7 @@ type ServerClassStatus struct {
|
||||
// +kubebuilder:resource:scope=Cluster
|
||||
// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.serversAvailable",description="the number of available servers"
|
||||
// +kubebuilder:printcolumn:name="In Use",type="string",JSONPath=".status.serversInUse",description="the number of servers in use"
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="The age of this resource"
|
||||
|
||||
// ServerClass is the Schema for the serverclasses API.
|
||||
type ServerClass struct {
|
||||
|
||||
@ -29,6 +29,10 @@ spec:
|
||||
jsonPath: .status.conditions[?(@.type=="Ready")].status
|
||||
name: Ready
|
||||
type: string
|
||||
- description: The age of this resource
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
||||
@ -25,6 +25,10 @@ spec:
|
||||
jsonPath: .status.serversInUse
|
||||
name: In Use
|
||||
type: string
|
||||
- description: The age of this resource
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
||||
@ -21,6 +21,11 @@ spec:
|
||||
jsonPath: .spec.hostname
|
||||
name: Hostname
|
||||
type: string
|
||||
- description: BMC IP
|
||||
jsonPath: .spec.bmc.endpoint
|
||||
name: BMC IP
|
||||
priority: 1
|
||||
type: string
|
||||
- description: indicates if the server is accepted
|
||||
jsonPath: .spec.accepted
|
||||
name: Accepted
|
||||
@ -41,6 +46,10 @@ spec:
|
||||
jsonPath: .status.power
|
||||
name: Power
|
||||
type: string
|
||||
- description: The age of this resource
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user