Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the v1 API group. +kubebuilder:object:generate=true +groupName=ocular.crashoverride.run
Index ¶
- Constants
- Variables
- type AdditionalPodMetadata
- type ClusterCrawler
- type ClusterCrawlerList
- type ClusterCrawlerStatus
- type ClusterDownloader
- type ClusterDownloaderList
- type ClusterDownloaderStatus
- type ClusterUploader
- type ClusterUploaderList
- type ClusterUploaderStatus
- type ConcurrencyPolicy
- type Crawler
- type CrawlerList
- type CrawlerSpec
- type CrawlerStatus
- type CronSearch
- type CronSearchList
- type CronSearchSpec
- type CronSearchStatus
- type Downloader
- type DownloaderList
- type DownloaderSpec
- type DownloaderStatus
- type EnvironmentVariableName
- type ParameterDefinition
- type ParameterSetting
- type ParameterizedObjectReference
- type Pipeline
- type PipelineList
- type PipelinePhase
- type PipelineSpec
- type PipelineStageStatus
- type PipelineStageStatuses
- type PipelineStatus
- type PipelineTemplate
- type Profile
- type ProfileList
- type ProfileSpec
- type ProfileStatus
- type Search
- type SearchList
- type SearchSchedulerSpec
- type SearchSpec
- type SearchStatus
- type SearchTemplateSpec
- type ServiceAccountDefinition
- type Target
- type Uploader
- type UploaderList
- type UploaderSpec
- type UploaderStatus
Constants ¶
const ( // CompletedSuccessfullyConditionType indicates that the execution has completed successfully. // If this is true, it indicates that the execution has completed without errors. // If this is false, it indicates that the execution has completed, but with a failure. // The absence of this condition indicates that the execution is still in progress. CompletedSuccessfullyConditionType = "Complete" // StartedConditionType indicates that the execution has started. // If this is true, it indicates that the execution has started. // If this is false, it indicates that the execution could not be started due to an error. // The absence of this condition indicates that the execution has not started. StartedConditionType = "Started" // TypeLabelKey is the label key used to indicate the type of resource created by Ocular. // See the constants PodType* and ServiceType* for the possible values. TypeLabelKey = Group + "/type" // PodTypeScan is the value of the TypeLabelKey label for scan pods. PodTypeScan = "scan" // PodTypeUpload is the value of the TypeLabelKey label for upload pods. PodTypeUpload = "upload" // PodTypeSearch is the value of the TypeLabelKey label for search pods. PodTypeSearch = "search" // ServiceTypeUpload is the value of the TypeLabelKey label for upload services. ServiceTypeUpload = "upload" // ServiceAccountTypeSearch is the value of the TypeLabelKey label for scan service accounts. ServiceAccountTypeSearch = "search" // RoleBindingTypeSearch is the value of the TypeLabelKey label for search role bindings. RoleBindingTypeSearch = "search" )
const ( Group = "ocular.crashoverride.run" Version = "v1beta1" )
const ( // PipelineResultsDirectory is the directory where the target scan results will be stored. // This directory should contain all the [ProfileSpec.Artifacts] after the scan is complete. PipelineResultsDirectory = "/mnt/results" // PipelineMetadataDirectory is the directory where the target metadata will be stored. // This directory should contain all the [DownloaderSpec.MetadataFiles] after the download is complete. PipelineMetadataDirectory = "/mnt/metadata" // PipelineTargetDirectory is the directory where the pipeline target will be stored. // This directory is where the [Downloader] should write the target to be scanned to. PipelineTargetDirectory = "/mnt/target" // PipelineLabelKey is the label key used to identify resources associated with a specific pipeline. // It will contain the name of the pipeline as its value. PipelineLabelKey = Group + "/pipeline" // ProfileLabelKey is the label key used to identify pipelines created from a specific profile. ProfileLabelKey = Group + "/profile" // DownloaderLabelKey is the label key used to identify pipelines created from a specific downloader. DownloaderLabelKey = Group + "/downloader" )
const ( // PipelineScanPodCreatedConditionType is the condition type used when the scan pod for a pipeline has been created. // If this condition is true, it indicates that the scan pod has been successfully created. // If this condition is false, it indicates that there was an error creating the scan pod. // The absence of this condition indicates that the scan pod has not been created yet. PipelineScanPodCreatedConditionType = "PipelineScanPodCreated" // PipelineUploadPodCreatedConditionType is the condition type used when the upload pod for a pipeline has been created. // If this condition is true, it indicates that the upload pod has been successfully created. // If this condition is false, it indicates that there was an error creating the upload pod. // The absence of this condition indicates that the upload pod has not been created yet (or won't be // created if the pipeline is scanPodOnly). PipelineUploadPodCreatedConditionType = "PipelineUploadPodCreated" // PipelineCompletedSuccessfullyConditionType is the condition type used when a pipeline has completed successfully. // If this condition is true, it indicates that the pipeline has completed all its stages without errors. // If this condition is false, it indicates that the pipeline has completed, but with a failure. // The absence of this condition indicates that the pipeline is still in progress. PipelineCompletedSuccessfullyConditionType = "PipelineCompletedSuccessful" )
const ( // SearchLabelKey is the label key used to identify resources associated with a specific search. SearchLabelKey = Group + "/search" // CrawlerLabelKey is the label key used to identify searches created from a specific crawler. CrawlerLabelKey = Group + "/crawler" // PipelineTemplateAnnoation is the annotation containing the JSON // encoded pipeline template for the search scheduler. PipelineTemplateAnnotation = Group + "/pipeineTemplate.json" )
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: Group, Version: Version} // SchemeGroupVersion is group version used to register these objects. // It is the same as GroupVersion and provided for legacy compatibility. 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 AdditionalPodMetadata ¶ added in v0.2.2
type AdditionalPodMetadata struct {
// Annotations are key-value pairs that will be added to the pod running the scanners.
// +optional
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty" description:"Annotations of the object."`
// Labels are key-value pairs that will be added to the pod running the scanners.
// +optional
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty" description:"Labels of the object."`
}
func (*AdditionalPodMetadata) DeepCopy ¶ added in v0.2.2
func (in *AdditionalPodMetadata) DeepCopy() *AdditionalPodMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalPodMetadata.
func (*AdditionalPodMetadata) DeepCopyInto ¶ added in v0.2.2
func (in *AdditionalPodMetadata) DeepCopyInto(out *AdditionalPodMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterCrawler ¶ added in v0.2.5
type ClusterCrawler struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitzero"`
// Spec defines the desired state of ClusterCrawler
// This is identical to [CrawlerSpec]
// +required
Spec CrawlerSpec `json:"spec"`
// status defines the observed state of ClusterCrawler
// +optional
Status ClusterCrawlerStatus `json:"status,omitzero"`
}
ClusterCrawler is the Schema for the clustercrawlers API
func (*ClusterCrawler) DeepCopy ¶ added in v0.2.5
func (in *ClusterCrawler) DeepCopy() *ClusterCrawler
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCrawler.
func (*ClusterCrawler) DeepCopyInto ¶ added in v0.2.5
func (in *ClusterCrawler) DeepCopyInto(out *ClusterCrawler)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterCrawler) DeepCopyObject ¶ added in v0.2.5
func (in *ClusterCrawler) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterCrawlerList ¶ added in v0.2.5
type ClusterCrawlerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitzero"`
Items []ClusterCrawler `json:"items"`
}
ClusterCrawlerList contains a list of ClusterCrawler
func (*ClusterCrawlerList) DeepCopy ¶ added in v0.2.5
func (in *ClusterCrawlerList) DeepCopy() *ClusterCrawlerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCrawlerList.
func (*ClusterCrawlerList) DeepCopyInto ¶ added in v0.2.5
func (in *ClusterCrawlerList) DeepCopyInto(out *ClusterCrawlerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterCrawlerList) DeepCopyObject ¶ added in v0.2.5
func (in *ClusterCrawlerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterCrawlerStatus ¶ added in v0.2.5
type ClusterCrawlerStatus struct {
// Conditions represent the current state of the ClusterCrawler resource.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
ClusterCrawlerStatus defines the observed state of ClusterCrawler.
func (*ClusterCrawlerStatus) DeepCopy ¶ added in v0.2.5
func (in *ClusterCrawlerStatus) DeepCopy() *ClusterCrawlerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCrawlerStatus.
func (*ClusterCrawlerStatus) DeepCopyInto ¶ added in v0.2.5
func (in *ClusterCrawlerStatus) DeepCopyInto(out *ClusterCrawlerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterDownloader ¶ added in v0.2.5
type ClusterDownloader struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitzero"`
// spec defines the desired state of ClusterDownloader
// It is the same as [DownloaderSpec]
// +required
Spec DownloaderSpec `json:"spec"`
// status defines the observed state of ClusterDownloader
// +optional
Status ClusterDownloaderStatus `json:"status,omitzero"`
}
ClusterDownloader is the Schema for the clusterdownloaders API
func (*ClusterDownloader) DeepCopy ¶ added in v0.2.5
func (in *ClusterDownloader) DeepCopy() *ClusterDownloader
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDownloader.
func (*ClusterDownloader) DeepCopyInto ¶ added in v0.2.5
func (in *ClusterDownloader) DeepCopyInto(out *ClusterDownloader)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterDownloader) DeepCopyObject ¶ added in v0.2.5
func (in *ClusterDownloader) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterDownloaderList ¶ added in v0.2.5
type ClusterDownloaderList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitzero"`
Items []ClusterDownloader `json:"items"`
}
ClusterDownloaderList contains a list of ClusterDownloader
func (*ClusterDownloaderList) DeepCopy ¶ added in v0.2.5
func (in *ClusterDownloaderList) DeepCopy() *ClusterDownloaderList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDownloaderList.
func (*ClusterDownloaderList) DeepCopyInto ¶ added in v0.2.5
func (in *ClusterDownloaderList) DeepCopyInto(out *ClusterDownloaderList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterDownloaderList) DeepCopyObject ¶ added in v0.2.5
func (in *ClusterDownloaderList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterDownloaderStatus ¶ added in v0.2.5
type ClusterDownloaderStatus struct {
// Conditions represent the current state of the ClusterDownloader resource.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
ClusterDownloaderStatus defines the observed state of ClusterDownloader.
func (*ClusterDownloaderStatus) DeepCopy ¶ added in v0.2.5
func (in *ClusterDownloaderStatus) DeepCopy() *ClusterDownloaderStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDownloaderStatus.
func (*ClusterDownloaderStatus) DeepCopyInto ¶ added in v0.2.5
func (in *ClusterDownloaderStatus) DeepCopyInto(out *ClusterDownloaderStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterUploader ¶ added in v0.2.5
type ClusterUploader struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitzero"`
// spec defines the desired state of ClusterUploader
// This is the same as [UploaderSpec].
// +required
Spec UploaderSpec `json:"spec"`
// status defines the observed state of ClusterUploader
// +optional
Status ClusterUploaderStatus `json:"status,omitzero"`
}
ClusterUploader is the Schema for the clusteruploaders API
func (*ClusterUploader) DeepCopy ¶ added in v0.2.5
func (in *ClusterUploader) DeepCopy() *ClusterUploader
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterUploader.
func (*ClusterUploader) DeepCopyInto ¶ added in v0.2.5
func (in *ClusterUploader) DeepCopyInto(out *ClusterUploader)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterUploader) DeepCopyObject ¶ added in v0.2.5
func (in *ClusterUploader) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterUploaderList ¶ added in v0.2.5
type ClusterUploaderList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitzero"`
Items []ClusterUploader `json:"items"`
}
ClusterUploaderList contains a list of ClusterUploader
func (*ClusterUploaderList) DeepCopy ¶ added in v0.2.5
func (in *ClusterUploaderList) DeepCopy() *ClusterUploaderList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterUploaderList.
func (*ClusterUploaderList) DeepCopyInto ¶ added in v0.2.5
func (in *ClusterUploaderList) DeepCopyInto(out *ClusterUploaderList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterUploaderList) DeepCopyObject ¶ added in v0.2.5
func (in *ClusterUploaderList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterUploaderStatus ¶ added in v0.2.5
type ClusterUploaderStatus struct {
// The status of each condition is one of True, False, or Unknown.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
ClusterUploaderStatus defines the observed state of ClusterUploader.
func (*ClusterUploaderStatus) DeepCopy ¶ added in v0.2.5
func (in *ClusterUploaderStatus) DeepCopy() *ClusterUploaderStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterUploaderStatus.
func (*ClusterUploaderStatus) DeepCopyInto ¶ added in v0.2.5
func (in *ClusterUploaderStatus) DeepCopyInto(out *ClusterUploaderStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConcurrencyPolicy ¶
type ConcurrencyPolicy string
ConcurrencyPolicy describes how the job will be handled. Only one of the following concurrent policies may be specified. If none of the following policies is specified, the default one is AllowConcurrent. +kubebuilder:validation:Enum=Allow;Forbid;Replace
const ( // AllowConcurrent allows CronSearches to run concurrently. AllowConcurrent ConcurrencyPolicy = "Allow" // ForbidConcurrent forbids concurrent runs, skipping next run if previous // hasn't finished yet. ForbidConcurrent ConcurrencyPolicy = "Forbid" // ReplaceConcurrent cancels currently running search and replaces it with a new one. ReplaceConcurrent ConcurrencyPolicy = "Replace" )
type Crawler ¶
type Crawler struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitzero"`
// spec defines the desired state of Crawler
// +required
Spec CrawlerSpec `json:"spec"`
// status defines the observed state of Crawler
// +optional
Status CrawlerStatus `json:"status,omitzero"`
}
Crawler is the Schema for the crawlers API
func (*Crawler) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Crawler.
func (*Crawler) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Crawler) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CrawlerList ¶
type CrawlerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitzero"`
Items []Crawler `json:"items"`
}
CrawlerList contains a list of Crawler
func (*CrawlerList) DeepCopy ¶
func (in *CrawlerList) DeepCopy() *CrawlerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrawlerList.
func (*CrawlerList) DeepCopyInto ¶
func (in *CrawlerList) DeepCopyInto(out *CrawlerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CrawlerList) DeepCopyObject ¶
func (in *CrawlerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CrawlerSpec ¶
type CrawlerSpec struct {
// Container is the container that will be run to download the target.
// It must be a valid [v1.Container] that can be run in a Kubernetes pod.
// +required
Container v1.Container `json:"container" yaml:"container" description:"The container that will be run to enumerate targets and create Pipelines."`
// List of volumes that can be mounted by containers belonging to the pod.
// This list of volumes will be appended to the [k8s.io/api/core/v1.PodSpec] that runs the crawler,
// which will also include volumes defined by the other Uploader resources defined in the Profile of the Pipeline.
// More info: https://kubernetes.io/docs/concepts/storage/volumes
// +optional
// +patchMergeKey=name
// +patchStrategy=merge,retainKeys
// +listType=map
// +listMapKey=name
Volumes []v1.Volume `json:"volumes,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,2,rep,name=volumes"`
// Parameters is a list of ParameterDefinition that can be used to define "parameters"
// that the user can specify in a downloader reference that can configure how to download targets.
// +optional
// +patchMergeKey=name
// +patchStrategy=merge,retainKeys
// +listType=map
// +listMapKey=name
Parameters []ParameterDefinition `json:"parameters,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,3,rep,name=parameters"`
// AdditionalPodMetadata defines additional specifications to be added to the pod
// running the scanners, such as annotations and labels.
// +optional
AdditionalPodMetadata AdditionalPodMetadata `` /* 201-byte string literal not displayed */
}
CrawlerSpec defines the desired state of Crawler
func (*CrawlerSpec) DeepCopy ¶
func (in *CrawlerSpec) DeepCopy() *CrawlerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrawlerSpec.
func (*CrawlerSpec) DeepCopyInto ¶
func (in *CrawlerSpec) DeepCopyInto(out *CrawlerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CrawlerStatus ¶
type CrawlerStatus struct {
// Conditions is a list of conditions that the crawler is in.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty" description:"The latest available observations of a Uploader's current state."`
}
func (*CrawlerStatus) DeepCopy ¶
func (in *CrawlerStatus) DeepCopy() *CrawlerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrawlerStatus.
func (*CrawlerStatus) DeepCopyInto ¶
func (in *CrawlerStatus) DeepCopyInto(out *CrawlerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CronSearch ¶
type CronSearch struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitzero"`
// spec defines the desired state of CronSearch
// +required
Spec CronSearchSpec `json:"spec"`
// status defines the observed state of CronSearch
// +optional
Status CronSearchStatus `json:"status,omitzero"`
}
CronSearch is the Schema for the cronsearches API
func (*CronSearch) DeepCopy ¶
func (in *CronSearch) DeepCopy() *CronSearch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronSearch.
func (*CronSearch) DeepCopyInto ¶
func (in *CronSearch) DeepCopyInto(out *CronSearch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CronSearch) DeepCopyObject ¶
func (in *CronSearch) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CronSearchList ¶
type CronSearchList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitzero"`
Items []CronSearch `json:"items"`
}
CronSearchList contains a list of CronSearch
func (*CronSearchList) DeepCopy ¶
func (in *CronSearchList) DeepCopy() *CronSearchList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronSearchList.
func (*CronSearchList) DeepCopyInto ¶
func (in *CronSearchList) DeepCopyInto(out *CronSearchList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CronSearchList) DeepCopyObject ¶
func (in *CronSearchList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CronSearchSpec ¶
type CronSearchSpec struct {
// SearchTemplate is the template for the search that will be created when executing the CronSearch.
// +required
SearchTemplate SearchTemplateSpec `json:"searchTemplate" protobuf:"bytes,1,opt,name=searchTemplate"`
// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
Schedule string `json:"schedule" protobuf:"bytes,2,opt,name=schedule"`
// suspend tells the controller to suspend subsequent executions, it does
// not apply to already started executions. Defaults to false.
// +optional
Suspend *bool `json:"suspend,omitempty" protobuf:"varint,3,opt,name=suspend"`
// successfulJobsHistoryLimit defines the number of successful finished jobs to retain.
// This is a pointer to distinguish between explicit zero and not specified.
// +optional
// +kubebuilder:validation:Minimum=0
SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"`
// failedJobsHistoryLimit defines the number of failed finished jobs to retain.
// This is a pointer to distinguish between explicit zero and not specified.
// +optional
// +kubebuilder:validation:Minimum=0
FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"`
// concurrencyPolicy specifies how to treat concurrent executions of a Job.
// Valid values are:
// - "Allow" (default): allows CronJobs to run concurrently;
// - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
// - "Replace": cancels currently running search and replaces it with a new one
// +optional
// +kubebuilder:default:=Allow
ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"`
// startingDeadlineSeconds defines in seconds for starting the search if it misses scheduled
// time for any reason. Missed searches executions will be counted as failed ones.
// +optional
// +kubebuilder:validation:Minimum=0
StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"`
}
CronSearchSpec defines the desired state of CronSearch
func (*CronSearchSpec) DeepCopy ¶
func (in *CronSearchSpec) DeepCopy() *CronSearchSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronSearchSpec.
func (*CronSearchSpec) DeepCopyInto ¶
func (in *CronSearchSpec) DeepCopyInto(out *CronSearchSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CronSearchStatus ¶
type CronSearchStatus struct {
// Active defines a list of pointers to currently running searches.
// +optional
// +listType=atomic
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=10
Active []corev1.ObjectReference `json:"active,omitempty"`
// LastScheduleTime defines when was the last time the job was successfully scheduled.
// +optional
LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"`
// Conditions represent the current state of the CronSearch resource.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
CronSearchStatus defines the observed state of CronSearch.
func (*CronSearchStatus) DeepCopy ¶
func (in *CronSearchStatus) DeepCopy() *CronSearchStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronSearchStatus.
func (*CronSearchStatus) DeepCopyInto ¶
func (in *CronSearchStatus) DeepCopyInto(out *CronSearchStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Downloader ¶
type Downloader struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitzero"`
// spec defines the desired state of Downloader
// +required
Spec DownloaderSpec `json:"spec"`
// status defines the observed state of Downloader
// +optional
Status DownloaderStatus `json:"status,omitzero"`
}
Downloader is the Schema for the downloaders API
func (*Downloader) DeepCopy ¶
func (in *Downloader) DeepCopy() *Downloader
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Downloader.
func (*Downloader) DeepCopyInto ¶
func (in *Downloader) DeepCopyInto(out *Downloader)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Downloader) DeepCopyObject ¶
func (in *Downloader) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DownloaderList ¶
type DownloaderList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitzero"`
Items []Downloader `json:"items"`
}
DownloaderList contains a list of Downloader
func (*DownloaderList) DeepCopy ¶
func (in *DownloaderList) DeepCopy() *DownloaderList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownloaderList.
func (*DownloaderList) DeepCopyInto ¶
func (in *DownloaderList) DeepCopyInto(out *DownloaderList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DownloaderList) DeepCopyObject ¶
func (in *DownloaderList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DownloaderSpec ¶
type DownloaderSpec struct {
// Container is the container that will be run to download the target.
// It must be a valid [v1.Container] that can be run in a Kubernetes pod.
// +required
Container v1.Container `json:"container" protobuf:"bytes,1,opt,name=container"`
// List of volumes that can be mounted by containers belonging to the pod.
// More info: https://kubernetes.io/docs/concepts/storage/volumes
// +optional
// +patchMergeKey=name
// +patchStrategy=merge,retainKeys
// +listType=map
// +listMapKey=name
Volumes []v1.Volume `json:"volumes,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,2,rep,name=volumes"`
// MetadataFiles is a list of metadata files that the downloader will produce
// alongside the downloaded target. These files can contain additional information
// about the download process, such as checksums, download timestamps, or source URLs.
// +optional
// +kubebuilder:validation:MinItems=0
// +kubebuilder:validation:MaxItems=10
// +listType=set
MetadataFiles []string `json:"metadataFiles,omitempty" protobuf:"bytes,3,opt,name=metadataFiles" patchStrategy:"merge"`
// Parameters is a list of ParameterDefinition that can be used to define "parameters"
// that the user can specify in a downloader reference that can configure how to download targets.
// +optional
// +patchMergeKey=name
// +patchStrategy=merge,retainKeys
// +listType=map
// +listMapKey=name
Parameters []ParameterDefinition `json:"parameters,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,3,rep,name=parameters"`
}
func (*DownloaderSpec) DeepCopy ¶
func (in *DownloaderSpec) DeepCopy() *DownloaderSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownloaderSpec.
func (*DownloaderSpec) DeepCopyInto ¶
func (in *DownloaderSpec) DeepCopyInto(out *DownloaderSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DownloaderStatus ¶
type DownloaderStatus struct {
// Conditions represent the latest available observations of a Downloader's current state.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty" description:"The latest available observations of a Downloader's current state."`
}
func (*DownloaderStatus) DeepCopy ¶
func (in *DownloaderStatus) DeepCopy() *DownloaderStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownloaderStatus.
func (*DownloaderStatus) DeepCopyInto ¶
func (in *DownloaderStatus) DeepCopyInto(out *DownloaderStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvironmentVariableName ¶
type EnvironmentVariableName = string
const ( // EnvVarNamespaceName is the environment variable name for the name of the namespace // the pipeline or search is running in. EnvVarNamespaceName EnvironmentVariableName = "OCULAR_NAMESPACE_NAME" // EnvVarTargetIdentifier is the environment variable name for the target identifier. // It specifies the unique identifier of the target being analyzed. EnvVarTargetIdentifier EnvironmentVariableName = "OCULAR_TARGET_IDENTIFIER" // EnvVarTargetVersion is the environment variable name for the target version. // It specifies the version of the target being analyzed. // Will be empty if not provided. EnvVarTargetVersion EnvironmentVariableName = "OCULAR_TARGET_VERSION" // EnvVarDownloaderName is the environment variable name for the downloader name. // It specifies the name of the [Downloader] resource used in the pipeline to fetch the target. EnvVarDownloaderName EnvironmentVariableName = "OCULAR_DOWNLOADER_NAME" // EnvVarProfileName is the environment variable name for the profile name. // It specifies the name of the [Profile] resource used in the pipeline to define extraction and analysis settings. EnvVarProfileName EnvironmentVariableName = "OCULAR_PROFILE_NAME" // EnvVarPipelineName is the environment variable name for the pipeline name. // It specifies the name of the [Pipeline] resource orchestrating the analysis process. EnvVarPipelineName EnvironmentVariableName = "OCULAR_PIPELINE_NAME" // EnvVarTargetDir is the environment variable name for the target directory. // It specifies the directory path where the target is downloaded and extracted within the container. // This variable is only set for [ProfileSpec.Containers] and not for [Uploader] containers. EnvVarTargetDir EnvironmentVariableName = "OCULAR_TARGET_DIR" // EnvVarResultsDir is the environment variable name for the results directory. // It specifies the directory path where analysis results should be stored within the container. // This variable is set for both [ProfileSpec.Containers] and [Uploader] containers. EnvVarResultsDir EnvironmentVariableName = "OCULAR_RESULTS_DIR" // EnvVarMetadataDir is the environment variable name for the metadata directory. // It specifies the directory path where target metadata files are stored within the container. // This variable is only set for [ProfileSpec.Containers] and not for [Uploader] containers. EnvVarMetadataDir EnvironmentVariableName = "OCULAR_METADATA_DIR" // EnvVarUploaderName is the environment variable name for the uploader name. // It specifies the name of the [Uploader] resource used in the pipeline to upload analysis results. EnvVarUploaderName EnvironmentVariableName = "OCULAR_UPLOADER_NAME" // EnvVarSearchName is the environment variable name for the search name. EnvVarSearchName EnvironmentVariableName = "OCULAR_SEARCH_NAME" // EnvVarCrawlerName is the environment variable name for the crawler name. EnvVarCrawlerName EnvironmentVariableName = "OCULAR_CRAWLER_NAME" // EnvVarPipelineFIFO is the environment variable that contains the path // to a named pipe (or FIFO) that will read JSON targets and automatically start pipelines // with the spec from the pipeline template in the search spec. EnvVarPipelineFIFO EnvironmentVariableName = "OCULAR_PIPELINE_FIFO" // EnvVarSearchFIFO is the environment variable that contains the path // to a named pipe (or FIFO) that will read JSON crawler references and automatically start // searches with the same scheduler configuration (pipeline template and interval) EnvVarSearchFIFO EnvironmentVariableName = "OCULAR_SEARCH_FIFO" // EnvVarPipelineTemplatePath is the name of the environment variable that contains // the path to the JSON data of the pipeline template to use when creating pipelines // from a search EnvVarPipelineTemplatePath EnvironmentVariableName = "OCULAR_PIPELINE_TEMPLATE" // EnvVarPipelineSchedulerIntervalSeconds is how long the scheduler should sleep between // creating pipelines EnvVarPipelineSchedulerIntervalSeconds EnvironmentVariableName = "OCULAR_PIPELINE_SCHEDULER_INTERVAL_SEC" // EnvVarExtractorPort is the environment variable name for the extractor port. EnvVarSidecarExtractorPort EnvironmentVariableName = "OCULAR_SIDECAR_EXTRACTOR_PORT" // EnvVarExtractorHost is the environment variable name for the extractor host. EnvVarSidecarExtractorHost EnvironmentVariableName = "OCULAR_SIDECAR_EXTRACTOR_HOST" // EnvVarSidecarSchedulerCompletePath is the environment variable name for the path to // the file that is created when the crawler has completed EnvVarSidecarSchedulerCompletePath EnvironmentVariableName = "OCULAR_SIDECAR_SCHEDULER_COMPLETE_PATH" )
type ParameterDefinition ¶
type ParameterDefinition struct {
// Name is the name of the parameter.
// +required
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=64
// +kubebuilder:validation:Pattern=`^[a-zA-Z_][a-zA-Z0-9_]*$`
Name string `` /* 140-byte string literal not displayed */
// Description is the description of the parameter.
// +optional
Description string `` /* 143-byte string literal not displayed */
// Required is true if the parameter is required.
// If true, the execution will fail to start if the parameter is not provided.
// +required
Required bool `` /* 201-byte string literal not displayed */
// Default is the default value for the parameter.
// It is only valid if Required is false.
// A null value indicates that if there is no value provided, the environment variable will be unset.
// +optional
Default *string `` /* 175-byte string literal not displayed */
}
ParameterDefinition is a definition of a parameter that can be passed to a container. It defines the name of the parameter, a description of the parameter, whether the parameter is required, and a default value for the parameter (when not required).
func (*ParameterDefinition) DeepCopy ¶
func (in *ParameterDefinition) DeepCopy() *ParameterDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterDefinition.
func (*ParameterDefinition) DeepCopyInto ¶
func (in *ParameterDefinition) DeepCopyInto(out *ParameterDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParameterSetting ¶
type ParameterSetting struct {
// Name is the name of the parameter to set.
// +required
Name string `json:"name" yaml:"name" description:"The name of the parameter to set."`
// Value is the value to set the parameter to.
// +required
Value string `json:"value" yaml:"value" description:"The value to set the parameter to."`
}
func (*ParameterSetting) DeepCopy ¶
func (in *ParameterSetting) DeepCopy() *ParameterSetting
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterSetting.
func (*ParameterSetting) DeepCopyInto ¶
func (in *ParameterSetting) DeepCopyInto(out *ParameterSetting)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParameterizedObjectReference ¶
type ParameterizedObjectReference struct {
v1.ObjectReference `json:",inline"`
// Parameters is a list of parameters to pass to the referenced resource.
// as environment variables.
// +optional
// +patchMergeKey=name
// +patchStrategy=merge,retainKeys
// +listType=map
// +listMapKey=name
Parameters []ParameterSetting `json:"parameters,omitempty" yaml:"parameters,omitempty"`
}
ParameterizedObjectReference is a reference to a resource that will be run with parameters.
func (*ParameterizedObjectReference) DeepCopy ¶
func (in *ParameterizedObjectReference) DeepCopy() *ParameterizedObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterizedObjectReference.
func (*ParameterizedObjectReference) DeepCopyInto ¶
func (in *ParameterizedObjectReference) DeepCopyInto(out *ParameterizedObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Pipeline ¶
type Pipeline struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitzero"`
// spec defines the desired state of Pipeline
// +required
Spec PipelineSpec `json:"spec"`
// status defines the observed state of Pipeline
// +optional
Status PipelineStatus `json:"status,omitzero"`
}
Pipeline is the Schema for the downloaders API
func (*Pipeline) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pipeline.
func (*Pipeline) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Pipeline) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PipelineList ¶
type PipelineList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitzero"`
Items []Pipeline `json:"items"`
}
PipelineList contains a list of Pipeline
func (*PipelineList) DeepCopy ¶
func (in *PipelineList) DeepCopy() *PipelineList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineList.
func (*PipelineList) DeepCopyInto ¶
func (in *PipelineList) DeepCopyInto(out *PipelineList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PipelineList) DeepCopyObject ¶
func (in *PipelineList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PipelinePhase ¶ added in v0.2.3
type PipelinePhase string
PipelinePhase is a label for the condition of a pipeline at the current time. +enum
const ( // PipelinePending means the pipeline pods are still creating and have not been accepted by the system, // but one or more of the containers has not been started. PipelinePending PipelinePhase = "Pending" // PipelineDownloading means the pipeline scan pod is in the process of downloading the target. PipelineDownloading PipelinePhase = "Downloading" // PipelineScanning means that the pipeline scan pod is in the process of scanning the target. PipelineScanning PipelinePhase = "Scanning" // PipelineUploading means that the pipeline upload pod is in the process of uploading the results. PipelineUploading PipelinePhase = "Uploading" // PipelineSucceeded means that all containers in the pipeline have terminated in success // (exited with a zero exit code). PipelineSucceeded PipelinePhase = "Succeeded" // PipelineFailed means that one or more containers in the pipeline // (downloader, uploader, scanner) have terminated in a failure // (exited with a non-zero exit code or was stopped by the system). // View the pipeline's Reason or Conditions for more details. PipelineFailed PipelinePhase = "Failed" // PipelineStateUnknown means that for some reason the state of the pod could not be obtained, typically due // to an error in communicating with the host of the pod. PipelineStateUnknown PipelinePhase = "Unknown" )
These are the valid statuses of pods.
type PipelineSpec ¶
type PipelineSpec struct {
// DownloaderRef is a reference to the downloader that will be used in this pipeline.
// It should point to a valid Downloader resource in the same namespace.
// +required
DownloaderRef ParameterizedObjectReference `json:"downloaderRef" protobuf:"bytes,1,opt,name=downloaderRef"`
// ProfileRef is a reference to the profile that will be used in this pipeline.
// It should point to a valid Profile resource in the same namespace.
// +required
ProfileRef v1.ObjectReference `json:"profileRef" protobuf:"bytes,2,opt,name=profileRef"`
// Target is the actual software asset that will be processed by this pipeline.
// It is up to the Downloader to interpret the target correctly.
// +optional
Target Target `json:"target" protobuf:"bytes,3,opt,name=target"`
// ScanServiceAccountName is the name of the service account that will be used to run the scan job.
// If not set, the default service account of the namespace will be used.
// +optional
ScanServiceAccountName string `` /* 175-byte string literal not displayed */
// UploadServiceAccountName is the name of the service account that will be used to run the upload job.
// If not set, the default service account of the namespace will be used.
// +optional
UploadServiceAccountName string `` /* 181-byte string literal not displayed */
// TTLSecondsAfterFinished
// If set, the pipeline and its associated resources will be automatically deleted
// after the specified number of seconds have passed since the pipeline finished.
// +optional
TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty" protobuf:"bytes,6,opt,name=ttlSecondsAfterFinished"`
// TTLSecondsMaxLifetime
// If set, the pipeline and its associated resources will be automatically deleted
// after the specified number of seconds have passed since the pipeline was created,
// regardless of its state.
// +optional
TTLSecondsMaxLifetime *int32 `` /* 289-byte string literal not displayed */
}
func (*PipelineSpec) DeepCopy ¶
func (in *PipelineSpec) DeepCopy() *PipelineSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineSpec.
func (*PipelineSpec) DeepCopyInto ¶
func (in *PipelineSpec) DeepCopyInto(out *PipelineSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PipelineStageStatus ¶ added in v0.2.3
type PipelineStageStatus string
PipelineStageStatus represents the status of a specific (downloader, uploader, scanners) stage in the pipeline. +enum
const ( // PipelineStageNotStarted indicates that the stage has not started yet. PipelineStageNotStarted PipelineStageStatus = "NotStarted" // PipelineStageInProgress indicates that the stage is currently in progress. PipelineStageInProgress PipelineStageStatus = "InProgress" // PipelineStageCompleted indicates that the stage has completed successfully. PipelineStageCompleted PipelineStageStatus = "Completed" // PipelineStageFailed indicates that the stage has failed. PipelineStageFailed PipelineStageStatus = "Failed" // PipelineStageSkipped indicates that the stage was skipped. // either because the pipeline is configured to skip it, // or due to an earlier failure in the pipeline. PipelineStageSkipped PipelineStageStatus = "Skipped" )
type PipelineStageStatuses ¶ added in v0.2.3
type PipelineStageStatuses struct {
// DownloadStatus represents the current status of the download stage.
// +optional
DownloadStatus PipelineStageStatus `json:"downloadStatus" description:"The current status of the download stage."`
// ScanStatus represents the current status of the scan stage.
// +optional
ScanStatus PipelineStageStatus `json:"scanStatus" description:"The current status of the scan stage."`
// UploadStatus represents the current status of the upload stage.
// +optional
UploadStatus PipelineStageStatus `json:"uploadStatus" description:"The current status of the upload stage."`
}
PipelineStageStatuses represents the status of each stage in the pipeline.
func (*PipelineStageStatuses) DeepCopy ¶ added in v0.2.3
func (in *PipelineStageStatuses) DeepCopy() *PipelineStageStatuses
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineStageStatuses.
func (*PipelineStageStatuses) DeepCopyInto ¶ added in v0.2.3
func (in *PipelineStageStatuses) DeepCopyInto(out *PipelineStageStatuses)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PipelineStatus ¶
type PipelineStatus struct {
// Conditions latest available observations of an object's current state. When a Search
// fails, one of the conditions will have type [FailedConditionType] and status true.
// A search is considered finished when it is in a terminal condition, either
// [CompleteConditionType] or [FailedConditionType]. A Search cannot have both the [CompleteConditionType] and FailedConditionType] conditions.
//
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
// ScanPodOnly indicates if the pipeline is configured to run only the scan job without uploading results.
// This is true when the profile associated with the pipeline has no artifacts or uploaders defined.
// +optional
ScanPodOnly bool `` /* 134-byte string literal not displayed */
// StartTime is the time when the pipeline started.
// +optional
StartTime *metav1.Time `` /* 134-byte string literal not displayed */
// CompletionTime is the time when the pipeline completed.
// +optional
CompletionTime *metav1.Time `` /* 139-byte string literal not displayed */
// PipelinePhase is the current phase of the pipeline.
// For more information about a particular stage in the pipeline, refer to StageStatuses.
// +optional
Phase PipelinePhase `json:"phase" description:"The current state of the pipeline."`
// StageStatuses represents the current status of each stage in the pipeline.
// +optional
StageStatuses PipelineStageStatuses `json:"stageStatuses,omitempty,omitzero" description:"The current status of each stage in the pipeline."`
}
func (*PipelineStatus) DeepCopy ¶
func (in *PipelineStatus) DeepCopy() *PipelineStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineStatus.
func (*PipelineStatus) DeepCopyInto ¶
func (in *PipelineStatus) DeepCopyInto(out *PipelineStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PipelineTemplate ¶ added in v0.2.6
type PipelineTemplate struct {
// Standard object's metadata of the jobs created from this template.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// Since this is a template, only generateName, labels and annotations will be used.
// +optional
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
// Spec is the template for created pipelines.
// The "target" field will be overrwritten
// +optional
Spec PipelineSpec `json:"spec,omitempty"`
}
PipelineTemplate is the template for pipelines that are created from a Search
func (*PipelineTemplate) DeepCopy ¶ added in v0.2.6
func (in *PipelineTemplate) DeepCopy() *PipelineTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineTemplate.
func (*PipelineTemplate) DeepCopyInto ¶ added in v0.2.6
func (in *PipelineTemplate) DeepCopyInto(out *PipelineTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Profile ¶
type Profile struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitzero"`
// spec defines the desired state of Profile
// +required
Spec ProfileSpec `json:"spec"`
// status defines the current state of Profile
// +optional
Status ProfileStatus `json:"status,omitzero"`
}
Profile is the Schema for the profiles API
func (*Profile) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Profile.
func (*Profile) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Profile) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProfileList ¶
type ProfileList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitzero"`
Items []Profile `json:"items"`
}
ProfileList contains a list of Profile
func (*ProfileList) DeepCopy ¶
func (in *ProfileList) DeepCopy() *ProfileList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileList.
func (*ProfileList) DeepCopyInto ¶
func (in *ProfileList) DeepCopyInto(out *ProfileList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProfileList) DeepCopyObject ¶
func (in *ProfileList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProfileSpec ¶
type ProfileSpec struct {
// Containers is a list of [v1.Container] that will be run
// in parallel, with their current working directory set to
// the directory where the target has been downloaded to.
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=10
// +patchMergeKey=name
// +patchStrategy=merge
// +listType=map
// +listMapKey=name
Containers []v1.Container `` /* 243-byte string literal not displayed */
// Artifacts is a list of paths to the artifacts that will be produced
// by the scanners. These paths are relative to the results directory
// +optional
// +kubebuilder:validation:MinItems=0
// +kubebuilder:validation:MaxItems=20
// +listType=set
Artifacts []string `` /* 170-byte string literal not displayed */
// Volumes is a list of [v1.Volume] that will be defined in the pod spec
// for the scanners. This is useful for sharing data between scanners
// +optional
// +patchMergeKey=name
// +patchStrategy=merge,retainKeys
// +listType=map
// +listMapKey=name
Volumes []v1.Volume `` /* 218-byte string literal not displayed */
// UploaderRefs is a list of [UploaderRunSpec] that will be used to upload
// the results of the scanners. An uploader will be passed each of the artifacts
// as command line arguments, prefixed by the argument '--' . Each [UploaderObjectReference] must specify the
// name of the uploader and any parameters that are required.
// +optional
UploaderRefs []ParameterizedObjectReference `` /* 337-byte string literal not displayed */
// AdditionalPodMetadata defines additional specifications to be added to the pod
// running the scanners, such as annotations and labels.
// +optional
AdditionalPodMetadata AdditionalPodMetadata `` /* 212-byte string literal not displayed */
}
ProfileSpec defines the desired state of Profile
func (*ProfileSpec) DeepCopy ¶
func (in *ProfileSpec) DeepCopy() *ProfileSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileSpec.
func (*ProfileSpec) DeepCopyInto ¶
func (in *ProfileSpec) DeepCopyInto(out *ProfileSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProfileStatus ¶
type ProfileStatus struct {
// Conditions represent the latest available observations of a Profile's current state.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty" description:"The latest available observations of a Profile's current state."`
}
func (*ProfileStatus) DeepCopy ¶
func (in *ProfileStatus) DeepCopy() *ProfileStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileStatus.
func (*ProfileStatus) DeepCopyInto ¶
func (in *ProfileStatus) DeepCopyInto(out *ProfileStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Search ¶
type Search struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitzero"`
// spec defines the desired state of Search
// +required
Spec SearchSpec `json:"spec"`
// status defines the observed state of Search
// +optional
Status SearchStatus `json:"status,omitzero"`
}
Search is the Schema for the searches API
func (*Search) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Search.
func (*Search) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Search) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SearchList ¶
type SearchList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitzero"`
Items []Search `json:"items"`
}
SearchList contains a list of Search
func (*SearchList) DeepCopy ¶
func (in *SearchList) DeepCopy() *SearchList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SearchList.
func (*SearchList) DeepCopyInto ¶
func (in *SearchList) DeepCopyInto(out *SearchList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SearchList) DeepCopyObject ¶
func (in *SearchList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SearchSchedulerSpec ¶ added in v0.2.6
type SearchSchedulerSpec struct {
// PipelineTemplate is the template for pipelines that will be created from this search.
// The pipeline template will be read by the ocular sidecar container, and when it receives
// targets via the unix socket [EnvVarPipelineSocket], it will create a pipeline from the template
// with the received target set. If omitted, sidecar container will be disabled
// +optional
PipelineTemplate PipelineTemplate `json:"pipelineTemplate,omitempty"`
// IntervalSeconds represents the amount of time to wait
// between creating pipelines. If not set, scheduler defaults to
// 60 (1 minute).
// +optional
IntervalSeconds *int32 `json:"intervalSeconds,omitempty"`
}
SearchSchedulerSpec configures the scheduler sidecar container present on the search pod. The sechduler will read a Target JSON spec from the unix socket [EnvVarPipelineFifo] and create pipelines for each target. The pipeline will be derived from the PipelineTemplate (with the target replaced) and
func (*SearchSchedulerSpec) DeepCopy ¶ added in v0.2.6
func (in *SearchSchedulerSpec) DeepCopy() *SearchSchedulerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SearchSchedulerSpec.
func (*SearchSchedulerSpec) DeepCopyInto ¶ added in v0.2.6
func (in *SearchSchedulerSpec) DeepCopyInto(out *SearchSchedulerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SearchSpec ¶
type SearchSpec struct {
// CrawlerRef is a reference to the crawler that will be run in this search.
// It should point to a valid Crawler resource in the same namespace.
// +required
CrawlerRef ParameterizedObjectReference `json:"crawlerRef,omitempty" protobuf:"bytes,1,opt,name=crawlerRef"`
// TTLSecondsAfterFinished is the number of seconds to retain the search after it has finished.
// +optional
TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty" protobuf:"varint,2,opt,name=ttlSecondsAfterFinished"`
// ServiceAccountNameOverride is the name of the service account that will be used to run the scan job.
// If not set, the default service account of the namespace will be used.
// If not specified, a temporary ServiceAccount will be created for the search.
// NOTE: This ServiceAccount must exist in the same namespace as the Search.
// +optional
ServiceAccountNameOverride string `` /* 183-byte string literal not displayed */
// Scheduler represents the configuration of the scheduler sidecar
// +optional
Scheduler SearchSchedulerSpec `json:"scheduler,omitempty"`
}
SearchSpec defines the desired state of Search
func (*SearchSpec) DeepCopy ¶
func (in *SearchSpec) DeepCopy() *SearchSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SearchSpec.
func (*SearchSpec) DeepCopyInto ¶
func (in *SearchSpec) DeepCopyInto(out *SearchSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SearchStatus ¶
type SearchStatus struct {
// Conditions latest available observations of an object's current state. When a Search
// fails, one of the conditions will have type [FailedConditionType] and status true.
// A search is considered finished when it is in a terminal condition, either
// [CompleteConditionType] or [FailedConditionType]. A Search cannot have both the [CompleteConditionType] and FailedConditionType] conditions.
//
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
// StartTime is the time when the search started.
// +optional
StartTime *metav1.Time `` /* 130-byte string literal not displayed */
// CompletionTime is the time when the search completed.
// +optional
CompletionTime *metav1.Time `` /* 135-byte string literal not displayed */
// CronSearchControllerName is the name of the controller that created this search.
// +optional
CronSearchControllerName *string `json:"cronSearchControllerName,omitempty" description:"The name of the controller that created this search."`
}
SearchStatus defines the observed state of Search.
func (*SearchStatus) DeepCopy ¶
func (in *SearchStatus) DeepCopy() *SearchStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SearchStatus.
func (*SearchStatus) DeepCopyInto ¶
func (in *SearchStatus) DeepCopyInto(out *SearchStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SearchTemplateSpec ¶
type SearchTemplateSpec struct {
// Standard object's metadata of the searches created from this template.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec is the specification of the search to be created when executing the CronSearch.
// +required
Spec SearchSpec `json:"spec" protobuf:"bytes,1,opt,name=spec"`
}
func (*SearchTemplateSpec) DeepCopy ¶
func (in *SearchTemplateSpec) DeepCopy() *SearchTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SearchTemplateSpec.
func (*SearchTemplateSpec) DeepCopyInto ¶
func (in *SearchTemplateSpec) DeepCopyInto(out *SearchTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceAccountDefinition ¶
type ServiceAccountDefinition struct {
// Name is the name of the service account.
// +required
Name string `json:"name" yaml:"name" description:"The name of the service account that will be used to run the resource."`
// Namespace is the namespace of the service account.
// +optional
Namespace string `` /* 194-byte string literal not displayed */
// IgnoreMissing indicates whether the service account should be ignored if it is not found.
// +optional
IgnoreMissing bool `` /* 219-byte string literal not displayed */
// TokenProjection is the projection of the service account token that will be mounted into the pod.
// +optional
Token v1.ServiceAccountTokenProjection `` /* 187-byte string literal not displayed */
}
func (*ServiceAccountDefinition) DeepCopy ¶
func (in *ServiceAccountDefinition) DeepCopy() *ServiceAccountDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountDefinition.
func (*ServiceAccountDefinition) DeepCopyInto ¶
func (in *ServiceAccountDefinition) DeepCopyInto(out *ServiceAccountDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Target ¶
type Target struct {
// Identifier is a unique identifier for the target.
// This could be a URL, a file path, or any other string that uniquely identifies the target, it
// is up to the Downloader to interpret this string.
// +required
Identifier string `` /* 176-byte string literal not displayed */
// Version is an optional version string for the target.
// This could be a version number, a commit hash, or any other string that represents the version of the target.
// It is up to the Downloader to interpret this string.
// +optional
Version string `` /* 196-byte string literal not displayed */
}
Target represents a target to be downloaded by a Downloader. The Downloader is responsible for interpreting the Identifier and Version fields, and choosing how to represent the target in the filesystem for the Profile to analyze.
func (*Target) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Target.
func (*Target) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Uploader ¶
type Uploader struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitzero"`
// spec defines the desired state of Uploader
// +required
Spec UploaderSpec `json:"spec"`
// status defines the observed state of Uploader
// +optional
Status UploaderStatus `json:"status,omitzero"`
}
Uploader is the Schema for the uploaders API
func (*Uploader) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Uploader.
func (*Uploader) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Uploader) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type UploaderList ¶
type UploaderList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitzero"`
Items []Uploader `json:"items"`
}
UploaderList contains a list of Uploader
func (*UploaderList) DeepCopy ¶
func (in *UploaderList) DeepCopy() *UploaderList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UploaderList.
func (*UploaderList) DeepCopyInto ¶
func (in *UploaderList) DeepCopyInto(out *UploaderList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UploaderList) DeepCopyObject ¶
func (in *UploaderList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type UploaderSpec ¶
type UploaderSpec struct {
// Container is the container that will be run to download the target.
// It must be a valid [v1.Container] that can be run in a Kubernetes pod.
Container v1.Container `json:"container" protobuf:"bytes,1,opt,name=container"`
// List of volumes that can be mounted by containers belonging to the pod.
// This list of volumes will be appended to the [k8s.io/api/core/v1.PodSpec] that runs the uploader,
// which will also include volumes defined by the other Uploader resources defined in the Profile of the Pipeline.
// More info: https://kubernetes.io/docs/concepts/storage/volumes
// +optional
// +patchMergeKey=name
// +patchStrategy=merge,retainKeys
// +listType=map
// +listMapKey=name
Volumes []v1.Volume `json:"volumes,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,2,rep,name=volumes"`
// Parameters is a list of ParameterDefinition that can be used to define "parameters"
// that the user can specify in an uploader reference that can configure how to uploader results.
// +optional
// +patchMergeKey=name
// +patchStrategy=merge,retainKeys
// +listType=map
// +listMapKey=name
Parameters []ParameterDefinition `json:"parameters,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,3,rep,name=parameters"`
}
UploaderSpec defines the desired state of Uploader
func (*UploaderSpec) DeepCopy ¶
func (in *UploaderSpec) DeepCopy() *UploaderSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UploaderSpec.
func (*UploaderSpec) DeepCopyInto ¶
func (in *UploaderSpec) DeepCopyInto(out *UploaderSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UploaderStatus ¶
type UploaderStatus struct {
// Conditions is a list of conditions that the uploader is in.
// +optional
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty" description:"The latest available observations of a Uploader's current state."`
}
func (*UploaderStatus) DeepCopy ¶
func (in *UploaderStatus) DeepCopy() *UploaderStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UploaderStatus.
func (*UploaderStatus) DeepCopyInto ¶
func (in *UploaderStatus) DeepCopyInto(out *UploaderStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.