Skip to content

Commit

Permalink
Merge pull request #376 from Xieql/825-kubectl-display
Browse files Browse the repository at this point in the history
API: update kubectl display printcolumn
  • Loading branch information
kurator-bot authored Aug 28, 2023
2 parents a1f972b + 92a4e15 commit 20fd6ab
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 14 deletions.
21 changes: 20 additions & 1 deletion docs/content/en/references/apps_v1alpha1_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
<h2 id="apps.kurator.dev/v1alpha1">apps.kurator.dev/v1alpha1</h2>
<p>Package v1alpha1 contains API Schema definitions for the apps v1alpha1 API group</p>
Resource Types:
<ul class="simple"></ul>
<ul class="simple"><li>
<a href="#apps.kurator.dev/v1alpha1.Application">Application</a>
</li></ul>
<h3 id="apps.kurator.dev/v1alpha1.Application">Application
</h3>
<p>Application is the schema for the application&rsquo;s API.</p>
Expand All @@ -23,6 +25,23 @@ <h3 id="apps.kurator.dev/v1alpha1.Application">Application
<tbody>
<tr>
<td>
<code>apiVersion</code><br>
string</td>
<td>
<code>apps.kurator.dev/v1alpha1</code>
</td>
</tr>
<tr>
<td>
<code>kind</code><br>
string
</td>
<td>
<code>Application</code>
</td>
</tr>
<tr>
<td>
<code>metadata</code><br>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#objectmeta-v1-meta">
Expand Down
4 changes: 1 addition & 3 deletions docs/content/en/references/infra_v1alpha1_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,7 @@ <h3 id="infrastructure.cluster.x-k8s.io/v1alpha1.CustomMachineStatus">CustomMach
</em>
</td>
<td>
<p>TODO: add state.
TODO: display with kubectl
Indicate whether the machines are ready.</p>
<p>Indicate whether the machines are ready.</p>
</td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Indicates if the AttachedClusters are ready
- description: Indicates if the AttachedCluster is ready
jsonPath: .status.ready
name: Ready
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
- additionalPrinterColumns:
- description: Represents the current phase of customCluster actuation.
jsonPath: .status.phase
name: Ready
name: Phase
type: string
name: v1alpha1
schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ spec:
singular: custommachine
scope: Namespaced
versions:
- name: v1alpha1
- additionalPrinterColumns:
- description: Indicates if the CustomMachine is ready.
jsonPath: .status.ready
name: Ready
type: boolean
name: v1alpha1
schema:
openAPIV3Schema:
description: CustomMachine is the schema for kubernetes nodes.
Expand Down Expand Up @@ -182,8 +187,7 @@ spec:
description: Current status of the machine.
properties:
ready:
description: 'TODO: add state. TODO: display with kubectl Indicate
whether the machines are ready.'
description: Indicate whether the machines are ready.
type: boolean
type: object
type: object
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/apps/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Namespaced,categories=kurator-dev
// +kubebuilder:subresource:status
//

// Application is the schema for the application's API.
type Application struct {
metav1.TypeMeta `json:",inline"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/cluster/v1alpha1/attached_cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Namespaced,categories=kurator-dev
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Ready",type="boolean",JSONPath=".status.ready",description="Indicates if the AttachedClusters are ready"
// +kubebuilder:printcolumn:name="Ready",type="boolean",JSONPath=".status.ready",description="Indicates if the AttachedCluster is ready"

// AttachedCluster is the schema for the external cluster that are not created by kurator.
type AttachedCluster struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/infra/v1alpha1/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
// +kubebuilder:object:root=true
// +kubebuilder:resource:path=customclusters,shortName=cc
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.phase",description="Represents the current phase of customCluster actuation."
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Represents the current phase of customCluster actuation."

// CustomCluster represents the parameters for a cluster in supplement of Cluster API.
type CustomCluster struct {
Expand Down
3 changes: 1 addition & 2 deletions pkg/apis/infra/v1alpha1/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
// +kubebuilder:object:root=true
// +kubebuilder:resource:path=custommachines
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Ready",type="boolean",JSONPath=".status.ready",description="Indicates if the CustomMachine is ready."

// CustomMachine is the schema for kubernetes nodes.
type CustomMachine struct {
Expand All @@ -49,8 +50,6 @@ type CustomMachineSpec struct {

// CustomMachineStatus represents the current status of the machine.
type CustomMachineStatus struct {
// TODO: add state.
// TODO: display with kubectl
// Indicate whether the machines are ready.
Ready *bool `json:"ready,omitempty"`
}
Expand Down

0 comments on commit 20fd6ab

Please sign in to comment.