v1alpha1

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the zora v1alpha1 API group +kubebuilder:object:generate=true +groupName=zora.undistro.io

Index

Constants

View Source
const (
	LabelEnvironment = "zora.undistro.io/environment"

	ClusterReady               = "Ready"
	ClusterDiscovered          = "Discovered"
	ClusterResourcesDiscovered = "ResourcesDiscovered"
)
View Source
const (
	SeverityUnknown ClusterIssueSeverity = "Unknown"
	SeverityLow     ClusterIssueSeverity = "Low"
	SeverityMedium  ClusterIssueSeverity = "Medium"
	SeverityHigh    ClusterIssueSeverity = "High"

	LabelScanID     = "scanID"
	LabelCluster    = "cluster"
	LabelClusterUID = "clusterUID"
	LabelSeverity   = "severity"
	LabelIssueID    = "id"
	LabelCategory   = "category"
	LabelPlugin     = "plugin"
	LabelCustom     = "custom"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "zora.undistro.io", Version: "v1alpha1"}

	// SchemeGroupVersion is a copy of GroupVersion, used by client-gen
	SchemeGroupVersion = GroupVersion

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Cluster

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

	Spec   ClusterSpec   `json:"spec,omitempty"`
	Status ClusterStatus `json:"status,omitempty"`
}

Cluster is the Schema for the clusters API +genclient +genclient:onlyVerbs=list,get +genclient:noStatus

func (*Cluster) DeepCopy

func (in *Cluster) DeepCopy() *Cluster

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

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

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

func (*Cluster) DeepCopyObject

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

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

func (*Cluster) KubeconfigRefKey

func (in *Cluster) KubeconfigRefKey() *types.NamespacedName

func (*Cluster) SetStatus

func (in *Cluster) SetStatus(statusType string, status bool, reason, msg string)

type ClusterIssue

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

	Spec   ClusterIssueSpec   `json:"spec,omitempty"`
	Status ClusterIssueStatus `json:"status,omitempty"`
}

ClusterIssue is the Schema for the clusterissues API +genclient +genclient:noStatus

func (*ClusterIssue) DeepCopy

func (in *ClusterIssue) DeepCopy() *ClusterIssue

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

func (*ClusterIssue) DeepCopyInto

func (in *ClusterIssue) DeepCopyInto(out *ClusterIssue)

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

func (*ClusterIssue) DeepCopyObject

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

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

type ClusterIssueList

type ClusterIssueList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ClusterIssue `json:"items"`
}

ClusterIssueList contains a list of ClusterIssue

func (*ClusterIssueList) DeepCopy

func (in *ClusterIssueList) DeepCopy() *ClusterIssueList

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

func (*ClusterIssueList) DeepCopyInto

func (in *ClusterIssueList) DeepCopyInto(out *ClusterIssueList)

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

func (*ClusterIssueList) DeepCopyObject

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

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

type ClusterIssueSeverity

type ClusterIssueSeverity string

type ClusterIssueSpec

type ClusterIssueSpec struct {
	Cluster        string               `json:"cluster"`
	ID             string               `json:"id"`
	Message        string               `json:"message"`
	Severity       ClusterIssueSeverity `json:"severity"`
	Category       string               `json:"category,omitempty"`
	Resources      map[string][]string  `json:"resources,omitempty"`
	TotalResources int                  `json:"totalResources,omitempty"`
	Url            string               `json:"url,omitempty"`
	Custom         bool                 `json:"custom,omitempty"`
}

ClusterIssueSpec defines the desired state of ClusterIssue

func (*ClusterIssueSpec) AddResource added in v0.6.1

func (r *ClusterIssueSpec) AddResource(gvr, resource string)

AddResource appends the given resource to the Resources map, if it does not exist

func (*ClusterIssueSpec) DeepCopy

func (in *ClusterIssueSpec) DeepCopy() *ClusterIssueSpec

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

func (*ClusterIssueSpec) DeepCopyInto

func (in *ClusterIssueSpec) DeepCopyInto(out *ClusterIssueSpec)

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

type ClusterIssueStatus

type ClusterIssueStatus struct {
}

ClusterIssueStatus defines the observed state of ClusterIssue

func (*ClusterIssueStatus) DeepCopy

func (in *ClusterIssueStatus) DeepCopy() *ClusterIssueStatus

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

func (*ClusterIssueStatus) DeepCopyInto

func (in *ClusterIssueStatus) DeepCopyInto(out *ClusterIssueStatus)

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

type ClusterList

type ClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Cluster `json:"items"`
}

ClusterList contains a list of Cluster

func (*ClusterList) DeepCopy

func (in *ClusterList) DeepCopy() *ClusterList

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

func (*ClusterList) DeepCopyInto

func (in *ClusterList) DeepCopyInto(out *ClusterList)

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

func (*ClusterList) DeepCopyObject

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

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

type ClusterScan

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

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

ClusterScan is the Schema for the clusterscans API +genclient +genclient:onlyVerbs=list,get +genclient:noStatus

func (*ClusterScan) ClusterKey

func (in *ClusterScan) ClusterKey() types.NamespacedName

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.

func (*ClusterScan) NamespacedName added in v0.8.4

func (in *ClusterScan) NamespacedName() types.NamespacedName

func (*ClusterScan) SetReadyStatus

func (in *ClusterScan) SetReadyStatus(status bool, reason, msg string)

func (*ClusterScan) SetSaaSStatus

func (in *ClusterScan) SetSaaSStatus(status metav1.ConditionStatus, reason, msg string)

type ClusterScanList

type ClusterScanList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ClusterScan `json:"items"`
}

ClusterScanList contains a list of ClusterScan

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 ClusterScanSpec

type ClusterScanSpec struct {
	// ClusterRef is a reference to a Cluster in the same namespace
	ClusterRef corev1.LocalObjectReference `json:"clusterRef"`

	// This flag tells the controller to suspend subsequent executions, it does
	// not apply to already started executions.  Defaults to false.
	Suspend *bool `json:"suspend,omitempty"`

	// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
	Schedule string `json:"schedule"`

	// The list of Plugin references that are used to scan the referenced Cluster.  Defaults to 'popeye'
	Plugins []PluginReference `json:"plugins,omitempty"`

	// The number of successful finished scans and their issues to retain. Value must be non-negative integer.
	// Defaults to 3.
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:default=3
	SuccessfulScansHistoryLimit *int32 `json:"successfulScansHistoryLimit,omitempty"`

	// The number of failed finished scans to retain. Value must be non-negative integer.
	// Defaults to 1.
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:default=1
	FailedScansHistoryLimit *int32 `json:"failedScansHistoryLimit,omitempty"`
}

ClusterScanSpec defines the desired state of ClusterScan

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 {
	Status `json:",inline"`

	// Information of the last scans of plugins
	Plugins map[string]*PluginScanStatus `json:"plugins,omitempty"`

	// Comma separated list of plugins
	PluginNames string `json:"pluginNames,omitempty"`

	// Suspend field value from ClusterScan spec
	Suspend bool `json:"suspend"`

	// Information when was the last time the job was scheduled.
	LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"`

	// Information when was the last time the job was finished.
	LastFinishedTime *metav1.Time `json:"lastFinishedTime,omitempty"`

	// Status of the last finished scan. Complete or Failed
	LastFinishedStatus string `json:"lastFinishedStatus,omitempty"`

	// Status of the last scan. Active, Complete or Failed
	LastStatus string `json:"lastStatus,omitempty"`

	// Information when was the last time the job successfully completed.
	LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty"`

	// Time when the next job will schedule.
	NextScheduleTime *metav1.Time `json:"nextScheduleTime,omitempty"`

	// Total of ClusterIssues reported in the last successful scan
	TotalIssues *int `json:"totalIssues,omitempty"`

	// Resource versions of processed vulnerabilities
	ProcessedVulnerabilities map[string]PluginScanProcessedResources `json:"processedVulnerabilities,omitempty"`

	// Resource versions of processed misconfigurations
	ProcessedMisconfigurations map[string]PluginScanProcessedResources `json:"processedMisconfigurations,omitempty"`

	// Processed Status information for each plugin
	ProcessedPluginStatus map[string]*PluginScanProcessedStatus `json:"processedPluginStatus,omitempty"`
}

