This repository was archived by the owner on Jun 3, 2025. It is now read-only.
Persistent volume caching for base images#383
Merged
sharifelgamal merged 21 commits intoGoogleContainerTools:masterfrom Oct 11, 2018
Merged
Persistent volume caching for base images#383sharifelgamal merged 21 commits intoGoogleContainerTools:masterfrom
sharifelgamal merged 21 commits intoGoogleContainerTools:masterfrom
Conversation
dlorenc
reviewed
Oct 5, 2018
| func addHiddenFlags(cmd *cobra.Command) { | ||
| } | ||
|
|
||
| func exit(err error) { |
Contributor
There was a problem hiding this comment.
nit: we shouldn't need this if we return an error
|
|
||
| // RetrieveLayer checks the specified cache for a layer with the tag :cacheKey | ||
| func RetrieveLayer(opts *config.KanikoOptions, cacheKey string) (v1.Image, error) { | ||
| if local, _ := LocalDestination(opts, cacheKey); local != nil { |
Contributor
There was a problem hiding this comment.
Maybe "source" instead of "destination"?
| fmt.Print(err) | ||
| errors.Wrap(err, fmt.Sprintf("Failed to verify image name: %s", image)) | ||
| } | ||
| k8sc, err := k8schain.NewNoClient() |
Contributor
There was a problem hiding this comment.
hmm, should we use a normal keychain if we're not on k8s?
dlorenc
reviewed
Oct 10, 2018
| WORKDIR /go/src/github.com/GoogleContainerTools/kaniko | ||
| COPY . . | ||
| RUN make | ||
| # Get GCR credential helper |
Contributor
There was a problem hiding this comment.
Do we need the helpers if we're relying on open auth?
Contributor
Author
There was a problem hiding this comment.
nope. removed.
dlorenc
approved these changes
Oct 11, 2018
| fmt.Printf("CACHEKEY=%s", cacheKey) | ||
| return cache.LocalDestination(opts, cacheKey) | ||
|
|
||
| k8sc, err := k8schain.NewNoClient() |
Contributor
There was a problem hiding this comment.
I think there's an easier way to do this with no auth: https://github.com/google/go-containerregistry/blob/d54baf9aa28edb9b985a6b35b57e26e3410c2443/pkg/authn/anon.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.