You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 23, 2022. It is now read-only.
- Do not allow Node manifests to contain objects that link to
other Node manifests.
- Add how proposal solves requirements at the bottom.
Signed-off-by: nisha <[email protected]>
Copy file name to clipboardexpand all lines: docs/proposals/PROPOSAL_C.md
+43-62
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Create a Node manifest.
4
4
5
5
## Description
6
6
7
-
The proposal introduces a "Node" manifest used to organize container images with related artifacts or to group container images together into a higher order artifact. It is based on the typical "Node" data structure used for creating linked lists.
7
+
The proposal introduces a "Node" manifest used to organize container images with related artifacts or to group container images together into a higher order artifact. It is based on the typical "Node" data structure.
8
8
9
9
A detailed description of this proposal can be found [here](https://docs.google.com/document/d/1KYJaCm5Z-BJ7hVOI_lDh4vEvrmyEAMwUp2nJBELstGw/edit).
10
10
@@ -28,7 +28,7 @@ The JSON Schema for a "node" manifest looks like this:
28
28
"mediaType":"application/vnd.oci.node.v1+json",
29
29
"description":"This is a generic node object",
30
30
"objects": [
31
-
... list of blob descriptors...
31
+
... list of blob descriptors...
32
32
],
33
33
"reference": {
34
34
... one blob descriptor
@@ -37,6 +37,10 @@ The JSON Schema for a "node" manifest looks like this:
37
37
}
38
38
}
39
39
```
40
+
Restrictions on this manifest schema to prevent loops and reduce load on server side processing:
41
+
42
+
- "objects" CANNOT contain descriptors to another Node manifest.
43
+
- "reference" has a cardinality of 0..1 i.e. it can either contain 0 or 1 descriptor.
40
44
41
45
This is an example of using the node manifest to refer multiple ice cream ingredients to a specific ice cream:
42
46
@@ -97,7 +101,7 @@ This is an example of multiple ice creams grouped together to make one ice cream
97
101
}
98
102
```
99
103
100
-
_NOTE_:The Node manifest looks very similar to the [index](https://github.com/opencontainers/image-spec/blob/main/image-index.md). It may be possible to modify the index manifest to incorporate these features.
104
+
_NOTE_:The Node manifest looks very similar to the [index](https://github.com/opencontainers/image-spec/blob/main/image-index.md). Further experiments need to be done in order to assert that the index schema can accept OCI descriptors as well as image manifests.
101
105
102
106
This is an example of using a Node manifest to describe a single ingredient:
103
107
@@ -117,67 +121,9 @@ This is an example of using a Node manifest to describe a single ingredient:
117
121
}
118
122
```
119
123
120
-
This is an example of creating a tree structure with the node manifest:
121
-
122
-
Existing ice creams:
123
-
124
-
```jsonc
125
-
{
126
-
"schemaVersion":3,
127
-
"mediaType":"application/vnd.oci.node.v1+json",
128
-
"description":"Vanilla Ice Cream - created two months ago",
"description":"Vanilla Chocolate Swirl - created two days ago",
161
-
"objects": [
162
-
{
163
-
"mediaType":"application/vnd.oci.node.v1+json",
164
-
"size":15,
165
-
"digest":"sha256:b1ab1ab1a"
166
-
},
167
-
{
168
-
"mediaType":"application/vnd.oci.node.v1+json",
169
-
"size":12,
170
-
"digest":"sha256:cabba9ebeef"
171
-
}
172
-
]
173
-
"reference": {}
174
-
}
175
-
176
-
```
177
-
178
124
### Registry HTTP API
179
125
180
-
No modifications to the existing API are needed. The proposal includes the following new APIs
126
+
No modifications to the existing API are needed. The proposal includes the following new APIs:
181
127
182
128
#### References to a tag or digest
183
129
@@ -321,3 +267,38 @@ Gives response:
321
267
"Chocolate Sprinkles Ice Cream"
322
268
}
323
269
```
270
+
271
+
## Requirements
272
+
273
+
### Filtering
274
+
275
+
- Query for artifact: use `GET/v3/<name>/manifests/<reference>`.
276
+
- Query for referrers to an artifact: use `GET/v3/<name>/referrers/<reference>`.
277
+
- Query for referrers of a given type to an artifact: use `GET/v3/<name>/referrers/<reference>`, then use clinet to filter based on `description`. This is to allow artifact producers to include specific keywords rather than relying on IANA artifact types.
278
+
- Query for referrers to an artifact with certain annotations: Not supported.
279
+
- Query for the most up-to-date artifacts: If Node manifests are used to combine artifacts of a certain type, and a client follows a pattern where the most up-to-date artifact is appended to the beginning of the list, then the most up-to-date artifact is the one at the beginning of the list. However, there isn't any strong protection against not following these rules. Clients will have to rely on some indicator in the description that points to the "latest" artifact.
280
+
- Tag reduction: Node manifests pointing to a list of artifacts removes the requirement to tag the artifacts themselves if needed.
281
+
282
+
### Backwards Compatibility
283
+
284
+
- Impact on existing runtimes: Existing manifests such as container or index manifests are not affected.
285
+
- Moving artifacts to and from old and new registries: Registries that do not support node manifests require the client to create tags for each of the embedded artifacts before pushing them. All the information in description and reference will be lost. Registries that support node manifests have no effect on artifacts that require tagging.
286
+
- Pull artifacts by tag: Node manifests will not affect tags on other artifacts.
287
+
- Impact on existing artifacts: Node manifests should not modify existing artifacts nor create duplicates of the same artifact, as is the case with existing registries.
288
+
- Checking registry for references support: use `GET/v3/`. Catalog listing is not prescribed in this proposal.
289
+
- Server side mount: If a large blob is pushed to the registry and then referenced by a Node manifest, a server side mount should be possible.
290
+
- Image Layout: unaffected.
291
+
292
+
### Content Management
293
+
294
+
- Storing groups of artifacts with a reference to another artifact: Node manifests support this.
295
+
- Deleting referencing artifacts: use `GET/v3/<name>/referrers/<reference>` to get a list of referring artifacts and then delete all or specific ones.
296
+
- Push artifacts that reference a non existent artifact: This is should be possible if registries don't perform a check that the digest exists.
297
+
- Move selected referrers to other registries: The client is responsible for selection of the artifacts and pushing to the target registries, including checks if the registry supports node manifests.
298
+
- Artifact lifecycle management: Node manifests allow for lifecycle policies to be applied to the list of objects.
299
+
- Immutable tags: Not supported in this proposal. However, collections of different types of artifacts may be referenced by a long lived tag.
300
+
- Updating an existing artifact: use `GET/v3/<name>/manifests/<reference>` to fetch a node manifest, then update the objects list with a new artifact. OR, use the existing APIs.
301
+
- Avoiding race conditions when pushing to the same endpoint: Not addressed by this proposal.
302
+
- Requires/Provides relationships: Use the description to indicate the reference is a "requires" or "provides" relationship.
303
+
- Supplier information: Node manifests can include attestation, signature, and SBOM artifacts, which can be li,ked using references.
304
+
- Timestamp and retention policies: Server side policies on node manifest size or length of the objects list can be enforced. Timestamp data may be embedded in the description. A registry provider would then have to require that every node manifest have timestamp data in the description which it can read.
0 commit comments