Skip to content

Commit

Permalink
Merge pull request #1530 from flavianmissi/OCPBUGS-17925
Browse files Browse the repository at this point in the history
OCPBUGS-17925: pkg/cli/admin/prune/images: omit not found error for deployment configs
  • Loading branch information
openshift-merge-robot committed Aug 28, 2023
2 parents 70d3cc5 + f2a9657 commit 795bf1a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/cli/admin/prune/images/images.go
Expand Up @@ -270,9 +270,11 @@ func (o PruneImagesOptions) Validate() error {
return nil
}

var errNoRegistryURLPathAllowed = errors.New("no path after <host>[:<port>] is allowed")
var errNoRegistryURLQueryAllowed = errors.New("no query arguments are allowed after <host>[:<port>]")
var errRegistryURLHostEmpty = errors.New("no host name specified")
var (
errNoRegistryURLPathAllowed = errors.New("no path after <host>[:<port>] is allowed")
errNoRegistryURLQueryAllowed = errors.New("no query arguments are allowed after <host>[:<port>]")
errRegistryURLHostEmpty = errors.New("no host name specified")
)

// validateRegistryURL returns error if the given input is not a valid registry URL. The url may be prefixed
// with http:// or https:// schema. It may not contain any path or query after the host:[port].
Expand Down Expand Up @@ -355,7 +357,7 @@ func (o PruneImagesOptions) Run() error {
}

allDCs, err := o.AppsClient.DeploymentConfigs(o.Namespace).List(context.TODO(), metav1.ListOptions{})
if err != nil {
if err != nil && !kerrors.IsNotFound(err) {
return err
}

Expand Down

0 comments on commit 795bf1a

Please sign in to comment.