Skip to content

Commit b2b3f7a

Browse files
committed
add spec.suspend to Kustomization printer columns
Signed-off-by: Jakob Schrettenbrunner <[email protected]>
1 parent 0d6f5af commit b2b3f7a

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

api/v1beta1/kustomization_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,9 @@ const (
332332
// +kubebuilder:resource:shortName=ks
333333
// +kubebuilder:subresource:status
334334
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",description=""
335-
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].message",description=""
335+
// +kubebuilder:printcolumn:name="Suspend",type="string",JSONPath=".spec.suspend"
336336
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""
337+
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].message",description=""
337338

338339
// Kustomization is the Schema for the kustomizations API.
339340
type Kustomization struct {

api/v1beta2/kustomization_types.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ limitations under the License.
1717
package v1beta2
1818

1919
import (
20-
apimeta "k8s.io/apimachinery/pkg/api/meta"
2120
"time"
2221

2322
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
23+
apimeta "k8s.io/apimachinery/pkg/api/meta"
2424
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2525
"k8s.io/apimachinery/pkg/types"
2626

@@ -327,8 +327,9 @@ func (in *Kustomization) GetStatusConditions() *[]metav1.Condition {
327327
// +kubebuilder:resource:shortName=ks
328328
// +kubebuilder:subresource:status
329329
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",description=""
330-
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].message",description=""
330+
// +kubebuilder:printcolumn:name="Suspend",type="string",JSONPath=".spec.suspend"
331331
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""
332+
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].message",description=""
332333

333334
// Kustomization is the Schema for the kustomizations API.
334335
type Kustomization struct {

config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@ spec:
2222
- jsonPath: .status.conditions[?(@.type=="Ready")].status
2323
name: Ready
2424
type: string
25-
- jsonPath: .status.conditions[?(@.type=="Ready")].message
26-
name: Status
25+
- jsonPath: .spec.suspend
26+
name: Suspend
2727
type: string
2828
- jsonPath: .metadata.creationTimestamp
2929
name: Age
3030
type: date
31+
- jsonPath: .status.conditions[?(@.type=="Ready")].message
32+
name: Status
33+
type: string
3134
name: v1beta1
3235
schema:
3336
openAPIV3Schema:
@@ -557,12 +560,15 @@ spec:
557560
- jsonPath: .status.conditions[?(@.type=="Ready")].status
558561
name: Ready
559562
type: string
560-
- jsonPath: .status.conditions[?(@.type=="Ready")].message
561-
name: Status
563+
- jsonPath: .spec.suspend
564+
name: Suspend
562565
type: string
563566
- jsonPath: .metadata.creationTimestamp
564567
name: Age
565568
type: date
569+
- jsonPath: .status.conditions[?(@.type=="Ready")].message
570+
name: Status
571+
type: string
566572
name: v1beta2
567573
schema:
568574
openAPIV3Schema:

0 commit comments

Comments
 (0)