Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Support warming images by digest#1629

Merged
tejal29 merged 1 commit intoGoogleContainerTools:masterfrom
airplanedev:colin-warm-digest
Apr 22, 2021
Merged

Support warming images by digest#1629
tejal29 merged 1 commit intoGoogleContainerTools:masterfrom
airplanedev:colin-warm-digest

Conversation

@colinking
Copy link
Copy Markdown
Contributor

@colinking colinking commented Apr 20, 2021

Description

This PR adds support to the Kaniko warmer for referencing images by digest.

Before:

❯ go run ./cmd/warmer --cache-dir ./test --image=node@sha256:91ec6cb0d47628e4c1ace1efe3835aaddb2a16a9549da4f86782bb05437c53d2 --customPlatform=linux/amd64
Failed warming cache: Failed to verify image name: node@sha256:91ec6cb0d47628e4c1ace1efe3835aaddb2a16a9549da4f86782bb05437c53d2: repository can only contain the runes `abcdefghijklmnopqrstuvwxyz0123456789_-./`: node@sha256
exit status 1

After:

❯ go run ./cmd/warmer --cache-dir ./test --image=node@sha256:91ec6cb0d47628e4c1ace1efe3835aaddb2a16a9549da4f86782bb05437c53d2 --customPlatform=linux/amd64
INFO[0000] Retrieving image manifest node@sha256:91ec6cb0d47628e4c1ace1efe3835aaddb2a16a9549da4f86782bb05437c53d2
INFO[0000] Retrieving image node@sha256:91ec6cb0d47628e4c1ace1efe3835aaddb2a16a9549da4f86782bb05437c53d2 from registry index.docker.io

❯ ls -la ./test
total 680712
drwxr-xr-x   4 colin  staff        128 Apr 20 12:32 .
drwxr-xr-x  36 colin  staff       1152 Apr 20 12:32 ..
-rw-r--r--   1 colin  staff  348519424 Apr 20 12:32 sha256:91ec6cb0d47628e4c1ace1efe3835aaddb2a16a9549da4f86782bb05437c53d2
-rw-r--r--   1 colin  staff       2214 Apr 20 12:32 sha256:91ec6cb0d47628e4c1ace1efe3835aaddb2a16a9549da4f86782bb05437c53d2.json

Submitter Checklist

Not sure if this change qualifies the need for new unit tests :)

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Adds integration tests if needed.

See the contribution guide for more details.

Reviewer Notes

  • The code flow looks good.
  • Unit tests and or integration tests added.

Release Notes

Updates the warmer to support --image references by digest, such as --image node@sha256:91ec6cb0d47628e4c1ace1efe3835aaddb2a16a9549da4f86782bb05437c53d2

@google-cla google-cla Bot added the cla: yes CLA signed by all commit authors label Apr 20, 2021
@tejal29 tejal29 merged commit b33f965 into GoogleContainerTools:master Apr 22, 2021
@colinking colinking deleted the colin-warm-digest branch April 22, 2021 22:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes CLA signed by all commit authors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants