feat(k8s)!: node-collector dynamic commands support (#6861)

Signed-off-by: chenk <hen.keinan@gmail.com>
This commit is contained in:
chenk
2024-06-26 10:04:50 +03:00
committed by GitHub
parent a76e3286c4
commit 8d618e48a2
18 changed files with 353 additions and 69 deletions

View File

@@ -247,7 +247,7 @@ func NewImageCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command {
reportFlagGroup.ReportFormat = report
compliance := flag.ComplianceFlag.Clone()
compliance.Values = []string{types.ComplianceDockerCIS}
compliance.Values = []string{types.ComplianceDockerCIS160}
reportFlagGroup.Compliance = compliance // override usage as the accepted values differ for each subcommand.
misconfFlagGroup := flag.NewMisconfFlagGroup()
@@ -946,10 +946,12 @@ func NewKubernetesCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command {
reportFlagGroup := flag.NewReportFlagGroup()
compliance := flag.ComplianceFlag.Clone()
compliance.Values = []string{
types.ComplianceK8sNsa,
types.ComplianceK8sCIS,
types.ComplianceK8sPSSBaseline,
types.ComplianceK8sPSSRestricted,
types.ComplianceK8sNsa10,
types.ComplianceK8sCIS123,
types.ComplianceEksCIS14,
types.ComplianceRke2CIS124,
types.ComplianceK8sPSSBaseline01,
types.ComplianceK8sPSSRestricted01,
}
reportFlagGroup.Compliance = compliance // override usage as the accepted values differ for each subcommand.
reportFlagGroup.ExitOnEOL = nil // disable '--exit-on-eol'