Documentation ¶
Overview ¶
+k8s:openapi-gen=true +k8s:deepcopy-gen=package +k8s:defaulter-gen=TypeMeta +groupName=reports.scanner.appscode.com
Index ¶
- Constants
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func RegisterDefaults(scheme *runtime.Scheme) error
- func Resource(resource string) schema.GroupResource
- func SetObjectDefaults_CVEReport(in *CVEReport)
- func SetObjectDefaults_Image(in *Image)
- func SetObjectDefaults_Workload(in *Workload)
- func SetObjectDefaults_WorkloadList(in *WorkloadList)
- type CVEReport
- type CVEReportRequest
- type CVEReportResponse
- type Image
- type ImageConfig
- type ImageInfo
- type ImageMetadata
- type ImageReference
- type ImageRequest
- type ImageResponse
- type ImageScanStatus
- type RiskStats
- type ScanResult
- type VulnerabilityInfo
- type Workload
- type WorkloadList
- type WorkloadSpec
Constants ¶
const ( ResourceKindImage = "Image" ResourceImage = "image" ResourceImages = "images" )
const ( ResourceKindCVEReport = "CVEReport" ResourceCVEReport = "cvereport" ResourceCVEReports = "cvereports" )
const ( ResourceKindWorkload = "Workload" ResourceWorkload = "workload" ResourceWorkloads = "workloads" )
Variables ¶
var ( // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: reports.GroupName, Version: "v1alpha1"}
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
func RegisterDefaults ¶
RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
func SetObjectDefaults_CVEReport ¶ added in v0.0.19
func SetObjectDefaults_CVEReport(in *CVEReport)
func SetObjectDefaults_Image ¶ added in v0.0.19
func SetObjectDefaults_Image(in *Image)
func SetObjectDefaults_Workload ¶
func SetObjectDefaults_Workload(in *Workload)
func SetObjectDefaults_WorkloadList ¶
func SetObjectDefaults_WorkloadList(in *WorkloadList)
Types ¶
type CVEReport ¶
type CVEReport struct { metav1.TypeMeta `json:",inline"` // 1. Request equals nil means, we want the report in cluster scope // 2. Group is set to ""(core) & Kind to Namespace means, we want the report in particular namespaced scope // 3. For general cases, all the fields need to be set. // +optional Request *CVEReportRequest `json:"request,omitempty"` // +optional Response *CVEReportResponse `json:"response,omitempty"` }
+genclient +genclient:nonNamespaced +genclient:onlyVerbs=create +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*CVEReport) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CVEReport.
func (*CVEReport) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CVEReport) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CVEReportRequest ¶
type CVEReportRequest struct {
kmapi.ObjectInfo `json:",inline"`
}
func (*CVEReportRequest) DeepCopy ¶
func (in *CVEReportRequest) DeepCopy() *CVEReportRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CVEReportRequest.
func (*CVEReportRequest) DeepCopyInto ¶
func (in *CVEReportRequest) DeepCopyInto(out *CVEReportRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CVEReportResponse ¶
type CVEReportResponse struct { Images []ImageInfo `json:"images"` Vulnerabilities VulnerabilityInfo `json:"vulnerabilities"` }
func (*CVEReportResponse) DeepCopy ¶
func (in *CVEReportResponse) DeepCopy() *CVEReportResponse
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CVEReportResponse.
func (*CVEReportResponse) DeepCopyInto ¶
func (in *CVEReportResponse) DeepCopyInto(out *CVEReportResponse)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Image ¶
type Image struct { metav1.TypeMeta `json:",inline"` // 1. Request equals nil means, we want the report in cluster scope // 2. Group is set to ""(core) & Kind to Namespace means, we want the report in particular namespaced scope // 3. For general cases, all the fields need to be set. // +optional Request *ImageRequest `json:"request,omitempty"` // Response lists the images used by the request object // +optional Response *ImageResponse `json:"response,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:resource:path=images,singular=image,scope=Cluster
func (*Image) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image.
func (*Image) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Image) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ImageConfig ¶
type ImageConfig struct { Architecture string `json:"architecture,omitempty"` Author string `json:"author,omitempty"` Container string `json:"container,omitempty"` Os string `json:"os,omitempty"` }
func (*ImageConfig) DeepCopy ¶
func (in *ImageConfig) DeepCopy() *ImageConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageConfig.
func (*ImageConfig) DeepCopyInto ¶
func (in *ImageConfig) DeepCopyInto(out *ImageConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageInfo ¶
type ImageInfo struct { Image ImageReference `json:"image"` Metadata *ImageMetadata `json:"metadata,omitempty"` Stats map[string]RiskStats `json:"stats"` ScanStatus ImageScanStatus `json:"scanStatus"` }
func (*ImageInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageInfo.
func (*ImageInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageMetadata ¶
type ImageMetadata struct { Os *trivy.ImageOS `json:"os,omitempty"` ImageConfig *ImageConfig `json:"imageConfig,omitempty"` }
func (*ImageMetadata) DeepCopy ¶
func (in *ImageMetadata) DeepCopy() *ImageMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageMetadata.
func (*ImageMetadata) DeepCopyInto ¶
func (in *ImageMetadata) DeepCopyInto(out *ImageMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageReference ¶
type ImageReference struct { Name string `json:"name"` Tag string `json:"tag,omitempty"` Digest string `json:"digest,omitempty"` }
func (*ImageReference) DeepCopy ¶
func (in *ImageReference) DeepCopy() *ImageReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageReference.
func (*ImageReference) DeepCopyInto ¶
func (in *ImageReference) DeepCopyInto(out *ImageReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageRequest ¶
type ImageRequest struct {
kmapi.ObjectInfo `json:",inline"`
}
func (*ImageRequest) DeepCopy ¶
func (in *ImageRequest) DeepCopy() *ImageRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRequest.
func (*ImageRequest) DeepCopyInto ¶
func (in *ImageRequest) DeepCopyInto(out *ImageRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageResponse ¶
func (*ImageResponse) DeepCopy ¶
func (in *ImageResponse) DeepCopy() *ImageResponse
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageResponse.
func (*ImageResponse) DeepCopyInto ¶
func (in *ImageResponse) DeepCopyInto(out *ImageResponse)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageScanStatus ¶
type ImageScanStatus struct { Result ScanResult `json:"result"` // A human-readable message indicating details about scan result. // +optional Message string `json:"message,omitempty"` ReportRef *core.LocalObjectReference `json:"reportRef,omitempty"` // which TrivyDBVersion was used when the last check // +optional TrivyDBVersion *trivy.Time `json:"trivyDBVersion,omitempty"` }
func (*ImageScanStatus) DeepCopy ¶
func (in *ImageScanStatus) DeepCopy() *ImageScanStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageScanStatus.
func (*ImageScanStatus) DeepCopyInto ¶
func (in *ImageScanStatus) DeepCopyInto(out *ImageScanStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RiskStats ¶ added in v0.0.3
func (*RiskStats) DeepCopy ¶ added in v0.0.3
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RiskStats.
func (*RiskStats) DeepCopyInto ¶ added in v0.0.3
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScanResult ¶
type ScanResult string
const ( ScanResultPending ScanResult = "Pending" ScanResultFound ScanResult = "Found" ScanResultNotFound ScanResult = "NotFound" ScanResultError ScanResult = "Error" )
type VulnerabilityInfo ¶
type VulnerabilityInfo struct { Stats map[string]RiskStats `json:"stats"` CVEs []trivy.VulnerabilityInfo `json:"cves"` }
func (*VulnerabilityInfo) DeepCopy ¶
func (in *VulnerabilityInfo) DeepCopy() *VulnerabilityInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VulnerabilityInfo.
func (*VulnerabilityInfo) DeepCopyInto ¶
func (in *VulnerabilityInfo) DeepCopyInto(out *VulnerabilityInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Workload ¶
type Workload struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec WorkloadSpec `json:"spec,omitempty"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Workload) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workload.
func (*Workload) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Workload) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkloadList ¶
type WorkloadList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Workload `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*WorkloadList) DeepCopy ¶
func (in *WorkloadList) DeepCopy() *WorkloadList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadList.
func (*WorkloadList) DeepCopyInto ¶
func (in *WorkloadList) DeepCopyInto(out *WorkloadList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkloadList) DeepCopyObject ¶
func (in *WorkloadList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkloadSpec ¶
type WorkloadSpec struct { // A label query over pods that are managed by the daemon set. // Must match in order to be controlled. // It must match the pod template's labels. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors Selector *metav1.LabelSelector `json:"selector"` Template corev1.PodTemplateSpec `json:"template,omitempty"` }
WorkloadSpec defines the desired state of Workload
func (*WorkloadSpec) DeepCopy ¶
func (in *WorkloadSpec) DeepCopy() *WorkloadSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadSpec.
func (*WorkloadSpec) DeepCopyInto ¶
func (in *WorkloadSpec) DeepCopyInto(out *WorkloadSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.