ClusterScanStatus defines the observed state of ClusterScan

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.

func (*ClusterScanStatus) GetPluginStatus

func (in *ClusterScanStatus) GetPluginStatus(name string) *PluginScanStatus

GetPluginStatus returns a PluginScanStatus of a plugin

func (*ClusterScanStatus) LastScanIDs

func (in *ClusterScanStatus) LastScanIDs(successful bool) []string

LastScanIDs returns a list of all the last scan IDs

func (*ClusterScanStatus) SyncStatus

func (in *ClusterScanStatus) SyncStatus()

SyncStatus updates ClusterScan status and time fields based on PluginStatus

type ClusterSpec

type ClusterSpec struct {
	// KubeconfigRef is a reference to a secret in the same namespace that contains the kubeconfig data
	KubeconfigRef *corev1.LocalObjectReference `json:"kubeconfigRef,omitempty"`
}

ClusterSpec defines the desired state of Cluster

func (*ClusterSpec) DeepCopy

func (in *ClusterSpec) DeepCopy() *ClusterSpec

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

func (*ClusterSpec) DeepCopyInto

func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)

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

type ClusterStatus

type ClusterStatus struct {
	Status                `json:",inline"`
	discovery.ClusterInfo `json:",inline"`

	// KubernetesVersion is the server's kubernetes version (git version).
	KubernetesVersion string `json:"kubernetesVersion,omitempty"`

	// Usage and available resources
	Resources discovery.ClusterResources `json:"resources,omitempty"`

	// Usage of memory in quantity and percentage
	MemoryUsage string `json:"memoryUsage,omitempty"`

	// Quantity of memory available in Mi
	MemoryAvailable string `json:"memoryAvailable,omitempty"`

	// Usage of CPU in quantity and percentage
	CPUUsage string `json:"cpuUsage,omitempty"`

	// Quantity of CPU available
	CPUAvailable string `json:"cpuAvailable,omitempty"`

	// Timestamp representing the server time of the last reconciliation
	LastReconciliationTime metav1.Time `json:"lastReconciliationTime,omitempty"`
}

ClusterStatus defines the observed state of Cluster

func (*ClusterStatus) DeepCopy

func (in *ClusterStatus) DeepCopy() *ClusterStatus

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

func (*ClusterStatus) DeepCopyInto

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

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

func (*ClusterStatus) SetResources

func (in *ClusterStatus) SetResources(res discovery.ClusterResources)

SetResources format and fill temporary fields about resources

type CustomCheck

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

	Spec   CustomCheckSpec   `json:"spec,omitempty"`
	Status CustomCheckStatus `json:"status,omitempty"`
}

CustomCheck is the Schema for the customchecks API

func (*CustomCheck) DeepCopy

func (in *CustomCheck) DeepCopy() *CustomCheck

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

func (*CustomCheck) DeepCopyInto

func (in *CustomCheck) DeepCopyInto(out *CustomCheck)

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

func (*CustomCheck) DeepCopyObject

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

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

type CustomCheckList

type CustomCheckList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CustomCheck `json:"items"`
}

CustomCheckList contains a list of CustomCheck

func (*CustomCheckList) DeepCopy

func (in *CustomCheckList) DeepCopy() *CustomCheckList

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

func (*CustomCheckList) DeepCopyInto

func (in *CustomCheckList) DeepCopyInto(out *CustomCheckList)

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

func (*CustomCheckList) DeepCopyObject

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

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

