1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

Fix typo, add short names (#1344)

* fix typo

* add short names for report change request
This commit is contained in:
shuting 2020-11-30 23:26:49 -08:00 committed by GitHub
parent c22d97a871
commit 370828afec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 2891 additions and 898 deletions

File diff suppressed because it is too large Load diff

View file

@ -13,8 +13,10 @@ spec:
kind: ClusterReportChangeRequest
listKind: ClusterReportChangeRequestList
plural: clusterreportchangerequests
shortNames:
- crcr
singular: clusterreportchangerequest
scope: Cluster
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .scope.kind

View file

@ -13,6 +13,8 @@ spec:
kind: ReportChangeRequest
listKind: ReportChangeRequestList
plural: reportchangerequests
shortNames:
- rcr
singular: reportchangerequest
scope: Namespaced
versions:

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -25,6 +25,7 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// ClusterReportChangeRequest is the Schema for the ClusterReportChangeRequests API
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +genclient:nonNamespaced
@ -38,8 +39,7 @@ import (
// +kubebuilder:printcolumn:name="Error",type=integer,JSONPath=`.summary.error`
// +kubebuilder:printcolumn:name="Skip",type=integer,JSONPath=`.summary.skip`
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// ClusterReportChangeRequest is the Schema for the ClusterReportChangeRequests API
// +kubebuilder:resource:shortName=crcr
type ClusterReportChangeRequest struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

View file

@ -25,6 +25,7 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// ReportChangeRequest is the Schema for the ReportChangeRequests API
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true
@ -36,8 +37,7 @@ import (
// +kubebuilder:printcolumn:name="Error",type=integer,JSONPath=`.summary.error`
// +kubebuilder:printcolumn:name="Skip",type=integer,JSONPath=`.summary.skip`
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// ReportChangeRequest is the Schema for the ReportChangeRequests API
// +kubebuilder:resource:shortName=rcr
type ReportChangeRequest struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

View file

@ -28,7 +28,7 @@ const (
//Controller manages life-cycle of generate-requests
type Controller struct {
// dyanmic client implementation
// dynamic client implementation
client *dclient.Client
// typed client for kyverno CRDs
kyvernoClient *kyvernoclient.Clientset
@ -49,7 +49,7 @@ type Controller struct {
pSynced cache.InformerSynced
// grSynced returns true if the generate request store has been synced at least once
grSynced cache.InformerSynced
// dyanmic sharedinformer factory
// dynamic sharedinformer factory
dynamicInformer dynamicinformer.DynamicSharedInformerFactory
//TODO: list of generic informers
// only support Namespaces for deletion of resource

View file

@ -51,9 +51,9 @@ func NewResourceCache(log logr.Logger, config *rest.Config, dclient *dclient.Cli
updateGVRCacheForConfigMap(resCache)
}
} else {
err := udateGVRCache(logger, resCache, discoveryIface)
err := updateGVRCache(logger, resCache, discoveryIface)
if err != nil {
logger.Error(err, "error in udateGVRCache function")
logger.Error(err, "error in updateGVRCache function")
return nil, err
}
}
@ -73,7 +73,7 @@ func updateGVRCacheForConfigMap(resc *ResourceCache) {
resc.GVRCacheData["configmaps"] = gvrc
}
func udateGVRCache(log logr.Logger, resc *ResourceCache, discoveryIface discovery.CachedDiscoveryInterface) error {
func updateGVRCache(log logr.Logger, resc *ResourceCache, discoveryIface discovery.CachedDiscoveryInterface) error {
serverResources, err := discoveryIface.ServerPreferredResources()
if err != nil {
return err