Skip to content

Commit

Permalink
feat: update clusterscans and customchecks short names
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusfm committed Aug 19, 2023
1 parent 30bf280 commit a2bded8
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions api/zora/v1alpha1/clusterscan_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ type PluginScanStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:shortName="cscan"
//+kubebuilder:resource:shortName={scan,scans}
//+kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".spec.clusterRef.name",priority=0
//+kubebuilder:printcolumn:name="Schedule",type="string",JSONPath=".spec.schedule",priority=0
//+kubebuilder:printcolumn:name="Suspend",type="boolean",JSONPath=".status.suspend",priority=0
Expand All @@ -243,8 +243,8 @@ type PluginScanStatus struct {
//+kubebuilder:printcolumn:name="Last Successful",type="date",JSONPath=".status.lastSuccessfulTime",priority=0
//+kubebuilder:printcolumn:name="Issues",type="integer",JSONPath=".status.totalIssues",priority=0
//+kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",priority=0
//+kubebuilder:printcolumn:name="SaaS",type="string",JSONPath=".status.conditions[?(@.type==\"SaaS\")].reason",priority=0
//+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",priority=0
//+kubebuilder:printcolumn:name="SaaS",type="string",JSONPath=".status.conditions[?(@.type==\"SaaS\")].reason",priority=1
//+kubebuilder:printcolumn:name="Next Schedule",type="string",JSONPath=".status.nextScheduleTime",priority=1

// ClusterScan is the Schema for the clusterscans API
Expand Down
2 changes: 1 addition & 1 deletion api/zora/v1alpha1/customcheck_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type CustomCheckStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:shortName="checks"
//+kubebuilder:resource:shortName={check,checks}
//+kubebuilder:printcolumn:name="Message",type="string",JSONPath=".spec.message",priority=0
//+kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".spec.severity",priority=0
//+kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",priority=0
Expand Down
10 changes: 6 additions & 4 deletions charts/zora/crds/zora.undistro.io_clusterscans.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ spec:
listKind: ClusterScanList
plural: clusterscans
shortNames:
- cscan
- scan
- scans
singular: clusterscan
scope: Namespaced
versions:
Expand Down Expand Up @@ -59,12 +60,13 @@ spec:
- jsonPath: .status.conditions[?(@.type=="Ready")].status
name: Ready
type: string
- jsonPath: .status.conditions[?(@.type=="SaaS")].reason
name: SaaS
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .status.conditions[?(@.type=="SaaS")].reason
name: SaaS
priority: 1
type: string
- jsonPath: .status.nextScheduleTime
name: Next Schedule
priority: 1
Expand Down
1 change: 1 addition & 0 deletions charts/zora/crds/zora.undistro.io_customchecks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
listKind: CustomCheckList
plural: customchecks
shortNames:
- check
- checks
singular: customcheck
scope: Namespaced
Expand Down
10 changes: 6 additions & 4 deletions config/crd/bases/zora.undistro.io_clusterscans.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ spec:
listKind: ClusterScanList
plural: clusterscans
shortNames:
- cscan
- scan
- scans
singular: clusterscan
scope: Namespaced
versions:
Expand Down Expand Up @@ -45,12 +46,13 @@ spec:
- jsonPath: .status.conditions[?(@.type=="Ready")].status
name: Ready
type: string
- jsonPath: .status.conditions[?(@.type=="SaaS")].reason
name: SaaS
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .status.conditions[?(@.type=="SaaS")].reason
name: SaaS
priority: 1
type: string
- jsonPath: .status.nextScheduleTime
name: Next Schedule
priority: 1
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/zora.undistro.io_customchecks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
listKind: CustomCheckList
plural: customchecks
shortNames:
- check
- checks
singular: customcheck
scope: Namespaced
Expand Down

0 comments on commit a2bded8

Please sign in to comment.