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:
parent
16934037d6
commit
c2fa09c78a
@ -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
21
condition/constants.go
Normal 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"
|
||||
)
|
@ -61,6 +61,7 @@ var transitioningMap = map[string]string{
|
||||
"InitialRolesPopulated": "activating",
|
||||
"ScalingActive": "pending",
|
||||
"AbleToScale": "pending",
|
||||
"RunCompleted": "running",
|
||||
}
|
||||
|
||||
// True == error
|
||||
|
Loading…
Reference in New Issue
Block a user