type CustomCheckSpec

type CustomCheckSpec struct {
	Match       Match        `json:"match"`
	Validations []Validation `json:"validations"`
	Message     string       `json:"message"`
	Category    string       `json:"category"`
	URL         string       `json:"url,omitempty"`

	// Parameters to be used in validations
	Params *apiextensionsv1.JSON `json:"params,omitempty"`

	//+kubebuilder:validation:Type=string
	//+kubebuilder:validation:Enum=Low;Medium;High
	Severity string `json:"severity"`
}

CustomCheckSpec defines the desired state of CustomCheck

func (*CustomCheckSpec) DeepCopy

func (in *CustomCheckSpec) DeepCopy() *CustomCheckSpec

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

func (*CustomCheckSpec) DeepCopyInto

func (in *CustomCheckSpec) DeepCopyInto(out *CustomCheckSpec)

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

type CustomCheckStatus

type CustomCheckStatus struct {
	Status `json:",inline"`
}

CustomCheckStatus defines the observed state of CustomCheck

func (*CustomCheckStatus) DeepCopy

func (in *CustomCheckStatus) DeepCopy() *CustomCheckStatus

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

func (*CustomCheckStatus) DeepCopyInto

func (in *CustomCheckStatus) DeepCopyInto(out *CustomCheckStatus)

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

type Distro added in v0.8.0

type Distro struct {
	Name    string `json:"name,omitempty"`
	Version string `json:"version,omitempty"`
}

func (*Distro) DeepCopy added in v0.8.0

func (in *Distro) DeepCopy() *Distro

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

func (*Distro) DeepCopyInto added in v0.8.0

func (in *Distro) DeepCopyInto(out *Distro)

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

type Match

type Match marvin.Match

func (*Match) DeepCopy

func (in *Match) DeepCopy() *Match

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

func (*Match) DeepCopyInto

func (in *Match) DeepCopyInto(out *Match)

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

type Plugin

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

	Spec   PluginSpec   `json:"spec,omitempty"`
	Status PluginStatus `json:"status,omitempty"`
}

Plugin is the Schema for the plugins API

func (*Plugin) DeepCopy

func (in *Plugin) DeepCopy() *Plugin

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

func (*Plugin) DeepCopyInto

func (in *Plugin) DeepCopyInto(out *Plugin)

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

func (*Plugin) DeepCopyObject

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

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

type PluginList

type PluginList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Plugin `json:"items"`
}

PluginList contains a list of Plugin

func (*PluginList) DeepCopy

func (in *PluginList) DeepCopy() *PluginList

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

func (*PluginList) DeepCopyInto

func (in *PluginList) DeepCopyInto(out *PluginList)

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

func (*PluginList) DeepCopyObject

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

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

type PluginReference

type PluginReference struct {
	// Name is unique within a namespace to reference a Plugin resource.
	Name string `json:"name"`

	// Namespace defines the space within which the Plugin name must be unique.
	Namespace string `json:"namespace,omitempty"`

	// List of environment variables to set in the Plugin container.
	Env []corev1.EnvVar `json:"env,omitempty"`
}

func (*PluginReference) DeepCopy

func (in *PluginReference) DeepCopy() *PluginReference

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

func (*PluginReference) DeepCopyInto

func (in *PluginReference) DeepCopyInto(out *PluginReference)

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

func (*PluginReference) PluginKey

func (in *PluginReference) PluginKey(defaultNamespace string) types.NamespacedName

type PluginScanProcessedResources added in v0.8.0

type PluginScanProcessedResources map[string]string

func (PluginScanProcessedResources) DeepCopy added in v0.8.0

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

func (PluginScanProcessedResources) DeepCopyInto added in v0.8.0

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

type PluginScanProcessedStatus added in v0.8.0

