Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit 8d016ae

Browse files
committed
#33 Add PrinterColumns for CascadingRules in kubectl
1 parent 7a02778 commit 8d016ae

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

operator/apis/cascading/v1/cascadingrule_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ type CascadingRuleStatus struct {
5959
}
6060

6161
// +kubebuilder:object:root=true
62+
// +kubebuilder:printcolumn:name="Starts",type=string,JSONPath=`.spec.scanSpec.scanType`,description="Which Scanner is started when the CascadingRule applies"
63+
// +kubebuilder:printcolumn:name="Invasiveness",type=string,JSONPath=`.metadata.labels.securecodebox\.io/invasive`,description="Indicates how invasive the Scanner is. Can be either 'invasive' or 'non-invasive'"
64+
// +kubebuilder:printcolumn:name="Intensiveness",type=string,JSONPath=`.metadata.labels.securecodebox\.io/intensive`,description="Indicates how much ressource the Scanner consumes. Can be either 'light' or 'medium'"
6265

6366
// CascadingRule is the Schema for the cascadingrules API
6467
type CascadingRule struct {

operator/config/crd/bases/cascading.experimental.securecodebox.io_cascadingrules.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,29 @@ metadata:
88
creationTimestamp: null
99
name: cascadingrules.cascading.experimental.securecodebox.io
1010
spec:
11+
additionalPrinterColumns:
12+
- JSONPath: .spec.scanSpec.scanType
13+
description: Which Scanner is started when the CascadingRule applies
14+
name: Starts
15+
type: string
16+
- JSONPath: .metadata.labels.securecodebox\.io/invasive
17+
description: Indicates how invasive the Scanner is. Can be either 'invasive' or
18+
'non-invasive'
19+
name: Invasiveness
20+
type: string
21+
- JSONPath: .metadata.labels.securecodebox\.io/intensive
22+
description: Indicates how much ressource the Scanner consumes. Can be either
23+
'light' or 'medium'
24+
name: Intensiveness
25+
type: string
1126
group: cascading.experimental.securecodebox.io
1227
names:
1328
kind: CascadingRule
1429
listKind: CascadingRuleList
1530
plural: cascadingrules
1631
singular: cascadingrule
1732
scope: Namespaced
33+
subresources: {}
1834
validation:
1935
openAPIV3Schema:
2036
description: CascadingRule is the Schema for the cascadingrules API

0 commit comments

Comments
 (0)