-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Persistent volume caching for base images #383
Persistent volume caching for base images #383
Conversation
func addHiddenFlags(cmd *cobra.Command) { | ||
} | ||
|
||
func exit(err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we shouldn't need this if we return an error
pkg/cache/cache.go
Outdated
"github.com/pkg/errors" | ||
"github.com/sirupsen/logrus" | ||
) | ||
|
||
// 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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "source" instead of "destination"?
pkg/cache/warm.go
Outdated
fmt.Print(err) | ||
errors.Wrap(err, fmt.Sprintf("Failed to verify image name: %s", image)) | ||
} | ||
k8sc, err := k8schain.NewNoClient() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, should we use a normal keychain if we're not on k8s?
deploy/Dockerfile_warmer
Outdated
WORKDIR /go/src/github.com/GoogleContainerTools/kaniko | ||
COPY . . | ||
RUN make | ||
# Get GCR credential helper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the helpers if we're relying on open auth?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope. removed.
pkg/util/image_util.go
Outdated
fmt.Printf("CACHEKEY=%s", cacheKey) | ||
return cache.LocalDestination(opts, cacheKey) | ||
|
||
k8sc, err := k8schain.NewNoClient() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
No description provided.