Skip to content

Commit

Permalink
Added option for JSON output for karmor probe
Browse files Browse the repository at this point in the history
Signed-off-by: Aryan-sharma11 <aryan1126.sharma@gmail.com>
  • Loading branch information
Aryan-sharma11 committed Jun 28, 2023
1 parent b5edf3b commit ea39d08
Show file tree
Hide file tree
Showing 2 changed files with 203 additions and 71 deletions.
8 changes: 4 additions & 4 deletions cmd/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ and what KubeArmor features will be supported e.g: observability, enforcement, e
If KubeArmor is running, It probes which environment KubeArmor is running on (e.g: systemd mode, kubernetes etc.),
the supported KubeArmor features in the environment, the pods being handled by KubeArmor and the policies running on each of these pods`,
RunE: func(cmd *cobra.Command, args []string) error {
if err := probe.PrintProbeResult(client, probeInstallOptions); err != nil {
return err
}
return nil

err := probe.PrintProbeResult(client, probeInstallOptions)
return err

},
}
Expand All @@ -35,4 +34,5 @@ func init() {
probeCmd.Flags().StringVarP(&probeInstallOptions.Namespace, "namespace", "n", "kube-system", "Namespace for resources")
probeCmd.Flags().BoolVar(&probeInstallOptions.Full, "full", false, `If KubeArmor is not running, it deploys a daemonset to have access to more
information on KubeArmor support in the environment and deletes daemonset after probing`)
probeCmd.Flags().StringVarP(&probeInstallOptions.Output, "format", "f", "text", " Format: json or text ")
}
Loading

0 comments on commit ea39d08

Please sign in to comment.