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

Persistent volume caching for base images #383

Merged
merged 21 commits into from
Oct 11, 2018

Conversation

sharifelgamal
Copy link
Contributor

No description provided.

@sharifelgamal sharifelgamal changed the title Persistent volume caching for base images [WIP] Persistent volume caching for base images Oct 3, 2018
func addHiddenFlags(cmd *cobra.Command) {
}

func exit(err error) {
Copy link
Collaborator

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

"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 {
Copy link
Collaborator

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"?

fmt.Print(err)
errors.Wrap(err, fmt.Sprintf("Failed to verify image name: %s", image))
}
k8sc, err := k8schain.NewNoClient()
Copy link
Collaborator

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?

@sharifelgamal sharifelgamal changed the title [WIP] Persistent volume caching for base images Persistent volume caching for base images Oct 9, 2018
WORKDIR /go/src/github.com/GoogleContainerTools/kaniko
COPY . .
RUN make
# Get GCR credential helper
Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope. removed.

fmt.Printf("CACHEKEY=%s", cacheKey)
return cache.LocalDestination(opts, cacheKey)

k8sc, err := k8schain.NewNoClient()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sharifelgamal sharifelgamal merged commit effac9d into GoogleContainerTools:master Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants