Skip to content

Commit

Permalink
update short names, scope
Browse files Browse the repository at this point in the history
  • Loading branch information
realshuting committed Dec 1, 2020
1 parent 2ec5a0f commit 45dd5b7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions charts/kyverno/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2374,6 +2374,8 @@ spec:
kind: ReportChangeRequest
listKind: ReportChangeRequestList
plural: reportchangerequests
shortNames:
- rcr
singular: reportchangerequest
scope: Namespaced
versions:
Expand Down
4 changes: 1 addition & 3 deletions definitions/crds/kyverno.io_clusterreportchangerequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ spec:
kind: ClusterReportChangeRequest
listKind: ClusterReportChangeRequestList
plural: clusterreportchangerequests
shortNames:
- crcr
singular: clusterreportchangerequest
scope: Namespaced
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .scope.kind
Expand Down
3 changes: 2 additions & 1 deletion pkg/api/kyverno/v1alpha1/clusterreportchangerequest_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +genclient:nonNamespaced
// +kubebuilder:object:root=true
// +kubebuilder:resource:path=clusterreportchangerequests,scope="Cluster"
// +kubebuilder:resource:path=clusterreportchangerequests
// +kubebuilder:printcolumn:name="Kind",type=string,JSONPath=`.scope.kind`,priority=1
// +kubebuilder:printcolumn:name="Name",type=string,JSONPath=`.scope.name`,priority=1
// +kubebuilder:printcolumn:name="Pass",type=integer,JSONPath=`.summary.pass`
Expand All @@ -40,6 +40,7 @@ import (
// +kubebuilder:printcolumn:name="Skip",type=integer,JSONPath=`.summary.skip`
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:resource:shortName=crcr
// +kubebuilder:resource:scope=Cluster
type ClusterReportChangeRequest struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down

0 comments on commit 45dd5b7

Please sign in to comment.