Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package +k8s:defaulter-gen=TypeMeta +groupName=shipwright.io
Index ¶
- Variables
- func Resource(resource string) schema.GroupResource
- type Failure
- type ImageReference
- type ImageScan
- func (s *ImageScan) AssureReference(img *imgv1b1.Image)
- func (in *ImageScan) DeepCopy() *ImageScan
- func (in *ImageScan) DeepCopyInto(out *ImageScan)
- func (in *ImageScan) DeepCopyObject() runtime.Object
- func (s *ImageScan) DeleteReference(delref ImageReference)
- func (s *ImageScan) Executed() bool
- func (s *ImageScan) HasFailed() bool
- func (s *ImageScan) HasReference(img *imgv1b1.Image) bool
- func (s *ImageScan) HasReferences() bool
- func (s *ImageScan) PrependFailure(err error)
- type ImageScanList
- type ImageScanStatus
- type Vulnerability
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeBuilder collects functions that add things to a scheme. It's to allow // code to compile without explicitly referencing generated types. You should // declare one in each package that will have generated deep copy or conversion SchemeBuilder runtime.SchemeBuilder // AddToScheme applies all the stored functions to the scheme. A non-nil error // indicates that one function failed and the attempt was abandoned. AddToScheme = localSchemeBuilder.AddToScheme )
var ( // MaxScanAttempts holds how many times we gonna try to scan an ImageImport object // before giving up. MaxScanAttempts = 10 )
var SchemeGroupVersion = schema.GroupVersion{
Group: "shipwright.io",
Version: "v1beta1",
}
SchemeGroupVersion is the group/version for Image resources.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Failure ¶
Failure represents a failure during a scan attempt. It is a very generic struct that serves the purpose of just keeping a list of errors found during image scan attempts.
func (*Failure) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Failure.
func (*Failure) DeepCopyInto ¶
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"` Namespace string `json:"namespace"` UID types.UID `json:"uid"` }
ImageReference holds a reference to a single Shipwright Image object.
type ImageScan ¶
type ImageScan struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Status ImageScanStatus `json:"status"` }
ImageScan holds the result of an Image vulnerability scan. ImageScans scope is global, we do not keep them per namespace. All ImageScans are named after the image layer hash.
func (*ImageScan) AssureReference ¶
AssureReference makes sure that the ImageScan has a reference to provided Image in its status.
func (*ImageScan) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageScan.
func (*ImageScan) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ImageScan) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ImageScan) DeleteReference ¶
func (s *ImageScan) DeleteReference(delref ImageReference)
DeleteReference deletes an Image reference from the list of references.
func (*ImageScan) Executed ¶
Executed returns true if the scan has already been executed in the past.
func (*ImageScan) HasFailed ¶
HasFailed returns if we still have attempts to be executed. i.e. if we have failed more than MaxScanAttempts attempts.
func (*ImageScan) HasReference ¶
HasReference returns if the ImageScan has a reference to provided Image.
func (*ImageScan) HasReferences ¶
HasReferences returns true if the ImageScan contains one or more Image references in its status
func (*ImageScan) PrependFailure ¶
PrependFailure prepends a failure to the scan list of failures. Keep at max MaxScanAttempts failures before rotating them.
type ImageScanList ¶
type ImageScanList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` Items []ImageScan `json:"items" protobuf:"bytes,2,rep,name=items"` }
ImageScanList holds a list of ImageScan objects.
func (*ImageScanList) DeepCopy ¶
func (in *ImageScanList) DeepCopy() *ImageScanList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageScanList.
func (*ImageScanList) DeepCopyInto ¶
func (in *ImageScanList) DeepCopyInto(out *ImageScanList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ImageScanList) DeepCopyObject ¶
func (in *ImageScanList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ImageScanStatus ¶
type ImageScanStatus struct { Failures []Failure `json:"failures,omitempty"` FinishedAt *metav1.Time `json:"finishedAt,omitempty"` Vulnerabilities []Vulnerability `json:"vulnerabilities,omitempty"` References []ImageReference `json:"references,omitempty"` }
ImageScanStatus hold the status for the last image scan this operator ran.
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 Vulnerability ¶
type Vulnerability struct { ID string `json:"id"` Severity string `json:"severity"` Description string `json:"description"` }
Vulnerability describes a vulnerability found in an image. ID points to a CVE while severity is scanner dependant.
func (*Vulnerability) DeepCopy ¶
func (in *Vulnerability) DeepCopy() *Vulnerability
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Vulnerability.
func (*Vulnerability) DeepCopyInto ¶
func (in *Vulnerability) DeepCopyInto(out *Vulnerability)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Directories ¶
Path | Synopsis |
---|---|
generated
|
|
clientset/versioned
This package has the automatically generated clientset.
|
This package has the automatically generated clientset. |
clientset/versioned/fake
This package has the automatically generated fake clientset.
|
This package has the automatically generated fake clientset. |
clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
|
This package contains the scheme of the automatically generated clientset. |
clientset/versioned/typed/scans/v1beta1
This package has the automatically generated typed clients.
|
This package has the automatically generated typed clients. |
clientset/versioned/typed/scans/v1beta1/fake
Package fake has the automatically generated clients.
|
Package fake has the automatically generated clients. |