Skip to content

Commit

Permalink
Merge pull request #1683 from sratslla/i1326
Browse files Browse the repository at this point in the history
feat: Added column in ksp and hsp -owide
  • Loading branch information
daemon1024 authored Mar 15, 2024
2 parents 963ed83 + 60da0d7 commit fee50c9
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 9 deletions.
14 changes: 13 additions & 1 deletion deployments/CRD/KubeArmorHostPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,19 @@ spec:
singular: kubearmorhostpolicy
scope: Cluster
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .spec.action
name: Action
priority: 10
type: string
- jsonPath: .spec.nodeSelector.matchLabels
name: Selector
priority: 10
type: string
name: v1
schema:
openAPIV3Schema:
description: KubeArmorHostPolicy is the Schema for the kubearmorhostpolicies
Expand Down
14 changes: 13 additions & 1 deletion deployments/CRD/KubeArmorPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,19 @@ spec:
singular: kubearmorpolicy
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .spec.action
name: Action
priority: 10
type: string
- jsonPath: .spec.selector.matchLabels
name: Selector
priority: 10
type: string
name: v1
schema:
openAPIV3Schema:
description: KubeArmorPolicy is the Schema for the kubearmorpolicies API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ type KubeArmorHostPolicyStatus struct {
// +genclient:nonNamespaced
// +kubebuilder:resource:scope=Cluster,shortName=hsp
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +kubebuilder:printcolumn:name="Action",type=string,JSONPath=`.spec.action`,priority=10
// +kubebuilder:printcolumn:name="Selector",type=string,JSONPath=`.spec.nodeSelector.matchLabels`,priority=10
type KubeArmorHostPolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ type KubeArmorPolicyStatus struct {
// +genclient
// +kubebuilder:resource:shortName=ksp
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +kubebuilder:printcolumn:name="Action",type=string,JSONPath=`.spec.action`,priority=10
// +kubebuilder:printcolumn:name="Selector",type=string,JSONPath=`.spec.selector.matchLabels`,priority=10
type KubeArmorPolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: kubearmorhostpolicies.security.kubearmor.com
spec:
Expand All @@ -18,7 +18,19 @@ spec:
singular: kubearmorhostpolicy
scope: Cluster
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .spec.action
name: Action
priority: 10
type: string
- jsonPath: .spec.nodeSelector.matchLabels
name: Selector
priority: 10
type: string
name: v1
schema:
openAPIV3Schema:
description: KubeArmorHostPolicy is the Schema for the kubearmorhostpolicies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: kubearmorpolicies.security.kubearmor.com
spec:
Expand All @@ -18,7 +18,19 @@ spec:
singular: kubearmorpolicy
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .spec.action
name: Action
priority: 10
type: string
- jsonPath: .spec.selector.matchLabels
name: Selector
priority: 10
type: string
name: v1
schema:
openAPIV3Schema:
description: KubeArmorPolicy is the Schema for the kubearmorpolicies API
Expand Down
14 changes: 13 additions & 1 deletion pkg/KubeArmorController/crd/KubeArmorHostPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,19 @@ spec:
singular: kubearmorhostpolicy
scope: Cluster
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .spec.action
name: Action
priority: 10
type: string
- jsonPath: .spec.nodeSelector.matchLabels
name: Selector
priority: 10
type: string
name: v1
schema:
openAPIV3Schema:
description: KubeArmorHostPolicy is the Schema for the kubearmorhostpolicies
Expand Down
16 changes: 14 additions & 2 deletions pkg/KubeArmorController/crd/KubeArmorPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: kubearmorpolicies.security.kubearmor.com
spec:
Expand All @@ -18,7 +18,19 @@ spec:
singular: kubearmorpolicy
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .spec.action
name: Action
priority: 10
type: string
- jsonPath: .spec.selector.matchLabels
name: Selector
priority: 10
type: string
name: v1
schema:
openAPIV3Schema:
description: KubeArmorPolicy is the Schema for the kubearmorpolicies API
Expand Down

0 comments on commit fee50c9

Please sign in to comment.