type PluginScanProcessedStatus struct {
	// The scan status information.
	Scan *ProcessedScanStatus `json:"scan,omitempty"`
	// The number of misconfiguration issues discovered in the last successful scan.
	IssueCount *int `json:"issueCount,omitempty"`
	// When the last successful scan occurred.
	LastSuccessfulScanTime *metav1.Time `json:"lastSuccessfulScanTime,omitempty"`
	// When the last scan finished.
	LastFinishedScanTime *metav1.Time `json:"lastFinishedScanTime,omitempty"`
	// When the next scan will occurr.
	NextScheduleScanTime *metav1.Time `json:"nextScheduleScanTime,omitempty"`
	// The schedule of the scan.
	Schedule string `json:"schedule,omitempty"`
	// The Scan ID of the last successful scan.
	LastSuccessfulScanID string `json:"lastSuccessfulScanID,omitempty"`
}

PluginStatus defines the observed state of Plugin

func (*PluginScanProcessedStatus) DeepCopy added in v0.8.0

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

func (*PluginScanProcessedStatus) DeepCopyInto added in v0.8.0

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

type PluginScanStatus

type PluginScanStatus struct {
	// Information when was the last time the job was scheduled.
	LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"`

	// Information when was the last time the job was finished.
	LastFinishedTime *metav1.Time `json:"lastFinishedTime,omitempty"`

	// Information when was the last time the job successfully completed.
	LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty"`

	// Time when the next job will schedule.
	NextScheduleTime *metav1.Time `json:"nextScheduleTime,omitempty"`

	// ID of the last plugin scan
	LastScanID string `json:"lastScanID,omitempty"`

	// ID of the last successful plugin scan
	LastSuccessfulScanID string `json:"lastSuccessfulScanID,omitempty"`

	// Status of the last plugin scan. Active, Complete or Failed
	LastStatus string `json:"lastStatus,omitempty"`

	// Status of the last finished plugin scan. Complete or Failed
	LastFinishedStatus string `json:"lastFinishedStatus,omitempty"`

	// LastErrorMsg contains a plugin error message from the last failed scan.
	LastErrorMsg string `json:"lastErrorMsg,omitempty"`

	// TotalIssues holds the sum of ClusterIssues found in the last successful scan.
	TotalIssues *int `json:"totalIssues,omitempty"`
}

func (*PluginScanStatus) DeepCopy

func (in *PluginScanStatus) DeepCopy() *PluginScanStatus

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

func (*PluginScanStatus) DeepCopyInto

func (in *PluginScanStatus) DeepCopyInto(out *PluginScanStatus)

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

type PluginSpec

type PluginSpec struct {

	// Indicates what this plugin reports
	// +kubebuilder:validation:Enum=misconfiguration;vulnerability
	// +kubebuilder:default=misconfiguration
	Type string `json:"type"`

	// Docker image name.
	// More info: https://kubernetes.io/docs/concepts/containers/images
	Image string `json:"image"`

	// Entrypoint array. Not executed within a shell.
	// The docker image's ENTRYPOINT is used if this is not provided.
	// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
	// cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced
	// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
	// produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless
	// of whether the variable exists or not. Cannot be updated.
	// More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
	Command []string `json:"command,omitempty"`

	// Arguments to the entrypoint.
	// The docker image's CMD is used if this is not provided.
	// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
	// cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced
	// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
	// produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless
	// of whether the variable exists or not. Cannot be updated.
	// More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
	Args []string `json:"args,omitempty"`

	// List of sources to populate environment variables in plugin and worker containers.
	// The keys defined within a source must be a C_IDENTIFIER. All invalid keys
	// will be reported as an event when the container is starting. When a key exists in multiple
	// sources, the value associated with the last source will take precedence.
	// Values defined by an Env with a duplicate key will take precedence.
	// Cannot be updated.
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`

	// List of environment variables to set in plugin and worker containers.
	// Cannot be updated.
	Env []corev1.EnvVar `json:"env,omitempty"`

	// Annotations to set in plugin and worker containers.
	// Cannot be updated.
	Annotations map[string]string `json:"annotations,omitempty"`

	// Compute Resources required by this container.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Image pull policy.
	// One of Always, Never, IfNotPresent.
	// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// SecurityContext defines the security options the container should be run with.
	// If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.
	// More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
	SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`

	// MountCustomChecksVolume specifies whether a volume with the custom checks should be mounted
	MountCustomChecksVolume *bool `json:"mountCustomChecksVolume,omitempty"`
}

PluginSpec defines the desired state of Plugin

func (*PluginSpec) DeepCopy

func (in *PluginSpec) DeepCopy() *PluginSpec

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

func (*PluginSpec) DeepCopyInto

func (in *PluginSpec) DeepCopyInto(out *PluginSpec)

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

func (*PluginSpec) GetImagePullPolicy

func (in *PluginSpec) GetImagePullPolicy() corev1.PullPolicy

type PluginStatus

type PluginStatus struct {
}

PluginStatus defines the observed state of Plugin

func (*PluginStatus) DeepCopy

func (in *PluginStatus) DeepCopy() *PluginStatus

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

func (*PluginStatus) DeepCopyInto

func (in *PluginStatus) DeepCopyInto(out *PluginStatus)

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

type ProcessedScanStatus added in v0.8.0

type ProcessedScanStatus struct {
	// The status of the last scan.
	Status string `json:"status,omitempty"`
	// The message for the last scan.
	Message string `json:"message,omitempty"`
	// True is the scan is currently suspended.
	Suspend bool `json:"suspend,omitempty"`
	// The status of the last scan.
	ID string `json:"id,omitempty"`
}

func (*ProcessedScanStatus) DeepCopy added in v0.8.0

func (in *ProcessedScanStatus) DeepCopy() *ProcessedScanStatus

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

func (*ProcessedScanStatus) DeepCopyInto added in v0.8.0

func (in *ProcessedScanStatus) DeepCopyInto(out *ProcessedScanStatus)

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

type Status

type Status struct {
	// ObservedGeneration is the 'Generation' of the resource that
	// was last processed by the controller.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Conditions the latest available observations of a resource's current state.
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

Status is the minimally expected status subresource.

func (*Status) ConditionIsTrue

func (s *Status) ConditionIsTrue(t string) bool

ConditionIsTrue return true if the condition of specified type has status 'True'

func (*Status) DeepCopy

func (in *Status) DeepCopy() *Status

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

func (*Status) DeepCopyInto

func (in *Status) DeepCopyInto(out *Status)

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

func (*Status) GetCondition

func (s *Status) GetCondition(t string) *metav1.Condition

GetCondition fetches the condition of the specified type.

func (*Status) SetCondition

func (s *Status) SetCondition(newCondition metav1.Condition)

SetCondition sets the newCondition in conditions.

  1. if the condition of the specified type already exists, all fields of the existing condition are updated to newCondition, LastTransitionTime is set to now if the new status differs from the old status
  2. if a condition of the specified type does not exist, LastTransitionTime is set to now() if unset and newCondition is appended

type Validation

type Validation marvin.Validation

func (*Validation) DeepCopy

func (in *Validation) DeepCopy() *Validation

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

func (*Validation) DeepCopyInto

func (in *Validation) DeepCopyInto(out *Validation)

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

type Vulnerability added in v0.7.0

type Vulnerability struct {
	ID               string       `json:"id"`
	Severity         string       `json:"severity"`
	Title            string       `json:"title"`
	Description      string       `json:"description,omitempty"`
	Package          string       `json:"package"`
	Version          string       `json:"version"`
	FixVersion       string       `json:"fixVersion,omitempty"`
	URL              string       `json:"url,omitempty"`
	Status           string       `json:"status,omitempty"`
	Type             string       `json:"type,omitempty"`
	Score            string       `json:"score,omitempty"`
	PublishedDate    *metav1.Time `json:"publishedDate,omitempty"`
	LastModifiedDate *metav1.Time `json:"lastModifiedDate,omitempty"`
}

func (*Vulnerability) DeepCopy added in v0.7.0

func (in *Vulnerability) DeepCopy() *Vulnerability

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

func (*Vulnerability) DeepCopyInto added in v0.7.0

func (in *Vulnerability) DeepCopyInto(out *Vulnerability)

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

type VulnerabilityReport added in v0.7.0

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

	Spec   VulnerabilityReportSpec   `json:"spec,omitempty"`
	Status VulnerabilityReportStatus `json:"status,omitempty"`
}

