feat(k8s): add --context flag (#2171)

Signed-off-by: Jose Donizetti <jdbjunior@gmail.com>
This commit is contained in:
Jose Donizetti
2022-05-31 07:06:10 -03:00
committed by GitHub
parent 0e937b5367
commit e18f38af3c
5 changed files with 26 additions and 9 deletions

View File

@@ -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"),
}
}