Skip to content

Commit

Permalink
Merge pull request #244 from troy0820/troy0820/fix-printer-column-out…
Browse files Browse the repository at this point in the history
…puts

fix printer columns
  • Loading branch information
troy0820 authored Aug 9, 2023
2 parents 4232163 + a67c5c2 commit c62b916
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
9 changes: 4 additions & 5 deletions api/v1/installation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,10 @@ type InstallationStatus struct {
// +kubebuilder:subresource:status

// Installation is the Schema for the installations API
// +kubebuilder:printcolumn:name="Namespace",type="string",JSONPath=".metadata.Namespace"
// +kubebuilder:printcolumn:name="Porter Namespace",type="string",JSONPath=".spec.Namespace"
// +kubebuilder:printcolumn:name="Name",type="string",JSONPath=".spec.Name"
// +kubebuilder:printcolumn:name="Last Action",type="string",JSONPath=".status.PorterResourceStatus.Action"
// +kubebuilder:printcolumn:name="Last Status",type="string",JSONPath=".status.PorterResourceStatus.Phase"
// +kubebuilder:printcolumn:name="Porter Name",type="string",JSONPath=".spec.name"
// +kubebuilder:printcolumn:name="Porter Namespace",type="string",JSONPath=".spec.namespace"
// +kubebuilder:printcolumn:name="Last Action",type="string",JSONPath=".status.action.name"
// +kubebuilder:printcolumn:name="Last Status",type="string",JSONPath=".status.phase"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
type Installation struct {
metav1.TypeMeta `json:",inline"`
Expand Down
13 changes: 5 additions & 8 deletions config/crd/bases/getporter.org_installations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,16 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .metadata.Namespace
name: Namespace
- jsonPath: .spec.name
name: Porter Name
type: string
- jsonPath: .spec.Namespace
- jsonPath: .spec.namespace
name: Porter Namespace
type: string
- jsonPath: .spec.Name
name: Name
type: string
- jsonPath: .status.PorterResourceStatus.Action
- jsonPath: .status.action.name
name: Last Action
type: string
- jsonPath: .status.PorterResourceStatus.Phase
- jsonPath: .status.phase
name: Last Status
type: string
- jsonPath: .metadata.creationTimestamp
Expand Down

0 comments on commit c62b916

Please sign in to comment.