Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an ImageStreamLayers object for returning layers of a stream #56

Merged
merged 1 commit into from
Jul 10, 2018

Conversation

smarterclayton
Copy link
Contributor

@smarterclayton smarterclayton commented Jun 11, 2018

Allows bulk access to layers without making one call per image ID.

$ oc get --raw /apis/image.openshift.io/v1/namespaces/default/imagestreams/blah2/layers | python -m json.tool
{
    "apiVersion": "image.openshift.io/v1",
    "blobs": {
        "sha256:09f4550fd7ee48cd59c6fced7997af224f3f7f50f640e35121b6d9779564d447": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 20436
        },
        "sha256:0d16d0a97dd13a8ca0c0e205ce1f31f64d9d32048379eb322749442bff35f144": {
            "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
            "size": 0
        },
        "sha256:0e5c74178a0293459e3dd346bdf88ed27eca878d68b6befad3751970977e0470": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 83462473
        },
        "sha256:1accf44cb7e00a48bafe2e9fbc96baa759d5751efe646456cd9a2a697d27c0f5": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 1743
        },
        "sha256:2d830ea9fa681d855c1f5f7acba42cd2e00f1b6ccbcc8fe85b29adfe1f01182c": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 4498427
        },
        "sha256:2e34432011c242516c4dd6d1549b105cac5edfb7137a980a92bb0bc774296f96": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 2846
        },
        "sha256:302f27b6dac594d7741c2327a3b933951881fe095c1787ea7aba6f5127c67dae": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 10292630
        },
        "sha256:3df40c552a96d2e93b8881870a69ace4cd6d5cfebe1d58113cf1d7d6794e9774": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 86654708
        },
        "sha256:4d620357ec48b21e31fb4f8e42a1ac3f68d597c26d0258e4c9d28124640e4539": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 115
        },
        "sha256:54dd1949fa0f591f3e3493bfa577adbb809308910c508841a40b272c75c39403": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 121
        },
        "sha256:5f5ccdc8aedc4183c2f79dde76d7412913762bf0f0070cd503488b8989e1ed23": {
            "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
            "size": 0
        },
        "sha256:740584693b890bc45d22bffe4f47aaaa1f0418e573d062a8061a872e858150af": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 1270425
        },
        "sha256:7dc2b2613ec040e41c1374c3ff6a0aaf60d8915ea9b9d719c4c65e116fbda642": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 176
        },
        "sha256:820c37db8e67c369b629e6e10eba60c1aad7e3cbacc6d124c4e562c15aebc2ea": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 121
        },
        "sha256:a18dadcb91adce0710c976c84469a63d8d5d91fd1a33fc4cc780d0505aa1e089": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 44207072
        },
        "sha256:a48d784ee5030cb3279143350913fa37cc66fa33a04374172ca9e638b3aded1c": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 20438
        },
        "sha256:a55d2213fe96f00c820a9f72fe699ec925cb6ce0733adb01645f5d436ce3c307": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 2877
        },
        "sha256:a8a59477268d92f434d86a73b5ea6de9bf7b05d536359413e79da1feb31f87aa": {
            "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
            "size": 0
        },
        "sha256:ac3b7158d73d447e93bc14b190412e4d9ce4cf9b23399d6557ea53180b454d7f": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 12092374
        },
        "sha256:baf0b766a7b0f51b3cef5f93cbab178a77f2802d39e635c851cd00f3b3dd63fb": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 121
        },
        "sha256:bf1194add2f3fb0b05e440f3f2fa868e909df3bfc942d7a49ce0ca2efd8a5a00": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 223
        },
        "sha256:bf1ac4524e8e2dfb396a5827aed812f25945d4058efb7491f09c85e45e783535": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 121
        },
        "sha256:cc891ef0eba50e2a0129bc138d884cd5ea6e18e846e23e369ded5a2e78aba171": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 27497419
        },
        "sha256:d8885e673ba61f69c47dbb07d52ec66218a6564c29305ba8f108dfdf527d5b61": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 238
        },
        "sha256:da7d77a8ed2840ebdb8dc0daba5a21867eadd068e6b268bfb0c965de3ea70d3b": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 897
        },
        "sha256:e9201d309436463a254bbca545b840438aaa56628838392a2497947b5850008e": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 2867
        },
        "sha256:f03c5af3b206e239ddce7a9bb062406d17ea10be2b9bec0fb10ac0b00ba422e3": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 2939
        },
        "sha256:f122eadb264019370dbb9eac74d62c210320849190fd58224957247469e910de": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 225
        },
        "sha256:f13c4be36ec5661aeff6bbeafc2ddc292d9f19c28dc825b800d84974b0ceb67d": {
            "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
            "size": 0
        },
        "sha256:f2aa67a397c49232112953088506d02074a1fe577f65dc2052f158a3e5da52e8": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 22496029
        },
        "sha256:f5cd6ee094d7bfab8d1b21e210c5e6a278a8e84d1ed006f447a98b6b08d81812": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 10169122
        },
        "sha256:f6cac39ec886e1d88b0127c2eb129f0d0a79585e3468d84f8a851e009fcb1f85": {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 223
        }
    },
    "kind": "ImageStreamLayers",
    "layers": {
        "sha256:16eefe638c159c5e94d04d031cce5afae0bb873bb145f2343c36d26ff80ab275": [
            "sha256:f2aa67a397c49232112953088506d02074a1fe577f65dc2052f158a3e5da52e8",
            "sha256:1accf44cb7e00a48bafe2e9fbc96baa759d5751efe646456cd9a2a697d27c0f5",
            "sha256:2d830ea9fa681d855c1f5f7acba42cd2e00f1b6ccbcc8fe85b29adfe1f01182c",
            "sha256:740584693b890bc45d22bffe4f47aaaa1f0418e573d062a8061a872e858150af",
            "sha256:4d620357ec48b21e31fb4f8e42a1ac3f68d597c26d0258e4c9d28124640e4539",
            "sha256:f5cd6ee094d7bfab8d1b21e210c5e6a278a8e84d1ed006f447a98b6b08d81812",
            "sha256:09f4550fd7ee48cd59c6fced7997af224f3f7f50f640e35121b6d9779564d447",
            "sha256:f6cac39ec886e1d88b0127c2eb129f0d0a79585e3468d84f8a851e009fcb1f85",
            "sha256:a18dadcb91adce0710c976c84469a63d8d5d91fd1a33fc4cc780d0505aa1e089",
            "sha256:2e34432011c242516c4dd6d1549b105cac5edfb7137a980a92bb0bc774296f96",
            "sha256:820c37db8e67c369b629e6e10eba60c1aad7e3cbacc6d124c4e562c15aebc2ea"
        ],
        "sha256:7a33a8bd719ff0fed4f75ba9f0b6e4963c88f6547039a92070ca5ff4ddc4289f": [
            "sha256:f2aa67a397c49232112953088506d02074a1fe577f65dc2052f158a3e5da52e8",
            "sha256:1accf44cb7e00a48bafe2e9fbc96baa759d5751efe646456cd9a2a697d27c0f5",
            "sha256:2d830ea9fa681d855c1f5f7acba42cd2e00f1b6ccbcc8fe85b29adfe1f01182c",
            "sha256:740584693b890bc45d22bffe4f47aaaa1f0418e573d062a8061a872e858150af",
            "sha256:4d620357ec48b21e31fb4f8e42a1ac3f68d597c26d0258e4c9d28124640e4539",
            "sha256:ac3b7158d73d447e93bc14b190412e4d9ce4cf9b23399d6557ea53180b454d7f",
            "sha256:a48d784ee5030cb3279143350913fa37cc66fa33a04374172ca9e638b3aded1c",
            "sha256:f122eadb264019370dbb9eac74d62c210320849190fd58224957247469e910de",
            "sha256:3df40c552a96d2e93b8881870a69ace4cd6d5cfebe1d58113cf1d7d6794e9774",
            "sha256:da7d77a8ed2840ebdb8dc0daba5a21867eadd068e6b268bfb0c965de3ea70d3b",
            "sha256:f03c5af3b206e239ddce7a9bb062406d17ea10be2b9bec0fb10ac0b00ba422e3",
            "sha256:54dd1949fa0f591f3e3493bfa577adbb809308910c508841a40b272c75c39403"
        ],
        "sha256:81679f23e0ece3e50a7300050191272e5afbf5b66be9b60d2ee0e8b575b152e2": [
            "sha256:f2aa67a397c49232112953088506d02074a1fe577f65dc2052f158a3e5da52e8",
            "sha256:1accf44cb7e00a48bafe2e9fbc96baa759d5751efe646456cd9a2a697d27c0f5",
            "sha256:2d830ea9fa681d855c1f5f7acba42cd2e00f1b6ccbcc8fe85b29adfe1f01182c",
            "sha256:740584693b890bc45d22bffe4f47aaaa1f0418e573d062a8061a872e858150af",
            "sha256:4d620357ec48b21e31fb4f8e42a1ac3f68d597c26d0258e4c9d28124640e4539",
            "sha256:ac3b7158d73d447e93bc14b190412e4d9ce4cf9b23399d6557ea53180b454d7f",
            "sha256:a48d784ee5030cb3279143350913fa37cc66fa33a04374172ca9e638b3aded1c",
            "sha256:bf1194add2f3fb0b05e440f3f2fa868e909df3bfc942d7a49ce0ca2efd8a5a00",
            "sha256:0e5c74178a0293459e3dd346bdf88ed27eca878d68b6befad3751970977e0470",
            "sha256:e9201d309436463a254bbca545b840438aaa56628838392a2497947b5850008e",
            "sha256:bf1ac4524e8e2dfb396a5827aed812f25945d4058efb7491f09c85e45e783535"
        ],
        "sha256:b2160bd12cc78f45b74d36dff2707ce6f0be5142272617d2c8246c516c289753": [
            "sha256:f2aa67a397c49232112953088506d02074a1fe577f65dc2052f158a3e5da52e8",
            "sha256:1accf44cb7e00a48bafe2e9fbc96baa759d5751efe646456cd9a2a697d27c0f5",
            "sha256:2d830ea9fa681d855c1f5f7acba42cd2e00f1b6ccbcc8fe85b29adfe1f01182c",
            "sha256:740584693b890bc45d22bffe4f47aaaa1f0418e573d062a8061a872e858150af",
            "sha256:4d620357ec48b21e31fb4f8e42a1ac3f68d597c26d0258e4c9d28124640e4539",
            "sha256:302f27b6dac594d7741c2327a3b933951881fe095c1787ea7aba6f5127c67dae",
            "sha256:cc891ef0eba50e2a0129bc138d884cd5ea6e18e846e23e369ded5a2e78aba171",
            "sha256:d8885e673ba61f69c47dbb07d52ec66218a6564c29305ba8f108dfdf527d5b61",
            "sha256:7dc2b2613ec040e41c1374c3ff6a0aaf60d8915ea9b9d719c4c65e116fbda642",
            "sha256:a55d2213fe96f00c820a9f72fe699ec925cb6ce0733adb01645f5d436ce3c307",
            "sha256:baf0b766a7b0f51b3cef5f93cbab178a77f2802d39e635c851cd00f3b3dd63fb"
        ]
    },
    "manifests": {
        "sha256:16eefe638c159c5e94d04d031cce5afae0bb873bb145f2343c36d26ff80ab275": "sha256:5f5ccdc8aedc4183c2f79dde76d7412913762bf0f0070cd503488b8989e1ed23",
        "sha256:7a33a8bd719ff0fed4f75ba9f0b6e4963c88f6547039a92070ca5ff4ddc4289f": "sha256:a8a59477268d92f434d86a73b5ea6de9bf7b05d536359413e79da1feb31f87aa",
        "sha256:81679f23e0ece3e50a7300050191272e5afbf5b66be9b60d2ee0e8b575b152e2": "sha256:0d16d0a97dd13a8ca0c0e205ce1f31f64d9d32048379eb322749442bff35f144",
        "sha256:b2160bd12cc78f45b74d36dff2707ce6f0be5142272617d2c8246c516c289753": "sha256:f13c4be36ec5661aeff6bbeafc2ddc292d9f19c28dc825b800d84974b0ceb67d"
    },
    "metadata": {
        "annotations": {
            "openshift.io/image.dockerRepositoryCheck": "2018-06-11T22:15:46Z"
        },
        "creationTimestamp": "2018-06-11T22:15:46Z",
        "generation": 2,
        "name": "blah2",
        "namespace": "default",
        "resourceVersion": "5155",
        "selfLink": "/apis/image.openshift.io/v1/namespaces/default/imagestreams/blah2/layers",
        "uid": "fd067b7e-6dc4-11e8-924c-7831c1b76042"
    }
}

