-
Notifications
You must be signed in to change notification settings - Fork 6
[KOGITO-8121]-Clean up images used by Kaniko in the docker registry #10
Conversation
22df9bd
to
71139e9
Compare
c360bfd
to
803309f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Max, one question, where exactly these images will be store?
Is it working for k8s/ocp embedded registry?
or is it just a tool for cleaning local registries?
@spolti I'm starting with local registry then I'll test with remote, but I'm expecting that the only change is the credentials and url of the docker/podman registry |
jenkins test this |
c070e72
to
d1bcc51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just a few comments if you don't mind!
cleaner/podman/cleaner.go
Outdated
// For example tcp://localhost:<port> | ||
// or unix:///run/podman/podman.sock | ||
// or ssh://<user>@<host>[:port]/run/podman/podman.sock?secure=True | ||
func GetRemoteConnection(uri string, identity string) (context.Context, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we consider adding an interface for these features? Podman and Docker have a similar API, and I believe we can leverage that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, we can unify using some converter methods to expose only strings or boolean where the results provides docker or podman specific entities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! I don't think we need additional packages for this implementation. I'd do:
cleaner
- cleaner.go
- podman.go
- docker.go
for local registry isn`t better just add some instructions in the readme? |
@spolti I believe local is needed once the CLI starts using it. |
afbe106
to
49e71ca
Compare
@spolti I'll add the env to set to use local or remote registry |
fab9d60
to
d707b85
Compare
1198d28
to
037566b
Compare
cleaner/docker.go
Outdated
return images | ||
} | ||
|
||
func (d Docker) GetImagesFiltered(args filters.Args) ([]types.ImageSummary, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imho this method and the above one can be combined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, merged into
GetImages(args types.ImageListOptions)
GetAllImages can be called using
d.GetImages(types.ImageListOptions{All: true})
GetImageFiltered can be called using
filters := filters.NewArgs()
filters.Add("dangling", "true")
images, err := d.GetImages(types.ImageListOptions{Filters: filters})
6498a27
to
3aa8e7d
Compare
Signed-off-by: desmax74 <mdessi@redhat.com>
ce82912
to
c00d0e3
Compare
See:https://issues.redhat.com/browse/KOGITO-8121
Signed-off-by: desmax74 mdessi@redhat.com
Description of the change:
Motivation for the change:
Checklist