Skip to content

Commit 8cf8c5a

Browse files
fix: change vulnerable to non-compliant (#351)
* change vulnerable to non-compliant * removed unused files
1 parent 6b50987 commit 8cf8c5a

File tree

9 files changed

+11
-6906
lines changed

9 files changed

+11
-6906
lines changed

api/v1alpha1/imagelist_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919

2020
// ImageListSpec defines the desired state of ImageList.
2121
type ImageListSpec struct {
22-
// The list of vulnerable images to delete if non-running.
22+
// The list of non-compliant images to delete if non-running.
2323
Images []string `json:"images"`
2424
}
2525

config/crd/bases/eraser.sh_imagejobstatuses.yaml

Lines changed: 0 additions & 66 deletions
This file was deleted.

config/crd/bases/eraser.sh_imagelists.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ spec:
3636
description: ImageListSpec defines the desired state of ImageList.
3737
properties:
3838
images:
39-
description: The list of vulnerable images to delete if non-running.
39+
description: The list of non-compliant images to delete if non-running.
4040
items:
4141
type: string
4242
type: array

config/crd/eraser.sh_imagejobs.yaml

Lines changed: 0 additions & 6731 deletions
This file was deleted.

config/crd/eraser.sh_imagelists.yaml

Lines changed: 0 additions & 98 deletions
This file was deleted.

docs/docs/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ slug: /
55

66
# Introduction
77

8-
When deploying to Kubernetes, it's common for pipelines to build and push images to a cluster, but it's much less common for these images to be cleaned up. This can lead to accumulating bloat on the disk, and a host of vulnerable images lingering on the nodes.
8+
When deploying to Kubernetes, it's common for pipelines to build and push images to a cluster, but it's much less common for these images to be cleaned up. This can lead to accumulating bloat on the disk, and a host of non-compliant images lingering on the nodes.
99

1010
The current garbage collection process deletes images based on a percentage of load, but this process does not consider the vulnerability state of the images. **Eraser** aims to provide a simple way to determine the state of an image, and delete it if it meets the specified criteria.

manifest_staging/charts/eraser/templates/imagelists.eraser.sh-customresourcedefinition.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ spec:
3636
description: ImageListSpec defines the desired state of ImageList.
3737
properties:
3838
images:
39-
description: The list of vulnerable images to delete if non-running.
39+
description: The list of non-compliant images to delete if non-running.
4040
items:
4141
type: string
4242
type: array

manifest_staging/deploy/eraser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4030,7 +4030,7 @@ spec:
40304030
description: ImageListSpec defines the desired state of ImageList.
40314031
properties:
40324032
images:
4033-
description: The list of vulnerable images to delete if non-running.
4033+
description: The list of non-compliant images to delete if non-running.
40344034
items:
40354035
type: string
40364036
type: array

pkg/eraser/eraser.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,21 +88,21 @@ func main() {
8888
// json data is list of []eraserv1alpha1.Image
8989
data, err := io.ReadAll(f)
9090
if err != nil {
91-
log.Error(err, "error reading vulnerableImages")
91+
log.Error(err, "error reading non-compliant images")
9292
os.Exit(generalErr)
9393
}
9494

95-
vulnerableImages := []eraserv1alpha1.Image{}
96-
if err = json.Unmarshal(data, &vulnerableImages); err != nil {
97-
log.Error(err, "error in unmarshal vulnerableImages")
95+
nonCompliantImages := []eraserv1alpha1.Image{}
96+
if err = json.Unmarshal(data, &nonCompliantImages); err != nil {
97+
log.Error(err, "error in unmarshal non-compliant images")
9898
os.Exit(generalErr)
9999
}
100100

101-
for _, img := range vulnerableImages {
101+
for _, img := range nonCompliantImages {
102102
imagelist = append(imagelist, img.Digest)
103103
}
104104

105-
log.Info("successfully created imagelist from scanned vulnerableImages")
105+
log.Info("successfully created imagelist from scanned non-compliant images")
106106
} else {
107107
imagelist, err = util.ParseImageList(*imageListPtr)
108108
if err != nil {

0 commit comments

Comments
 (0)