mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 07:10:41 -08:00
feat(k8s): add --context flag (#2171)
Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
This commit is contained in:
@@ -6,14 +6,16 @@ import (
|
||||
|
||||
// KubernetesOption holds the options for Kubernetes scanning
|
||||
type KubernetesOption struct {
|
||||
Namespace string
|
||||
ReportFormat string
|
||||
ClusterContext string
|
||||
Namespace string
|
||||
ReportFormat string
|
||||
}
|
||||
|
||||
// NewKubernetesOption is the factory method to return Kubernetes options
|
||||
func NewKubernetesOption(c *cli.Context) KubernetesOption {
|
||||
return KubernetesOption{
|
||||
Namespace: c.String("namespace"),
|
||||
ReportFormat: c.String("report"),
|
||||
ClusterContext: c.String("context"),
|
||||
Namespace: c.String("namespace"),
|
||||
ReportFormat: c.String("report"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user