Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ClusterContextFlag = flag.Flag{ Name: "context", ConfigName: "kubernetes.context", Default: "", Usage: "specify a context to scan", Aliases: []flag.Alias{ {Name: "ctx"}, }, } K8sNamespaceFlag = flag.Flag{ Name: "namespace", ConfigName: "kubernetes.namespace", Shorthand: "n", Default: "", Usage: "specify a namespace to scan", } KubeConfigFlag = flag.Flag{ Name: "kubeconfig", ConfigName: "kubernetes.kubeconfig", Default: "", Usage: "specify the kubeconfig file path to use", } ComponentsFlag = flag.Flag{ Name: "components", ConfigName: "kubernetes.components", Default: []string{ "workload", "infra", }, Values: []string{ "workload", "infra", }, Usage: "specify which components to scan", } ParallelFlag = flag.Flag{ Name: "parallel", ConfigName: "kubernetes.parallel", Default: 5, Usage: "number (between 1-20) of goroutines enabled for parallel scanning", } TolerationsFlag = flag.Flag{ Name: "tolerations", ConfigName: "kubernetes.tolerations", Default: []string{}, Usage: "specify node-collector job tolerations (example: key1=value1:NoExecute,key2=value2:NoSchedule)", } AllNamespaces = flag.Flag{ Name: "all-namespaces", ConfigName: "kubernetes.all.namespaces", Shorthand: "A", Default: false, Usage: "fetch resources from all cluster namespaces", } NodeCollectorNamespace = flag.Flag{ Name: "node-collector-namespace", ConfigName: "node.collector.namespace", Default: "trivy-temp", Usage: "specify the namespace in which the node-collector job should be deployed", } ExcludeNodes = flag.Flag{ Name: "exclude-nodes", ConfigName: "exclude.nodes", Default: []string{}, Usage: "indicate the node labels that the node-collector job should exclude from scanning (example: kubernetes.io/arch:arm64,team:dev)", } )
Functions ¶
This section is empty.
Types ¶
type Flags ¶
type Flags struct { flag.Flags GlobalFlagGroup *flag.GlobalFlagGroup K8sFlagGroup *K8sFlagGroup }
func (*Flags) Groups ¶
func (f *Flags) Groups() flag.FlagGroups
type K8sFlagGroup ¶
type K8sFlagGroup struct { ClusterContext *flag.Flag Namespace *flag.Flag KubeConfig *flag.Flag Components *flag.Flag Parallel *flag.Flag Tolerations *flag.Flag AllNamespaces *flag.Flag NodeCollectorNamespace *flag.Flag ExcludeNodes *flag.Flag }
func NewK8sFlagGroup ¶
func NewK8sFlagGroup() *K8sFlagGroup
func (*K8sFlagGroup) Flags ¶
func (f *K8sFlagGroup) Flags() []*flag.Flag
func (*K8sFlagGroup) Name ¶
func (f *K8sFlagGroup) Name() string
func (*K8sFlagGroup) ToOptions ¶
func (f *K8sFlagGroup) ToOptions() (K8sOptions, error)
type K8sOptions ¶
type Options ¶
type Options struct { flag.Options K8sOptions }
Click to show internal directories.
Click to hide internal directories.