mirror of
https://github.com/rancher/types.git
synced 2025-07-31 20:55:00 +00:00
changes to cis scan struct(s)
This commit is contained in:
parent
31d195f931
commit
44d21ba15f
@ -11,9 +11,28 @@ import (
|
||||
const (
|
||||
ClusterScanConditionCreated condition.Cond = "Created"
|
||||
ClusterScanConditionCompleted condition.Cond = "Completed"
|
||||
|
||||
ClusterScanTypeCis = "cis"
|
||||
DefaultNamespaceForCis = "security-scan"
|
||||
DefaultSonobuoyPodName = "security-scan-runner"
|
||||
ConfigMapNameForUserConfig = "security-scan-cfg"
|
||||
|
||||
RunCisScanAnnotation = "field.cattle.io/runCisScan"
|
||||
SonobuoyCompletionAnnotation = "field.cattle.io/sonobuoyDone"
|
||||
CisHelmChartOwner = "field.cattle.io/clusterScanOwner"
|
||||
)
|
||||
|
||||
type CisScanConfig struct {
|
||||
// IDs of the checks that need to be skipped in the final report
|
||||
Skip []string `json:"skip"`
|
||||
// Internal flag for debugging master component of the scan
|
||||
DebugMaster bool `json:"debugMaster"`
|
||||
// Internal flag for debugging worker component of the scan
|
||||
DebugWorker bool `json:"debugWorker"`
|
||||
}
|
||||
|
||||
type ClusterScanConfig struct {
|
||||
CisScanConfig *CisScanConfig `json:"cisScanConfig"`
|
||||
}
|
||||
|
||||
type ClusterScanCondition struct {
|
||||
|
@ -30,7 +30,7 @@ const (
|
||||
ClusterActionBackupEtcd = "backupEtcd"
|
||||
ClusterActionRestoreFromEtcdBackup = "restoreFromEtcdBackup"
|
||||
ClusterActionRotateCertificates = "rotateCertificates"
|
||||
ClusterActionRunCISScan = "runSecurityScan"
|
||||
ClusterActionRunSecurityScan = "runSecurityScan"
|
||||
ClusterActionSaveAsTemplate = "saveAsTemplate"
|
||||
|
||||
// ClusterConditionReady Cluster ready to serve API (healthy when true, unhealthy when false)
|
||||
|
@ -263,7 +263,9 @@ func clusterTypes(schemas *types.Schemas) *types.Schemas {
|
||||
Input: "rotateCertificateInput",
|
||||
Output: "rotateCertificateOutput",
|
||||
}
|
||||
schema.ResourceActions[v3.ClusterActionRunCISScan] = types.Action{}
|
||||
schema.ResourceActions[v3.ClusterActionRunSecurityScan] = types.Action{
|
||||
Input: "cisScanConfig",
|
||||
}
|
||||
schema.ResourceActions[v3.ClusterActionSaveAsTemplate] = types.Action{
|
||||
Input: "saveAsTemplateInput",
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user