@smarterclayton
Copy link
Contributor Author

Note that this is not intended to be the same API that would be used by a hypothetical future "generic layer API", because we would likely want different things like the ability to retrieve specific layers and their presence. Instead, this is an API for the singular purpose of efficiently resolving a single image stream into its component layers and manifests for the registry to consume (although the web console may also use this for layer similarity if it chooses).

@smarterclayton smarterclayton changed the title Add an ImageStreamLayers object for returning layers of a stream WIP - 3.11 - Add an ImageStreamLayers object for returning layers of a stream Jun 12, 2018
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 12, 2018
Allows bulk access to layers without making one call per image ID.
@smarterclayton smarterclayton changed the title WIP - 3.11 - Add an ImageStreamLayers object for returning layers of a stream Add an ImageStreamLayers object for returning layers of a stream Jul 8, 2018
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 8, 2018
@smarterclayton
Copy link
Contributor Author

API reviewed in openshift/origin#19969

@openshift/api-review can you provide final sign off here and merge?

@liggitt liggitt added this to the v3.11 milestone Jul 9, 2018
@deads2k
Copy link
Contributor

deads2k commented Jul 10, 2018

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2018
@deads2k deads2k merged commit 0d5017f into openshift:master Jul 10, 2018
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/api that referenced this pull request Feb 1, 2021
fix(codegen): add doc.go in operators/v1 to support informer-gen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants