mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-29 02:45:06 +00:00
Fix log message (#1779)
* update log message Signed-off-by: Shuting Zhao <shutting06@gmail.com> * update printer column - validation failure action Signed-off-by: Shuting Zhao <shutting06@gmail.com>
This commit is contained in:
parent
e2cd04c91f
commit
f3ca1d78f1
6 changed files with 7 additions and 7 deletions
|
@ -1165,7 +1165,7 @@ spec:
|
|||
name: Background
|
||||
type: string
|
||||
- jsonPath: .spec.validationFailureAction
|
||||
name: Validation Failure Action
|
||||
name: Action
|
||||
type: string
|
||||
name: v1
|
||||
schema:
|
||||
|
|
|
@ -23,7 +23,7 @@ spec:
|
|||
name: Background
|
||||
type: string
|
||||
- jsonPath: .spec.validationFailureAction
|
||||
name: Validation Failure Action
|
||||
name: Action
|
||||
type: string
|
||||
name: v1
|
||||
schema:
|
||||
|
|
|
@ -1170,7 +1170,7 @@ spec:
|
|||
name: Background
|
||||
type: string
|
||||
- jsonPath: .spec.validationFailureAction
|
||||
name: Validation Failure Action
|
||||
name: Action
|
||||
type: string
|
||||
name: v1
|
||||
schema:
|
||||
|
|
|
@ -1170,7 +1170,7 @@ spec:
|
|||
name: Background
|
||||
type: string
|
||||
- jsonPath: .spec.validationFailureAction
|
||||
name: Validation Failure Action
|
||||
name: Action
|
||||
type: string
|
||||
name: v1
|
||||
schema:
|
||||
|
|
|
@ -21,7 +21,7 @@ type PolicyList struct {
|
|||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:printcolumn:name="Background",type="string",JSONPath=".spec.background"
|
||||
// +kubebuilder:printcolumn:name="Validation Failure Action",type="string",JSONPath=".spec.validationFailureAction"
|
||||
// +kubebuilder:printcolumn:name="Action",type="string",JSONPath=".spec.validationFailureAction"
|
||||
// +kubebuilder:resource:shortName=pol
|
||||
type Policy struct {
|
||||
metav1.TypeMeta `json:",inline,omitempty" yaml:",inline,omitempty"`
|
||||
|
|
|
@ -153,10 +153,10 @@ func Validate(policy *kyverno.ClusterPolicy, client *dclient.Client, mock bool,
|
|||
obj.SetLabels(label)
|
||||
_, err = client.UpdateResource(obj.GetAPIVersion(), rule.Generation.Kind, rule.Generation.Clone.Namespace, obj, false)
|
||||
if err != nil {
|
||||
log.Log.Error(err, "failed to update source name:%v namespace:%v kind:%v", obj.GetName(), obj.GetNamespace(), obj.GetKind())
|
||||
log.Log.Error(err, "failed to update source", "kind", obj.GetKind(), "name", obj.GetName(), "namespace", obj.GetNamespace())
|
||||
continue
|
||||
}
|
||||
log.Log.V(4).Info("updated source name:%v namespace:%v kind:%v", obj.GetName(), obj.GetNamespace(), obj.GetKind())
|
||||
log.Log.V(4).Info("updated source", "kind", obj.GetKind(), "name", obj.GetName(), "namespace", obj.GetNamespace())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue