Skip to content

Commit a603052

Browse files
committed
update openshift API paths to groupified path
1 parent 67b1f78 commit a603052

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

openshift/openshift.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func (c *openshiftClient) doRequest(ctx context.Context, method, path string, re
136136
// getImage loads the specified image object.
137137
func (c *openshiftClient) getImage(ctx context.Context, imageStreamImageName string) (*image, error) {
138138
// FIXME: validate components per validation.IsValidPathSegmentName?
139-
path := fmt.Sprintf("/oapi/v1/namespaces/%s/imagestreamimages/%s@%s", c.ref.namespace, c.ref.stream, imageStreamImageName)
139+
path := fmt.Sprintf("/apis/image.openshift.io/v1/namespaces/%s/imagestreamimages/%s@%s", c.ref.namespace, c.ref.stream, imageStreamImageName)
140140
body, err := c.doRequest(ctx, "GET", path, nil)
141141
if err != nil {
142142
return nil, err
@@ -265,7 +265,7 @@ func (s *openshiftImageSource) ensureImageIsResolved(ctx context.Context) error
265265
}
266266

267267
// FIXME: validate components per validation.IsValidPathSegmentName?
268-
path := fmt.Sprintf("/oapi/v1/namespaces/%s/imagestreams/%s", s.client.ref.namespace, s.client.ref.stream)
268+
path := fmt.Sprintf("/apis/image.openshift.io/v1/namespaces/%s/imagestreams/%s", s.client.ref.namespace, s.client.ref.stream)
269269
body, err := s.client.doRequest(ctx, "GET", path, nil)
270270
if err != nil {
271271
return err
@@ -476,7 +476,7 @@ sigExists:
476476
Content: newSig,
477477
}
478478
body, err := json.Marshal(sig)
479-
_, err = d.client.doRequest(ctx, "POST", "/oapi/v1/imagesignatures", body)
479+
_, err = d.client.doRequest(ctx, "POST", "/apis/image.openshift.io/v1/imagesignatures", body)
480480
if err != nil {
481481
return err
482482
}

0 commit comments

Comments
 (0)