v1

package
v1.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=cis.cattle.io

+k8s:deepcopy-gen=package +groupName=cis.cattle.io

+k8s:deepcopy-gen=package +groupName=cis.cattle.io

Index

Constants

View Source
const (
	ClusterProviderRKE = "rke"
	ClusterProviderEKS = "eks"
	ClusterProviderGKE = "gke"
	ClusterProviderAKS = "aks"
	ClusterProviderK3s = "k3s"

	CISV1NS                            = "security-scan"
	ClusterScanNS                      = "cis-operator-system"
	ClusterScanSA                      = "cis-serviceaccount"
	ClusterScanConfigMap               = "cis-s-config-cm"
	ClusterScanPluginsConfigMap        = "cis-s-plugins-cm"
	ClusterScanUserSkipConfigMap       = "cis-s-user-skip-cm"
	DefaultClusterScanProfileConfigMap = "default-clusterscanprofiles"
	ClusterScanService                 = "service-rancher-cis-benchmark"
	DefaultScanOutputFileName          = "output.json"
	DefaultRetention                   = 3
	DefaultCronSchedule                = "0 0 * * *"
	CustomBenchmarkBaseDir             = "/etc/kbs/custombenchmark/cfg"
	CustomBenchmarkConfigMap           = "cis-bmark-cm"

	ClusterScanConditionCreated      = condition.Cond("Created")
	ClusterScanConditionPending      = condition.Cond("Pending")
	ClusterScanConditionRunCompleted = condition.Cond("RunCompleted")
	ClusterScanConditionComplete     = condition.Cond("Complete")
	ClusterScanConditionFailed       = condition.Cond("Failed")
	ClusterScanConditionAlerted      = condition.Cond("Alerted")
	ClusterScanConditionReconciling  = condition.Cond("Reconciling")
	ClusterScanConditionStalled      = condition.Cond("Stalled")

	ClusterScanFailOnWarning = "fail"
	ClusterScanPassOnWarning = "pass"
)

Variables

View Source
var (
	ClusterScanResourceName          = "clusterscans"
	ClusterScanBenchmarkResourceName = "clusterscanbenchmarks"
	ClusterScanProfileResourceName   = "clusterscanprofiles"
	ClusterScanReportResourceName    = "clusterscanreports"
)
View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: cis.GroupName, Version: "v1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ClusterScan

type ClusterScan struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ClusterScanSpec   `json:"spec"`
	Status ClusterScanStatus `yaml:"status" json:"status,omitempty"`
}

func NewClusterScan

func NewClusterScan(namespace, name string, obj ClusterScan) *ClusterScan

func (*ClusterScan) DeepCopy

func (in *ClusterScan) DeepCopy() *ClusterScan

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScan.

func (*ClusterScan) DeepCopyInto

func (in *ClusterScan) DeepCopyInto(out *ClusterScan)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterScan) DeepCopyObject

func (in *ClusterScan) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterScanAlertRule added in v1.0.3

type ClusterScanAlertRule struct {
	AlertOnComplete bool `json:"alertOnComplete,omitempty"`
	AlertOnFailure  bool `json:"alertOnFailure,omitempty"`
}

func (*ClusterScanAlertRule) DeepCopy added in v1.0.3

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanAlertRule.

func (*ClusterScanAlertRule) DeepCopyInto added in v1.0.3

func (in *ClusterScanAlertRule) DeepCopyInto(out *ClusterScanAlertRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterScanBenchmark added in v0.0.3

type ClusterScanBenchmark struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ClusterScanBenchmarkSpec `json:"spec"`
}

func NewClusterScanBenchmark added in v0.0.3

func NewClusterScanBenchmark(namespace, name string, obj ClusterScanBenchmark) *ClusterScanBenchmark

func (*ClusterScanBenchmark) DeepCopy added in v0.0.3

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanBenchmark.

func (*ClusterScanBenchmark) DeepCopyInto added in v0.0.3

func (in *ClusterScanBenchmark) DeepCopyInto(out *ClusterScanBenchmark)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterScanBenchmark) DeepCopyObject added in v0.0.3

func (in *ClusterScanBenchmark) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterScanBenchmarkList added in v0.0.3

type ClusterScanBenchmarkList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ClusterScanBenchmark `json:"items"`
}

ClusterScanBenchmarkList is a list of ClusterScanBenchmark resources

func (*ClusterScanBenchmarkList) DeepCopy added in v0.0.3

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanBenchmarkList.

