Skip to content

Commit

Permalink
Add additionalPrinterColumns for status and age (#1217)
Browse files Browse the repository at this point in the history
* Add additionalPrinterColumns for status and age
Signed-off-by: Karel Vanden Houte <[email protected]>

* Add synced column
Signed-off-by: Karel Vanden Houte <[email protected]>

* Make manifests
Signed-off-by: Karel Vanden Houte <[email protected]>
  • Loading branch information
kvandenhoute authored May 18, 2023
1 parent 682b211 commit 313ab87
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
15 changes: 12 additions & 3 deletions helm/sealed-secrets/crds/bitnami.com_sealedsecrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: sealedsecrets.bitnami.com
spec:
group: bitnami.com
Expand All @@ -14,7 +13,17 @@ spec:
singular: sealedsecret
scope: Namespaced
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .status.conditions[0].message
name: Status
type: string
- jsonPath: .status.conditions[0].status
name: Synced
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: SealedSecret is the K8s representation of a "sealed Secret" -
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/sealedsecrets/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ type SealedSecretStatus struct {

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[0].message"
// +kubebuilder:printcolumn:name="Synced",type="string",JSONPath=".status.conditions[0].status"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// +genclient

// SealedSecret is the K8s representation of a "sealed Secret" - a
Expand Down

0 comments on commit 313ab87

Please sign in to comment.