1
0
mirror of https://github.com/rancher/types.git synced 2025-08-02 05:11:59 +00:00

cis: modify skip, conditions

This commit is contained in:
Murali Paluru 2019-12-12 14:14:43 -08:00 committed by Alena Prokharchyk
parent 16934037d6
commit c2fa09c78a
3 changed files with 30 additions and 3 deletions

View File

@ -3,14 +3,17 @@ package v3
import (
"github.com/rancher/norman/condition"
"github.com/rancher/norman/types"
typescond "github.com/rancher/types/condition"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
ClusterScanConditionCreated condition.Cond = "Created"
ClusterScanConditionCompleted condition.Cond = "Completed"
ClusterScanConditionCreated condition.Cond = typescond.Created
ClusterScanConditionRunCompleted condition.Cond = typescond.RunCompleted
ClusterScanConditionCompleted condition.Cond = typescond.Completed
ClusterScanConditionFailed condition.Cond = typescond.Failed
ClusterScanTypeCis = "cis"
DefaultNamespaceForCis = "security-scan"
@ -24,7 +27,9 @@ const (
type CisScanConfig struct {
// IDs of the checks that need to be skipped in the final report
Skip []string `json:"skip"`
Skip string `json:"skip,omitempty"`
// Override the CIS benchmark version to use for the scan (instead of latest)
OverrideBenchmarkVersion string `json:"overrideBenchmarkVersion,omitempty"`
// Internal flag for debugging master component of the scan
DebugMaster bool `json:"debugMaster"`
// Internal flag for debugging worker component of the scan

21
condition/constants.go Normal file
View File

@ -0,0 +1,21 @@
package condition
import (
cond "github.com/rancher/norman/condition"
)
const (
// transition type
Created cond.Cond = "Created"
RunCompleted cond.Cond = "RunCompleted"
// done type
Completed cond.Cond = "Completed"
Ready cond.Cond = "Ready"
// error type
Failed cond.Cond = "Failed"
)

View File

@ -61,6 +61,7 @@ var transitioningMap = map[string]string{
"InitialRolesPopulated": "activating",
"ScalingActive": "pending",
"AbleToScale": "pending",
"RunCompleted": "running",
}
// True == error