func (*ClusterScanBenchmarkList) DeepCopyInto added in v0.0.3

func (in *ClusterScanBenchmarkList) DeepCopyInto(out *ClusterScanBenchmarkList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterScanBenchmarkList) DeepCopyObject added in v0.0.3

func (in *ClusterScanBenchmarkList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterScanBenchmarkSpec added in v0.0.3

type ClusterScanBenchmarkSpec struct {
	ClusterProvider      string `json:"clusterProvider,omitempty"`
	MinKubernetesVersion string `json:"minKubernetesVersion,omitempty"`
	MaxKubernetesVersion string `json:"maxKubernetesVersion,omitempty"`

	CustomBenchmarkConfigMapName      string `json:"customBenchmarkConfigMapName,omitempty"`
	CustomBenchmarkConfigMapNamespace string `json:"customBenchmarkConfigMapNamespace,omitempty"`
}

func (*ClusterScanBenchmarkSpec) DeepCopy added in v0.0.3

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanBenchmarkSpec.

func (*ClusterScanBenchmarkSpec) DeepCopyInto added in v0.0.3

func (in *ClusterScanBenchmarkSpec) DeepCopyInto(out *ClusterScanBenchmarkSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterScanList

type ClusterScanList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ClusterScan `json:"items"`
}

ClusterScanList is a list of ClusterScan resources

func (*ClusterScanList) DeepCopy

func (in *ClusterScanList) DeepCopy() *ClusterScanList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanList.

func (*ClusterScanList) DeepCopyInto

func (in *ClusterScanList) DeepCopyInto(out *ClusterScanList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterScanList) DeepCopyObject

func (in *ClusterScanList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterScanProfile

type ClusterScanProfile struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ClusterScanProfileSpec `json:"spec"`
}

func NewClusterScanProfile

func NewClusterScanProfile(namespace, name string, obj ClusterScanProfile) *ClusterScanProfile

func (*ClusterScanProfile) DeepCopy

func (in *ClusterScanProfile) DeepCopy() *ClusterScanProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanProfile.

func (*ClusterScanProfile) DeepCopyInto

func (in *ClusterScanProfile) DeepCopyInto(out *ClusterScanProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterScanProfile) DeepCopyObject

func (in *ClusterScanProfile) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterScanProfileList

type ClusterScanProfileList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ClusterScanProfile `json:"items"`
}

ClusterScanProfileList is a list of ClusterScanProfile resources

func (*ClusterScanProfileList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanProfileList.

func (*ClusterScanProfileList) DeepCopyInto

func (in *ClusterScanProfileList) DeepCopyInto(out *ClusterScanProfileList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterScanProfileList) DeepCopyObject

func (in *ClusterScanProfileList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterScanProfileSpec

type ClusterScanProfileSpec struct {
	BenchmarkVersion string   `json:"benchmarkVersion,omitempty"`
	SkipTests        []string `json:"skipTests,omitempty"`
}

func (*ClusterScanProfileSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanProfileSpec.

func (*ClusterScanProfileSpec) DeepCopyInto

func (in *ClusterScanProfileSpec) DeepCopyInto(out *ClusterScanProfileSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterScanReport

type ClusterScanReport struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ClusterScanReportSpec `json:"spec"`
}

func NewClusterScanReport

func NewClusterScanReport(namespace, name string, obj ClusterScanReport) *ClusterScanReport

func (*ClusterScanReport) DeepCopy

func (in *ClusterScanReport) DeepCopy() *ClusterScanReport

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanReport.

func (*ClusterScanReport) DeepCopyInto

func (in *ClusterScanReport) DeepCopyInto(out *ClusterScanReport)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterScanReport) DeepCopyObject

func (in *ClusterScanReport) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterScanReportList

type ClusterScanReportList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ClusterScanReport `json:"items"`
}

ClusterScanReportList is a list of ClusterScanReport resources

func (*ClusterScanReportList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanReportList.

func (*ClusterScanReportList) DeepCopyInto

func (in *ClusterScanReportList) DeepCopyInto(out *ClusterScanReportList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterScanReportList) DeepCopyObject

func (in *ClusterScanReportList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterScanReportSpec

type ClusterScanReportSpec struct {
	BenchmarkVersion string `json:"benchmarkVersion,omitempty"`
	LastRunTimestamp string `yaml:"last_run_timestamp" json:"lastRunTimestamp"`
	ReportJSON       string `json:"reportJSON"`
}

func (*ClusterScanReportSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanReportSpec.

func (*ClusterScanReportSpec) DeepCopyInto

func (in *ClusterScanReportSpec) DeepCopyInto(out *ClusterScanReportSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterScanSpec

type ClusterScanSpec struct {
	// scan profile to use
	ScanProfileName string `json:"scanProfileName,omitempty"`
	//config for scheduled scan
	ScheduledScanConfig *ScheduledScanConfig `yaml:"scheduled_scan_config" json:"scheduledScanConfig,omitempty"`
	// Specify if tests with "warn" output should be counted towards scan failure
	ScoreWarning string `yaml:"score_warning" json:"scoreWarning,omitempty"`
}

func (*ClusterScanSpec) DeepCopy

func (in *ClusterScanSpec) DeepCopy() *ClusterScanSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanSpec.

func (*ClusterScanSpec) DeepCopyInto

func (in *ClusterScanSpec) DeepCopyInto(out *ClusterScanSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterScanStatus

type ClusterScanStatus struct {
	Display                *ClusterScanStatusDisplay           `json:"display,omitempty"`
	LastRunTimestamp       string                              `yaml:"last_run_timestamp" json:"lastRunTimestamp"`
	LastRunScanProfileName string                              `json:"lastRunScanProfileName,omitempty"`
	Summary                *ClusterScanSummary                 `json:"summary,omitempty"`
	ObservedGeneration     int64                               `json:"observedGeneration"`
	Conditions             []genericcondition.GenericCondition `json:"conditions,omitempty"`
	NextScanAt             string                              `json:"NextScanAt"`
	ScanAlertingRuleName   string                              `json:"ScanAlertingRuleName"`
}

func (*ClusterScanStatus) DeepCopy

func (in *ClusterScanStatus) DeepCopy() *ClusterScanStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanStatus.

func (*ClusterScanStatus) DeepCopyInto

func (in *ClusterScanStatus) DeepCopyInto(out *ClusterScanStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterScanStatusDisplay added in v0.0.4

type ClusterScanStatusDisplay struct {
	State         string `json:"state"`
	Message       string `json:"message"`
	Error         bool   `json:"error"`
	Transitioning bool   `json:"transitioning"`
}

func (*ClusterScanStatusDisplay) DeepCopy added in v0.0.4

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanStatusDisplay.

func (*ClusterScanStatusDisplay) DeepCopyInto added in v0.0.4

func (in *ClusterScanStatusDisplay) DeepCopyInto(out *ClusterScanStatusDisplay)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterScanSummary

type ClusterScanSummary struct {
	Total         int `json:"total"`
	Pass          int `json:"pass"`
	Fail          int `json:"fail"`
	Skip          int `json:"skip"`
	Warn          int `json:"warn"`
	NotApplicable int `json:"notApplicable"`
}

func (*ClusterScanSummary) DeepCopy

func (in *ClusterScanSummary) DeepCopy() *ClusterScanSummary

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterScanSummary.

func (*ClusterScanSummary) DeepCopyInto

func (in *ClusterScanSummary) DeepCopyInto(out *ClusterScanSummary)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ScanImageConfig

type ScanImageConfig struct {
	SecurityScanImage    string
	SecurityScanImageTag string
	SonobuoyImage        string
	SonobuoyImageTag     string
	AlertSeverity        string
	ClusterName          string
	AlertEnabled         bool
}

func (*ScanImageConfig) DeepCopy

func (in *ScanImageConfig) DeepCopy() *ScanImageConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScanImageConfig.

func (*ScanImageConfig) DeepCopyInto

func (in *ScanImageConfig) DeepCopyInto(out *ScanImageConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ScheduledScanConfig added in v1.0.3

type ScheduledScanConfig struct {
	// Cron Expression for Schedule
	CronSchedule string `yaml:"cron_schedule" json:"cronSchedule,omitempty"`
	// Number of past scans to keep
	RetentionCount int `yaml:"retentionCount" json:"retentionCount,omitempty"`
	//configure the alerts to be sent out
	ScanAlertRule *ClusterScanAlertRule `json:"scanAlertRule,omitempty"`
}

func (*ScheduledScanConfig) DeepCopy added in v1.0.3

func (in *ScheduledScanConfig) DeepCopy() *ScheduledScanConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledScanConfig.

func (*ScheduledScanConfig) DeepCopyInto added in v1.0.3

func (in *ScheduledScanConfig) DeepCopyInto(out *ScheduledScanConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL