1
0
Fork 0
mirror of https://github.com/kyverno/policy-reporter.git synced 2024-12-14 11:57:32 +00:00
policy-reporter/cmd/send.go

28 lines
647 B
Go
Raw Normal View History

package cmd
import (
"flag"
"github.com/spf13/cobra"
"github.com/kyverno/policy-reporter/cmd/send"
)
func newSendCMD() *cobra.Command {
cmd := &cobra.Command{
Use: "send",
Short: "Send different kinds of email reports",
}
// For local usage
cmd.PersistentFlags().StringP("kubeconfig", "k", "", "absolute path to the kubeconfig file")
cmd.PersistentFlags().StringP("config", "c", "", "target configuration file")
cmd.PersistentFlags().StringP("template-dir", "t", "./templates", "template directory for email reports")
cmd.AddCommand(send.NewSummaryCMD())
cmd.AddCommand(send.NewViolationsCMD())
flag.Parse()
return cmd
}