You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pushKyvernoPoliciesCmd.PersistentFlags().StringVarP(&pushKyvernoPoliciesSubDir, "push-kyverno-policies-subdirectory", "s", defaultPushKyvernoPoliciesSubDir, "Sub-directory within push-directory, to contain Kyverno policies.")
34
32
pushKyvernoPoliciesCmd.PersistentFlags().StringSliceVarP(&pushSpecificPolicies, "policies", "p", []string{}, "Specific policy names to push (e.g., require-labels,disallow-privileged). If not specified, all policies will be pushed.")
35
-
pushKyvernoPoliciesCmd.PersistentFlags().BoolVar(&pushSkipValidation, "skip-validation", false, "Skip validation before pushing (not recommended).")
36
-
pushKyvernoPoliciesCmd.PersistentFlags().BoolVar(&pushForce, "force", false, "Force push even if validation fails (use with extreme caution).")
37
33
pushCmd.AddCommand(pushKyvernoPoliciesCmd)
38
34
}
39
35
40
36
varpushKyvernoPoliciesCmd=&cobra.Command{
41
37
Use: "kyverno-policies [-p policy1,policy2]",
42
38
Short: "Push Kyverno policies from local files to Insights.",
43
-
Long: "Push Kyverno policies from local files to Insights. This command automatically validates all policies before pushing. If ANY validation fails, the push operation is aborted unless --force is used.",
39
+
Long: "Push Kyverno policies from local files to Insights. We recommend validating policies before pushing. For validating you need to provide samples in the form of .success.yaml and .failure.yaml files.",
44
40
Example: `
45
41
# Push all policies from the default subdirectory
46
42
insights-cli push kyverno-policies
@@ -108,62 +104,6 @@ var pushKyvernoPoliciesCmd = &cobra.Command{
108
104
return
109
105
}
110
106
111
-
// Validate policies before pushing (unless skipped or forced)
112
-
if!pushSkipValidation {
113
-
logrus.Info("Validating policies before push...")
114
-
115
-
// Discover all policies and test cases for validation
0 commit comments