fix(oras)!: remove ORAS artifact references support (#2294)

* fix(oras)!: remove ORAS artifact references support

ORAS artifacts/references predated OCI dist-spec 1.1.0 which now has the
same functionality and likely to see wider adoption.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>

* test: update to released official images

So that they are unlikely to be deleted.
*-rc images may be cleaned up over time.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
Ramkumar Chinchani
2024-03-06 12:16:42 -08:00
committed by GitHub
parent 5039128723
commit 18235ca254
25 changed files with 35 additions and 1687 deletions
+6 -61
View File
@@ -19,61 +19,6 @@ const docTemplate = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/oras/artifacts/v1/{name}/manifests/{digest}/referrers": {
"get": {
"description": "Get references for an image given a digest and artifact type",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Get references for an image",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "image digest",
"name": "digest",
"in": "path",
"required": true
},
{
"type": "string",
"description": "artifact type",
"name": "artifactType",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "ok",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/": {
"get": {
"description": "Check if this API version is supported",
@@ -1211,7 +1156,7 @@ const docTemplate = `{
"description": "Manifests references platform specific manifests.",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_opencontainers_image-spec_specs-go_v1.Descriptor"
"$ref": "#/definitions/v1.Descriptor"
}
},
"mediaType": {
@@ -1226,7 +1171,7 @@ const docTemplate = `{
"description": "Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.",
"allOf": [
{
"$ref": "#/definitions/github_com_opencontainers_image-spec_specs-go_v1.Descriptor"
"$ref": "#/definitions/v1.Descriptor"
}
]
}
@@ -1250,7 +1195,7 @@ const docTemplate = `{
"description": "Config references a configuration object for a container, by digest.\nThe referenced configuration object is a JSON blob that the runtime uses to set up the container.",
"allOf": [
{
"$ref": "#/definitions/github_com_opencontainers_image-spec_specs-go_v1.Descriptor"
"$ref": "#/definitions/v1.Descriptor"
}
]
},
@@ -1258,7 +1203,7 @@ const docTemplate = `{
"description": "Layers is an indexed list of layers referenced by the manifest.",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_opencontainers_image-spec_specs-go_v1.Descriptor"
"$ref": "#/definitions/v1.Descriptor"
}
},
"mediaType": {
@@ -1273,7 +1218,7 @@ const docTemplate = `{
"description": "Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.",
"allOf": [
{
"$ref": "#/definitions/github_com_opencontainers_image-spec_specs-go_v1.Descriptor"
"$ref": "#/definitions/v1.Descriptor"
}
]
}
@@ -1412,7 +1357,7 @@ const docTemplate = `{
}
}
},
"github_com_opencontainers_image-spec_specs-go_v1.Descriptor": {
"v1.Descriptor": {
"type": "object",
"properties": {
"annotations": {
+6 -61
View File
@@ -11,61 +11,6 @@
"version": "v1.1.0"
},
"paths": {
"/oras/artifacts/v1/{name}/manifests/{digest}/referrers": {
"get": {
"description": "Get references for an image given a digest and artifact type",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Get references for an image",
"parameters": [
{
"type": "string",
"description": "repository name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "image digest",
"name": "digest",
"in": "path",
"required": true
},
{
"type": "string",
"description": "artifact type",
"name": "artifactType",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "ok",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/v2/": {
"get": {
"description": "Check if this API version is supported",
@@ -1203,7 +1148,7 @@
"description": "Manifests references platform specific manifests.",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_opencontainers_image-spec_specs-go_v1.Descriptor"
"$ref": "#/definitions/v1.Descriptor"
}
},
"mediaType": {
@@ -1218,7 +1163,7 @@
"description": "Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.",
"allOf": [
{
"$ref": "#/definitions/github_com_opencontainers_image-spec_specs-go_v1.Descriptor"
"$ref": "#/definitions/v1.Descriptor"
}
]
}
@@ -1242,7 +1187,7 @@
"description": "Config references a configuration object for a container, by digest.\nThe referenced configuration object is a JSON blob that the runtime uses to set up the container.",
"allOf": [
{
"$ref": "#/definitions/github_com_opencontainers_image-spec_specs-go_v1.Descriptor"
"$ref": "#/definitions/v1.Descriptor"
}
]
},
@@ -1250,7 +1195,7 @@
"description": "Layers is an indexed list of layers referenced by the manifest.",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_opencontainers_image-spec_specs-go_v1.Descriptor"
"$ref": "#/definitions/v1.Descriptor"
}
},
"mediaType": {
@@ -1265,7 +1210,7 @@
"description": "Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.",
"allOf": [
{
"$ref": "#/definitions/github_com_opencontainers_image-spec_specs-go_v1.Descriptor"
"$ref": "#/definitions/v1.Descriptor"
}
]
}
@@ -1404,7 +1349,7 @@
}
}
},
"github_com_opencontainers_image-spec_specs-go_v1.Descriptor": {
"v1.Descriptor": {
"type": "object",
"properties": {
"annotations": {
+6 -43
View File
@@ -31,7 +31,7 @@ definitions:
manifests:
description: Manifests references platform specific manifests.
items:
$ref: '#/definitions/github_com_opencontainers_image-spec_specs-go_v1.Descriptor'
$ref: '#/definitions/v1.Descriptor'
type: array
mediaType:
description: MediaType specifies the type of this document data structure
@@ -42,7 +42,7 @@ definitions:
type: integer
subject:
allOf:
- $ref: '#/definitions/github_com_opencontainers_image-spec_specs-go_v1.Descriptor'
- $ref: '#/definitions/v1.Descriptor'
description: Subject is an optional link from the image manifest to another
manifest forming an association between the image manifest and the other
manifest.
@@ -60,14 +60,14 @@ definitions:
type: string
config:
allOf:
- $ref: '#/definitions/github_com_opencontainers_image-spec_specs-go_v1.Descriptor'
- $ref: '#/definitions/v1.Descriptor'
description: |-
Config references a configuration object for a container, by digest.
The referenced configuration object is a JSON blob that the runtime uses to set up the container.
layers:
description: Layers is an indexed list of layers referenced by the manifest.
items:
$ref: '#/definitions/github_com_opencontainers_image-spec_specs-go_v1.Descriptor'
$ref: '#/definitions/v1.Descriptor'
type: array
mediaType:
description: MediaType specifies the type of this document data structure
@@ -78,7 +78,7 @@ definitions:
type: integer
subject:
allOf:
- $ref: '#/definitions/github_com_opencontainers_image-spec_specs-go_v1.Descriptor'
- $ref: '#/definitions/v1.Descriptor'
description: Subject is an optional link from the image manifest to another
manifest forming an association between the image manifest and the other
manifest.
@@ -168,7 +168,7 @@ definitions:
releaseTag:
type: string
type: object
github_com_opencontainers_image-spec_specs-go_v1.Descriptor:
v1.Descriptor:
properties:
annotations:
additionalProperties:
@@ -247,43 +247,6 @@ info:
title: Open Container Initiative Distribution Specification
version: v1.1.0
paths:
/oras/artifacts/v1/{name}/manifests/{digest}/referrers:
get:
consumes:
- application/json
description: Get references for an image given a digest and artifact type
parameters:
- description: repository name
in: path
name: name
required: true
type: string
- description: image digest
in: path
name: digest
required: true
type: string
- description: artifact type
in: query
name: artifactType
required: true
type: string
produces:
- application/json
responses:
"200":
description: ok
schema:
type: string
"404":
description: not found
schema:
type: string
"500":
description: internal server error
schema:
type: string
summary: Get references for an image
/v2/:
get:
consumes: