Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dmage committed Jul 30, 2020
1 parent 49e8811 commit 415ba05
Show file tree
Hide file tree
Showing 6 changed files with 1,124 additions and 2,262 deletions.
5 changes: 2 additions & 3 deletions pkg/cli/admin/prune/imageprune/helper.go
Expand Up @@ -42,13 +42,12 @@ func (ba isByAge) Less(i, j int) bool {

// DetermineRegistryHost returns registry host embedded in a pull-spec of the latest unmanaged image or the
// latest imagestream from the provided lists. If no such pull-spec is found, error is returned.
func DetermineRegistryHost(images *imagev1.ImageList, imageStreams *imagev1.ImageStreamList) (string, error) {
func DetermineRegistryHost(images map[string]*imagev1.Image, imageStreams *imagev1.ImageStreamList) (string, error) {
var pullSpec string
var managedImages []*imagev1.Image

// 1st try to determine registry url from a pull spec of the youngest managed image
for i := range images.Items {
image := &images.Items[i]
for _, image := range images {
if image.Annotations[imagev1.ManagedByOpenShiftAnnotation] != "true" {
continue
}
Expand Down

0 comments on commit 415ba05

Please sign in to comment.