VulnerabilityReport is the Schema for the vulnerabilityreports API +genclient +genclient:noStatus

func (*VulnerabilityReport) DeepCopy added in v0.7.0

func (in *VulnerabilityReport) DeepCopy() *VulnerabilityReport

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

func (*VulnerabilityReport) DeepCopyInto added in v0.7.0

func (in *VulnerabilityReport) DeepCopyInto(out *VulnerabilityReport)

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

func (*VulnerabilityReport) DeepCopyObject added in v0.7.0

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

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

func (*VulnerabilityReport) SaaSStatusIsTrue added in v0.8.0

func (in *VulnerabilityReport) SaaSStatusIsTrue() bool

func (*VulnerabilityReport) SetSaaSStatus added in v0.8.0

func (in *VulnerabilityReport) SetSaaSStatus(status metav1.ConditionStatus, reason, msg string)

type VulnerabilityReportList added in v0.7.0

type VulnerabilityReportList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VulnerabilityReport `json:"items"`
}

VulnerabilityReportList contains a list of VulnerabilityReport

func (*VulnerabilityReportList) DeepCopy added in v0.7.0

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

func (*VulnerabilityReportList) DeepCopyInto added in v0.7.0

func (in *VulnerabilityReportList) DeepCopyInto(out *VulnerabilityReportList)

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

func (*VulnerabilityReportList) DeepCopyObject added in v0.7.0

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

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

type VulnerabilityReportSpec added in v0.7.0

type VulnerabilityReportSpec struct {
	Cluster      string   `json:"cluster"`
	Image        string   `json:"image"`
	Digest       string   `json:"digest"`
	Tags         []string `json:"tags,omitempty"`
	Architecture string   `json:"architecture,omitempty"`
	OS           string   `json:"os,omitempty"`
	Distro       *Distro  `json:"distro,omitempty"`

	TotalResources  int                 `json:"totalResources"`
	Resources       map[string][]string `json:"resources"`
	Vulnerabilities []Vulnerability     `json:"vulnerabilities"`

	Summary VulnerabilitySummary `json:"summary"`
}

VulnerabilityReportSpec defines the desired state of VulnerabilityReport

func (*VulnerabilityReportSpec) DeepCopy added in v0.7.0

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

func (*VulnerabilityReportSpec) DeepCopyInto added in v0.7.0

func (in *VulnerabilityReportSpec) DeepCopyInto(out *VulnerabilityReportSpec)

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

type VulnerabilityReportStatus added in v0.7.0

type VulnerabilityReportStatus struct {
	Status `json:",inline"`
}

VulnerabilityReportStatus defines the observed state of VulnerabilityReport

func (*VulnerabilityReportStatus) DeepCopy added in v0.7.0

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

func (*VulnerabilityReportStatus) DeepCopyInto added in v0.7.0

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

type VulnerabilitySummary added in v0.7.0

type VulnerabilitySummary struct {
	Total int `json:"total"`

	Critical int `json:"critical"`
	High     int `json:"high"`
	Medium   int `json:"medium"`
	Low      int `json:"low"`
	Unknown  int `json:"unknown"`
}

func (*VulnerabilitySummary) DeepCopy added in v0.7.0

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

func (*VulnerabilitySummary) DeepCopyInto added in v0.7.0

func (in *VulnerabilitySummary) DeepCopyInto(out *VulnerabilitySummary)

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